diff options
author | Paul Kocialkowski <contact@paulk.fr> | 2013-07-30 23:11:46 +0200 |
---|---|---|
committer | Paul Kocialkowski <contact@paulk.fr> | 2013-07-30 23:14:03 +0200 |
commit | 5099a80f5a8ac7a09588575563648acf35992792 (patch) | |
tree | a306fc78710193956643e1fa0e6558122bdbd87b | |
parent | 3b8230bbf25de7fb8695f37f35071a801d3a9557 (diff) | |
download | device_samsung_galaxys2-common-5099a80f5a8ac7a09588575563648acf35992792.zip device_samsung_galaxys2-common-5099a80f5a8ac7a09588575563648acf35992792.tar.gz device_samsung_galaxys2-common-5099a80f5a8ac7a09588575563648acf35992792.tar.bz2 |
camera: Coding style (for loops, whitespaces and newlines)
Change-Id: Icc042027fa3bd37fc2815e7756a1743745be450e
Signed-off-by: Paul Kocialkowski <contact@paulk.fr>
-rw-r--r-- | camera/exynos_camera.c | 20 | ||||
-rw-r--r-- | camera/exynos_exif.c | 10 | ||||
-rw-r--r-- | camera/exynos_v4l2.c | 2 |
3 files changed, 16 insertions, 16 deletions
diff --git a/camera/exynos_camera.c b/camera/exynos_camera.c index 6d9ad9c..504cf4c 100644 --- a/camera/exynos_camera.c +++ b/camera/exynos_camera.c @@ -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; @@ -1622,7 +1622,7 @@ thread_exit: if (EXYNOS_CAMERA_MSG_ENABLED(CAMERA_MSG_FOCUS) && EXYNOS_CAMERA_CALLBACK_DEFINED(notify)) exynos_camera->callbacks.notify(CAMERA_MSG_FOCUS, (int32_t) auto_focus_result, 0, exynos_camera->callbacks.user); - + exynos_camera->auto_focus_thread_running = 0; exynos_camera->auto_focus_enabled = 0; @@ -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__); diff --git a/camera/exynos_exif.c b/camera/exynos_exif.c index 72492c4..8887e5b 100644 --- a/camera/exynos_exif.c +++ b/camera/exynos_exif.c @@ -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); @@ -372,7 +372,7 @@ bv_ioctl: } int exynos_exif_write_data(void *exif_data, unsigned short tag, - unsigned short type, unsigned int count, int *offset, void *start, + unsigned short type, unsigned int count, int *offset, void *start, void *data, int length) { unsigned char *pointer; @@ -397,7 +397,7 @@ int exynos_exif_write_data(void *exif_data, unsigned short tag, pointer += sizeof(*offset); memcpy((void *) ((int) start + *offset), data, count * length); - *offset += count * length; + *offset += count * length; } else { memcpy(pointer, data, count * length); pointer += 4; @@ -655,7 +655,7 @@ int exynos_exif_create(struct exynos_camera *exynos_camera, pointer += NUM_SIZE; offset += NUM_SIZE + value * IFD_SIZE + OFFSET_SIZE; - + count = exynos_exif_write_data(pointer, EXIF_TAG_GPS_VERSION_ID, EXIF_TYPE_BYTE, 4, NULL, NULL, &exif_attributes->gps_version_id, sizeof(char)); pointer += count; @@ -773,7 +773,7 @@ int exynos_exif_create(struct exynos_camera *exynos_camera, } else { value = 0; memcpy(exif_ifd_thumb, &value, OFFSET_SIZE); - + } pointer = (unsigned char *) exif_ifd_data_start; diff --git a/camera/exynos_v4l2.c b/camera/exynos_v4l2.c index 449e151..cb7039b 100644 --- a/camera/exynos_v4l2.c +++ b/camera/exynos_v4l2.c @@ -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; |