aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/video/ov511.c
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <mchehab@infradead.org>2006-03-25 07:19:53 -0500
committerMauro Carvalho Chehab <mchehab@infradead.org>2006-03-25 07:29:23 -0500
commitd56410e0a594150c5ca06319da7bc8901c4d455e (patch)
treef1462651ac1bcc5cec48219dbb422ac615231423 /drivers/media/video/ov511.c
parent9f6933be665ce3b049c274c99810ac754edabf19 (diff)
V4L/DVB (3599b): Whitespace cleanups under drivers/media
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Diffstat (limited to 'drivers/media/video/ov511.c')
-rw-r--r--drivers/media/video/ov511.c92
1 files changed, 46 insertions, 46 deletions
diff --git a/drivers/media/video/ov511.c b/drivers/media/video/ov511.c
index da44579d6f29..fdc8e3f13937 100644
--- a/drivers/media/video/ov511.c
+++ b/drivers/media/video/ov511.c
@@ -15,7 +15,7 @@
15 * 15 *
16 * Based on the Linux CPiA driver written by Peter Pregler, 16 * Based on the Linux CPiA driver written by Peter Pregler,
17 * Scott J. Bertin and Johannes Erdfelt. 17 * Scott J. Bertin and Johannes Erdfelt.
18 * 18 *
19 * Please see the file: Documentation/usb/ov511.txt 19 * Please see the file: Documentation/usb/ov511.txt
20 * and the website at: http://alpha.dyndns.org/ov511 20 * and the website at: http://alpha.dyndns.org/ov511
21 * for more info. 21 * for more info.
@@ -433,7 +433,7 @@ reg_w_mask(struct usb_ov511 *ov,
433 return (reg_w(ov, reg, newval)); 433 return (reg_w(ov, reg, newval));
434} 434}
435 435
436/* 436/*
437 * Writes multiple (n) byte value to a single register. Only valid with certain 437 * Writes multiple (n) byte value to a single register. Only valid with certain
438 * registers (0x30 and 0xc4 - 0xce). 438 * registers (0x30 and 0xc4 - 0xce).
439 */ 439 */
@@ -629,7 +629,7 @@ ov511_i2c_write_internal(struct usb_ov511 *ov,
629 /* Retry until idle */ 629 /* Retry until idle */
630 do 630 do
631 rc = reg_r(ov, R511_I2C_CTL); 631 rc = reg_r(ov, R511_I2C_CTL);
632 while (rc > 0 && ((rc&1) == 0)); 632 while (rc > 0 && ((rc&1) == 0));
633 if (rc < 0) 633 if (rc < 0)
634 break; 634 break;
635 635
@@ -1752,7 +1752,7 @@ sensor_set_picture(struct usb_ov511 *ov, struct video_picture *p)
1752 ov->whiteness = p->whiteness; 1752 ov->whiteness = p->whiteness;
1753 1753
1754 /* Don't return error if a setting is unsupported, or rest of settings 1754 /* Don't return error if a setting is unsupported, or rest of settings
1755 * will not be performed */ 1755 * will not be performed */
1756 1756
1757 rc = sensor_set_contrast(ov, p->contrast); 1757 rc = sensor_set_contrast(ov, p->contrast);
1758 if (FATAL_ERROR(rc)) 1758 if (FATAL_ERROR(rc))
@@ -1781,7 +1781,7 @@ sensor_get_picture(struct usb_ov511 *ov, struct video_picture *p)
1781 PDEBUG(4, "sensor_get_picture"); 1781 PDEBUG(4, "sensor_get_picture");
1782 1782
1783 /* Don't return error if a setting is unsupported, or rest of settings 1783 /* Don't return error if a setting is unsupported, or rest of settings
1784 * will not be performed */ 1784 * will not be performed */
1785 1785
1786 rc = sensor_get_contrast(ov, &(p->contrast)); 1786 rc = sensor_get_contrast(ov, &(p->contrast));
1787 if (FATAL_ERROR(rc)) 1787 if (FATAL_ERROR(rc))
@@ -2251,7 +2251,7 @@ mode_init_ov_sensor_regs(struct usb_ov511 *ov, int width, int height,
2251 2251
2252 /******** Clock programming ********/ 2252 /******** Clock programming ********/
2253 2253
2254 /* The OV6620 needs special handling. This prevents the 2254 /* The OV6620 needs special handling. This prevents the
2255 * severe banding that normally occurs */ 2255 * severe banding that normally occurs */
2256 if (ov->sensor == SEN_OV6620 || ov->sensor == SEN_OV6630) 2256 if (ov->sensor == SEN_OV6620 || ov->sensor == SEN_OV6630)
2257 { 2257 {
@@ -2326,7 +2326,7 @@ set_ov_sensor_window(struct usb_ov511 *ov, int width, int height, int mode,
2326 int sub_flag) 2326 int sub_flag)
2327{ 2327{
2328 int ret; 2328 int ret;
2329 int hwsbase, hwebase, vwsbase, vwebase, hwsize, vwsize; 2329 int hwsbase, hwebase, vwsbase, vwebase, hwsize, vwsize;
2330 int hoffset, voffset, hwscale = 0, vwscale = 0; 2330 int hoffset, voffset, hwscale = 0, vwscale = 0;
2331 2331
2332 /* The different sensor ICs handle setting up of window differently. 2332 /* The different sensor ICs handle setting up of window differently.
@@ -2575,7 +2575,7 @@ ov518_mode_init_regs(struct usb_ov511 *ov,
2575 /* OV518 needs U and V swapped */ 2575 /* OV518 needs U and V swapped */
2576 i2c_w_mask(ov, 0x15, 0x00, 0x01); 2576 i2c_w_mask(ov, 0x15, 0x00, 0x01);
2577 2577
2578 if (mode == VIDEO_PALETTE_GREY) { 2578 if (mode == VIDEO_PALETTE_GREY) {
2579 /* Set 16-bit input format (UV data are ignored) */ 2579 /* Set 16-bit input format (UV data are ignored) */
2580 reg_w_mask(ov, 0x20, 0x00, 0x08); 2580 reg_w_mask(ov, 0x20, 0x00, 0x08);
2581 2581
@@ -2894,7 +2894,7 @@ make_8x8(unsigned char *pIn, unsigned char *pOut, int w)
2894 * ... ... ... 2894 * ... ... ...
2895 * 56 57 ... 63 120 121 ... 127 248 249 ... 255 2895 * 56 57 ... 63 120 121 ... 127 248 249 ... 255
2896 * 2896 *
2897 */ 2897 */
2898static void 2898static void
2899yuv400raw_to_yuv400p(struct ov511_frame *frame, 2899yuv400raw_to_yuv400p(struct ov511_frame *frame,
2900 unsigned char *pIn0, unsigned char *pOut0) 2900 unsigned char *pIn0, unsigned char *pOut0)
@@ -2923,7 +2923,7 @@ yuv400raw_to_yuv400p(struct ov511_frame *frame,
2923 * 2923 *
2924 * 0 1 ... 7 2924 * 0 1 ... 7
2925 * 8 9 ... 15 2925 * 8 9 ... 15
2926 * ... 2926 * ...
2927 * 56 57 ... 63 2927 * 56 57 ... 63
2928 * 2928 *
2929 * U and V are shipped at half resolution (1 U,V sample -> one 2x2 block). 2929 * U and V are shipped at half resolution (1 U,V sample -> one 2x2 block).
@@ -3034,7 +3034,7 @@ decompress(struct usb_ov511 *ov, struct ov511_frame *frame,
3034 */ 3034 */
3035static void 3035static void
3036deinterlace(struct ov511_frame *frame, int rawformat, 3036deinterlace(struct ov511_frame *frame, int rawformat,
3037 unsigned char *pIn0, unsigned char *pOut0) 3037 unsigned char *pIn0, unsigned char *pOut0)
3038{ 3038{
3039 const int fieldheight = frame->rawheight / 2; 3039 const int fieldheight = frame->rawheight / 2;
3040 const int fieldpix = fieldheight * frame->rawwidth; 3040 const int fieldpix = fieldheight * frame->rawwidth;
@@ -3112,7 +3112,7 @@ ov51x_postprocess_grey(struct usb_ov511 *ov, struct ov511_frame *frame)
3112 frame->tempdata); 3112 frame->tempdata);
3113 3113
3114 deinterlace(frame, RAWFMT_YUV400, frame->tempdata, 3114 deinterlace(frame, RAWFMT_YUV400, frame->tempdata,
3115 frame->data); 3115 frame->data);
3116 } else { 3116 } else {
3117 if (frame->compressed) 3117 if (frame->compressed)
3118 decompress(ov, frame, frame->rawdata, 3118 decompress(ov, frame, frame->rawdata,
@@ -3136,7 +3136,7 @@ ov51x_postprocess_yuv420(struct usb_ov511 *ov, struct ov511_frame *frame)
3136 frame->tempdata); 3136 frame->tempdata);
3137 3137
3138 deinterlace(frame, RAWFMT_YUV420, frame->tempdata, 3138 deinterlace(frame, RAWFMT_YUV420, frame->tempdata,
3139 frame->data); 3139 frame->data);
3140 } else { 3140 } else {
3141 if (frame->compressed) 3141 if (frame->compressed)
3142 decompress(ov, frame, frame->rawdata, frame->data); 3142 decompress(ov, frame, frame->rawdata, frame->data);
@@ -3226,7 +3226,7 @@ ov511_move_data(struct usb_ov511 *ov, unsigned char *in, int n)
3226 frame->rawwidth = ((int)(in[9]) + 1) * 8; 3226 frame->rawwidth = ((int)(in[9]) + 1) * 8;
3227 frame->rawheight = ((int)(in[10]) + 1) * 8; 3227 frame->rawheight = ((int)(in[10]) + 1) * 8;
3228 3228
3229 PDEBUG(4, "Frame end, frame=%d, pnum=%d, w=%d, h=%d, recvd=%d", 3229 PDEBUG(4, "Frame end, frame=%d, pnum=%d, w=%d, h=%d, recvd=%d",
3230 ov->curframe, pnum, frame->rawwidth, frame->rawheight, 3230 ov->curframe, pnum, frame->rawwidth, frame->rawheight,
3231 frame->bytes_recvd); 3231 frame->bytes_recvd);
3232 3232
@@ -3527,10 +3527,10 @@ ov51x_isoc_irq(struct urb *urb, struct pt_regs *regs)
3527 return; 3527 return;
3528 } 3528 }
3529 3529
3530 if (urb->status == -ENOENT || urb->status == -ECONNRESET) { 3530 if (urb->status == -ENOENT || urb->status == -ECONNRESET) {
3531 PDEBUG(4, "URB unlinked"); 3531 PDEBUG(4, "URB unlinked");
3532 return; 3532 return;
3533 } 3533 }
3534 3534
3535 if (urb->status != -EINPROGRESS && urb->status != 0) { 3535 if (urb->status != -EINPROGRESS && urb->status != 0) {
3536 err("ERROR: urb->status=%d: %s", urb->status, 3536 err("ERROR: urb->status=%d: %s", urb->status,
@@ -4627,8 +4627,8 @@ ov51x_v4l1_mmap(struct file *file, struct vm_area_struct *vma)
4627 PDEBUG(4, "mmap: %ld (%lX) bytes", size, size); 4627 PDEBUG(4, "mmap: %ld (%lX) bytes", size, size);
4628 4628
4629 if (size > (((OV511_NUMFRAMES 4629 if (size > (((OV511_NUMFRAMES
4630 * MAX_DATA_SIZE(ov->maxwidth, ov->maxheight) 4630 * MAX_DATA_SIZE(ov->maxwidth, ov->maxheight)
4631 + PAGE_SIZE - 1) & ~(PAGE_SIZE - 1)))) 4631 + PAGE_SIZE - 1) & ~(PAGE_SIZE - 1))))
4632 return -EINVAL; 4632 return -EINVAL;
4633 4633
4634 if (mutex_lock_interruptible(&ov->lock)) 4634 if (mutex_lock_interruptible(&ov->lock))
@@ -5062,7 +5062,7 @@ ov6xx0_configure(struct usb_ov511 *ov)
5062} 5062}
5063 5063
5064/* This initializes the KS0127 and KS0127B video decoders. */ 5064/* This initializes the KS0127 and KS0127B video decoders. */
5065static int 5065static int
5066ks0127_configure(struct usb_ov511 *ov) 5066ks0127_configure(struct usb_ov511 *ov)
5067{ 5067{
5068 int rc; 5068 int rc;
@@ -5193,7 +5193,7 @@ saa7111a_configure(struct usb_ov511 *ov)
5193 return -1; 5193 return -1;
5194 5194
5195 /* Detect version of decoder. This must be done after writing the 5195 /* Detect version of decoder. This must be done after writing the
5196 * initial regs or the decoder will lock up. */ 5196 * initial regs or the decoder will lock up. */
5197 rc = i2c_r(ov, 0x00); 5197 rc = i2c_r(ov, 0x00);
5198 5198
5199 if (rc < 0) { 5199 if (rc < 0) {
@@ -5216,13 +5216,13 @@ saa7111a_configure(struct usb_ov511 *ov)
5216} 5216}
5217 5217
5218/* This initializes the OV511/OV511+ and the sensor */ 5218/* This initializes the OV511/OV511+ and the sensor */
5219static int 5219static int
5220ov511_configure(struct usb_ov511 *ov) 5220ov511_configure(struct usb_ov511 *ov)
5221{ 5221{
5222 static struct ov511_regvals aRegvalsInit511[] = { 5222 static struct ov511_regvals aRegvalsInit511[] = {
5223 { OV511_REG_BUS, R51x_SYS_RESET, 0x7f }, 5223 { OV511_REG_BUS, R51x_SYS_RESET, 0x7f },
5224 { OV511_REG_BUS, R51x_SYS_INIT, 0x01 }, 5224 { OV511_REG_BUS, R51x_SYS_INIT, 0x01 },
5225 { OV511_REG_BUS, R51x_SYS_RESET, 0x7f }, 5225 { OV511_REG_BUS, R51x_SYS_RESET, 0x7f },
5226 { OV511_REG_BUS, R51x_SYS_INIT, 0x01 }, 5226 { OV511_REG_BUS, R51x_SYS_INIT, 0x01 },
5227 { OV511_REG_BUS, R51x_SYS_RESET, 0x3f }, 5227 { OV511_REG_BUS, R51x_SYS_RESET, 0x3f },
5228 { OV511_REG_BUS, R51x_SYS_INIT, 0x01 }, 5228 { OV511_REG_BUS, R51x_SYS_INIT, 0x01 },
@@ -5269,7 +5269,7 @@ ov511_configure(struct usb_ov511 *ov)
5269 err("Please notify " EMAIL " of the name,"); 5269 err("Please notify " EMAIL " of the name,");
5270 err("manufacturer, model, and this number of your camera."); 5270 err("manufacturer, model, and this number of your camera.");
5271 err("Also include the output of the detection process."); 5271 err("Also include the output of the detection process.");
5272 } 5272 }
5273 5273
5274 if (ov->customid == 70) /* USB Life TV (PAL/SECAM) */ 5274 if (ov->customid == 70) /* USB Life TV (PAL/SECAM) */
5275 ov->pal = 1; 5275 ov->pal = 1;
@@ -5336,17 +5336,17 @@ ov511_configure(struct usb_ov511 *ov)
5336 5336
5337 if (i2c_w(ov, 0x10, 0x00) < 0) { 5337 if (i2c_w(ov, 0x10, 0x00) < 0) {
5338 err("Can't determine sensor slave IDs"); 5338 err("Can't determine sensor slave IDs");
5339 goto error; 5339 goto error;
5340 } else { 5340 } else {
5341 if (ks0127_configure(ov) < 0) { 5341 if (ks0127_configure(ov) < 0) {
5342 err("Failed to configure KS0127"); 5342 err("Failed to configure KS0127");
5343 goto error; 5343 goto error;
5344 } 5344 }
5345 } 5345 }
5346 } else { 5346 } else {
5347 if (saa7111a_configure(ov) < 0) { 5347 if (saa7111a_configure(ov) < 0) {
5348 err("Failed to configure SAA7111A"); 5348 err("Failed to configure SAA7111A");
5349 goto error; 5349 goto error;
5350 } 5350 }
5351 } 5351 }
5352 } else { 5352 } else {
@@ -5356,13 +5356,13 @@ ov511_configure(struct usb_ov511 *ov)
5356 } else { 5356 } else {
5357 if (ov6xx0_configure(ov) < 0) { 5357 if (ov6xx0_configure(ov) < 0) {
5358 err("Failed to configure OV6xx0"); 5358 err("Failed to configure OV6xx0");
5359 goto error; 5359 goto error;
5360 } 5360 }
5361 } 5361 }
5362 } else { 5362 } else {
5363 if (ov7xx0_configure(ov) < 0) { 5363 if (ov7xx0_configure(ov) < 0) {
5364 err("Failed to configure OV7xx0"); 5364 err("Failed to configure OV7xx0");
5365 goto error; 5365 goto error;
5366 } 5366 }
5367 } 5367 }
5368 5368
@@ -5381,12 +5381,12 @@ ov518_configure(struct usb_ov511 *ov)
5381 /* For 518 and 518+ */ 5381 /* For 518 and 518+ */
5382 static struct ov511_regvals aRegvalsInit518[] = { 5382 static struct ov511_regvals aRegvalsInit518[] = {
5383 { OV511_REG_BUS, R51x_SYS_RESET, 0x40 }, 5383 { OV511_REG_BUS, R51x_SYS_RESET, 0x40 },
5384 { OV511_REG_BUS, R51x_SYS_INIT, 0xe1 }, 5384 { OV511_REG_BUS, R51x_SYS_INIT, 0xe1 },
5385 { OV511_REG_BUS, R51x_SYS_RESET, 0x3e }, 5385 { OV511_REG_BUS, R51x_SYS_RESET, 0x3e },
5386 { OV511_REG_BUS, R51x_SYS_INIT, 0xe1 }, 5386 { OV511_REG_BUS, R51x_SYS_INIT, 0xe1 },
5387 { OV511_REG_BUS, R51x_SYS_RESET, 0x00 }, 5387 { OV511_REG_BUS, R51x_SYS_RESET, 0x00 },
5388 { OV511_REG_BUS, R51x_SYS_INIT, 0xe1 }, 5388 { OV511_REG_BUS, R51x_SYS_INIT, 0xe1 },
5389 { OV511_REG_BUS, 0x46, 0x00 }, 5389 { OV511_REG_BUS, 0x46, 0x00 },
5390 { OV511_REG_BUS, 0x5d, 0x03 }, 5390 { OV511_REG_BUS, 0x5d, 0x03 },
5391 { OV511_DONE_BUS, 0x0, 0x00}, 5391 { OV511_DONE_BUS, 0x0, 0x00},
5392 }; 5392 };
@@ -5517,7 +5517,7 @@ ov518_configure(struct usb_ov511 *ov)
5517 5517
5518 if (init_ov_sensor(ov) < 0) { 5518 if (init_ov_sensor(ov) < 0) {
5519 err("Can't determine sensor slave IDs"); 5519 err("Can't determine sensor slave IDs");
5520 goto error; 5520 goto error;
5521 } else { 5521 } else {
5522 err("Detected unsupported OV8xx0 sensor"); 5522 err("Detected unsupported OV8xx0 sensor");
5523 goto error; 5523 goto error;
@@ -5525,13 +5525,13 @@ ov518_configure(struct usb_ov511 *ov)
5525 } else { 5525 } else {
5526 if (ov6xx0_configure(ov) < 0) { 5526 if (ov6xx0_configure(ov) < 0) {
5527 err("Failed to configure OV6xx0"); 5527 err("Failed to configure OV6xx0");
5528 goto error; 5528 goto error;
5529 } 5529 }
5530 } 5530 }
5531 } else { 5531 } else {
5532 if (ov7xx0_configure(ov) < 0) { 5532 if (ov7xx0_configure(ov) < 0) {
5533 err("Failed to configure OV7xx0"); 5533 err("Failed to configure OV7xx0");
5534 goto error; 5534 goto error;
5535 } 5535 }
5536 } 5536 }
5537 5537
@@ -5564,28 +5564,28 @@ static ssize_t show_custom_id(struct class_device *cd, char *buf)
5564{ 5564{
5565 struct usb_ov511 *ov = cd_to_ov(cd); 5565 struct usb_ov511 *ov = cd_to_ov(cd);
5566 return sprintf(buf, "%d\n", ov->customid); 5566 return sprintf(buf, "%d\n", ov->customid);
5567} 5567}
5568static CLASS_DEVICE_ATTR(custom_id, S_IRUGO, show_custom_id, NULL); 5568static CLASS_DEVICE_ATTR(custom_id, S_IRUGO, show_custom_id, NULL);
5569 5569
5570static ssize_t show_model(struct class_device *cd, char *buf) 5570static ssize_t show_model(struct class_device *cd, char *buf)
5571{ 5571{
5572 struct usb_ov511 *ov = cd_to_ov(cd); 5572 struct usb_ov511 *ov = cd_to_ov(cd);
5573 return sprintf(buf, "%s\n", ov->desc); 5573 return sprintf(buf, "%s\n", ov->desc);
5574} 5574}
5575static CLASS_DEVICE_ATTR(model, S_IRUGO, show_model, NULL); 5575static CLASS_DEVICE_ATTR(model, S_IRUGO, show_model, NULL);
5576 5576
5577static ssize_t show_bridge(struct class_device *cd, char *buf) 5577static ssize_t show_bridge(struct class_device *cd, char *buf)
5578{ 5578{
5579 struct usb_ov511 *ov = cd_to_ov(cd); 5579 struct usb_ov511 *ov = cd_to_ov(cd);
5580 return sprintf(buf, "%s\n", symbolic(brglist, ov->bridge)); 5580 return sprintf(buf, "%s\n", symbolic(brglist, ov->bridge));
5581} 5581}
5582static CLASS_DEVICE_ATTR(bridge, S_IRUGO, show_bridge, NULL); 5582static CLASS_DEVICE_ATTR(bridge, S_IRUGO, show_bridge, NULL);
5583 5583
5584static ssize_t show_sensor(struct class_device *cd, char *buf) 5584static ssize_t show_sensor(struct class_device *cd, char *buf)
5585{ 5585{
5586 struct usb_ov511 *ov = cd_to_ov(cd); 5586 struct usb_ov511 *ov = cd_to_ov(cd);
5587 return sprintf(buf, "%s\n", symbolic(senlist, ov->sensor)); 5587 return sprintf(buf, "%s\n", symbolic(senlist, ov->sensor));
5588} 5588}
5589static CLASS_DEVICE_ATTR(sensor, S_IRUGO, show_sensor, NULL); 5589static CLASS_DEVICE_ATTR(sensor, S_IRUGO, show_sensor, NULL);
5590 5590
5591static ssize_t show_brightness(struct class_device *cd, char *buf) 5591static ssize_t show_brightness(struct class_device *cd, char *buf)
@@ -5597,7 +5597,7 @@ static ssize_t show_brightness(struct class_device *cd, char *buf)
5597 return -ENODEV; 5597 return -ENODEV;
5598 sensor_get_brightness(ov, &x); 5598 sensor_get_brightness(ov, &x);
5599 return sprintf(buf, "%d\n", x >> 8); 5599 return sprintf(buf, "%d\n", x >> 8);
5600} 5600}
5601static CLASS_DEVICE_ATTR(brightness, S_IRUGO, show_brightness, NULL); 5601static CLASS_DEVICE_ATTR(brightness, S_IRUGO, show_brightness, NULL);
5602 5602
5603static ssize_t show_saturation(struct class_device *cd, char *buf) 5603static ssize_t show_saturation(struct class_device *cd, char *buf)
@@ -5609,7 +5609,7 @@ static ssize_t show_saturation(struct class_device *cd, char *buf)
5609 return -ENODEV; 5609 return -ENODEV;
5610 sensor_get_saturation(ov, &x); 5610 sensor_get_saturation(ov, &x);
5611 return sprintf(buf, "%d\n", x >> 8); 5611 return sprintf(buf, "%d\n", x >> 8);
5612} 5612}
5613static CLASS_DEVICE_ATTR(saturation, S_IRUGO, show_saturation, NULL); 5613static CLASS_DEVICE_ATTR(saturation, S_IRUGO, show_saturation, NULL);
5614 5614
5615static ssize_t show_contrast(struct class_device *cd, char *buf) 5615static ssize_t show_contrast(struct class_device *cd, char *buf)
@@ -5621,7 +5621,7 @@ static ssize_t show_contrast(struct class_device *cd, char *buf)
5621 return -ENODEV; 5621 return -ENODEV;
5622 sensor_get_contrast(ov, &x); 5622 sensor_get_contrast(ov, &x);
5623 return sprintf(buf, "%d\n", x >> 8); 5623 return sprintf(buf, "%d\n", x >> 8);
5624} 5624}
5625static CLASS_DEVICE_ATTR(contrast, S_IRUGO, show_contrast, NULL); 5625static CLASS_DEVICE_ATTR(contrast, S_IRUGO, show_contrast, NULL);
5626 5626
5627static ssize_t show_hue(struct class_device *cd, char *buf) 5627static ssize_t show_hue(struct class_device *cd, char *buf)
@@ -5633,7 +5633,7 @@ static ssize_t show_hue(struct class_device *cd, char *buf)
5633 return -ENODEV; 5633 return -ENODEV;
5634 sensor_get_hue(ov, &x); 5634 sensor_get_hue(ov, &x);
5635 return sprintf(buf, "%d\n", x >> 8); 5635 return sprintf(buf, "%d\n", x >> 8);
5636} 5636}
5637static CLASS_DEVICE_ATTR(hue, S_IRUGO, show_hue, NULL); 5637static CLASS_DEVICE_ATTR(hue, S_IRUGO, show_hue, NULL);
5638 5638
5639static ssize_t show_exposure(struct class_device *cd, char *buf) 5639static ssize_t show_exposure(struct class_device *cd, char *buf)
@@ -5645,7 +5645,7 @@ static ssize_t show_exposure(struct class_device *cd, char *buf)
5645 return -ENODEV; 5645 return -ENODEV;
5646 sensor_get_exposure(ov, &exp); 5646 sensor_get_exposure(ov, &exp);
5647 return sprintf(buf, "%d\n", exp >> 8); 5647 return sprintf(buf, "%d\n", exp >> 8);
5648} 5648}
5649static CLASS_DEVICE_ATTR(exposure, S_IRUGO, show_exposure, NULL); 5649static CLASS_DEVICE_ATTR(exposure, S_IRUGO, show_exposure, NULL);
5650 5650
5651static void ov_create_sysfs(struct video_device *vdev) 5651static void ov_create_sysfs(struct video_device *vdev)