camera: Coding style (for loops, whitespaces and newlines)
Change-Id: Icc042027fa3bd37fc2815e7756a1743745be450e Signed-off-by: Paul Kocialkowski <contact@paulk.fr>
This commit is contained in:
parent
3b8230bbf2
commit
5099a80f5a
@ -1552,7 +1552,7 @@ void exynos_camera_picture_stop(struct exynos_camera *exynos_camera)
|
||||
pthread_mutex_unlock(&exynos_camera->picture_mutex);
|
||||
|
||||
// Wait for the thread to end
|
||||
for (i=0 ; i < 10 ; i++) {
|
||||
for (i = 0; i < 10; i++) {
|
||||
if (!exynos_camera->picture_thread_running)
|
||||
break;
|
||||
|
||||
@ -1684,7 +1684,7 @@ void exynos_camera_auto_focus_stop(struct exynos_camera *exynos_camera)
|
||||
pthread_mutex_unlock(&exynos_camera->auto_focus_mutex);
|
||||
|
||||
// Wait for the thread to end
|
||||
for (i=0 ; i < 10 ; i++) {
|
||||
for (i = 0; i < 10; i++) {
|
||||
if (!exynos_camera->auto_focus_thread_running)
|
||||
break;
|
||||
|
||||
@ -1926,7 +1926,7 @@ int exynos_camera_preview_start(struct exynos_camera *exynos_camera)
|
||||
return -1;
|
||||
}
|
||||
|
||||
for (i=EXYNOS_CAMERA_MAX_BUFFERS_COUNT ; i >= EXYNOS_CAMERA_MIN_BUFFERS_COUNT ; i--) {
|
||||
for (i = EXYNOS_CAMERA_MAX_BUFFERS_COUNT; i >= EXYNOS_CAMERA_MIN_BUFFERS_COUNT; i--) {
|
||||
rc = exynos_v4l2_reqbufs_cap(exynos_camera, 0, i);
|
||||
if (rc >= 0)
|
||||
break;
|
||||
@ -1952,7 +1952,7 @@ int exynos_camera_preview_start(struct exynos_camera *exynos_camera)
|
||||
}
|
||||
|
||||
frame_size = (int) ((float) width * (float) height * format_bpp);
|
||||
for (i=0 ; i < exynos_camera->preview_buffers_count ; i++) {
|
||||
for (i = 0; i < exynos_camera->preview_buffers_count; i++) {
|
||||
rc = exynos_v4l2_querybuf_cap(exynos_camera, 0, i);
|
||||
if (rc < 0) {
|
||||
ALOGE("%s: querybuf failed!", __func__);
|
||||
@ -1985,7 +1985,7 @@ int exynos_camera_preview_start(struct exynos_camera *exynos_camera)
|
||||
return -1;
|
||||
}
|
||||
|
||||
for (i=0 ; i < exynos_camera->preview_buffers_count ; i++) {
|
||||
for (i = 0; i < exynos_camera->preview_buffers_count; i++) {
|
||||
rc = exynos_v4l2_qbuf_cap(exynos_camera, 0, i);
|
||||
if (rc < 0) {
|
||||
ALOGE("%s: qbuf failed!", __func__);
|
||||
@ -2064,7 +2064,7 @@ void exynos_camera_preview_stop(struct exynos_camera *exynos_camera)
|
||||
pthread_mutex_lock(&exynos_camera->preview_mutex);
|
||||
|
||||
// Wait for the thread to end
|
||||
for (i=0 ; i < 10 ; i++) {
|
||||
for (i = 0; i < 10; i++) {
|
||||
if (!exynos_camera->preview_thread_running)
|
||||
break;
|
||||
|
||||
@ -2154,7 +2154,7 @@ int exynos_camera_recording_start(struct exynos_camera *exynos_camera)
|
||||
goto error;
|
||||
}
|
||||
|
||||
for (i=EXYNOS_CAMERA_MAX_BUFFERS_COUNT ; i >= EXYNOS_CAMERA_MIN_BUFFERS_COUNT ; i--) {
|
||||
for (i = EXYNOS_CAMERA_MAX_BUFFERS_COUNT; i >= EXYNOS_CAMERA_MIN_BUFFERS_COUNT; i--) {
|
||||
rc = exynos_v4l2_reqbufs_cap(exynos_camera, 2, i);
|
||||
if (rc >= 0)
|
||||
break;
|
||||
@ -2168,7 +2168,7 @@ int exynos_camera_recording_start(struct exynos_camera *exynos_camera)
|
||||
exynos_camera->recording_buffers_count = rc;
|
||||
ALOGD("Found %d recording buffers available!", exynos_camera->recording_buffers_count);
|
||||
|
||||
for (i=0 ; i < exynos_camera->recording_buffers_count ; i++) {
|
||||
for (i = 0; i < exynos_camera->recording_buffers_count; i++) {
|
||||
rc = exynos_v4l2_querybuf_cap(exynos_camera, 2, i);
|
||||
if (rc < 0) {
|
||||
ALOGE("%s: querybuf failed!", __func__);
|
||||
@ -2192,7 +2192,7 @@ int exynos_camera_recording_start(struct exynos_camera *exynos_camera)
|
||||
goto error;
|
||||
}
|
||||
|
||||
for (i=0 ; i < exynos_camera->recording_buffers_count ; i++) {
|
||||
for (i = 0; i < exynos_camera->recording_buffers_count; i++) {
|
||||
rc = exynos_v4l2_qbuf_cap(exynos_camera, 2, i);
|
||||
if (rc < 0) {
|
||||
ALOGE("%s: qbuf failed!", __func__);
|
||||
|
@ -242,7 +242,7 @@ int exynos_exif_attributes_create_params(struct exynos_camera *exynos_camera,
|
||||
}
|
||||
|
||||
// Time
|
||||
time(&time_data);
|
||||
time(&time_data);
|
||||
time_info = localtime(&time_data);
|
||||
strftime((char *) exif_attributes->date_time, sizeof(exif_attributes->date_time),
|
||||
"%Y:%m:%d %H:%M:%S", time_info);
|
||||
|
@ -54,7 +54,7 @@ int exynos_v4l2_find_index(struct exynos_camera *exynos_camera, int exynos_v4l2_
|
||||
return -1;
|
||||
|
||||
index = -1;
|
||||
for (i=0 ; i < exynos_camera->config->v4l2_nodes_count ; i++) {
|
||||
for (i = 0; i < exynos_camera->config->v4l2_nodes_count; i++) {
|
||||
if (exynos_camera->config->v4l2_nodes[i].id == exynos_v4l2_id &&
|
||||
exynos_camera->config->v4l2_nodes[i].node != NULL) {
|
||||
index = i;
|
||||
|
Loading…
Reference in New Issue
Block a user