diff options
Diffstat (limited to 'drivers/media/video/mt9t031.c')
-rw-r--r-- | drivers/media/video/mt9t031.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/drivers/media/video/mt9t031.c b/drivers/media/video/mt9t031.c index 3fa87be2fc6e..cd3eb7731ac2 100644 --- a/drivers/media/video/mt9t031.c +++ b/drivers/media/video/mt9t031.c | |||
@@ -248,7 +248,7 @@ static int mt9t031_set_params(struct soc_camera_device *icd, | |||
248 | xbin = min(xskip, (u16)3); | 248 | xbin = min(xskip, (u16)3); |
249 | ybin = min(yskip, (u16)3); | 249 | ybin = min(yskip, (u16)3); |
250 | 250 | ||
251 | dev_dbg(&icd->dev, "xskip %u, width %u/%u, yskip %u, height %u/%u\n", | 251 | dev_dbg(&client->dev, "xskip %u, width %u/%u, yskip %u, height %u/%u\n", |
252 | xskip, width, rect->width, yskip, height, rect->height); | 252 | xskip, width, rect->width, yskip, height, rect->height); |
253 | 253 | ||
254 | /* Could just do roundup(rect->left, [xy]bin * 2); but this is cheaper */ | 254 | /* Could just do roundup(rect->left, [xy]bin * 2); but this is cheaper */ |
@@ -287,7 +287,7 @@ static int mt9t031_set_params(struct soc_camera_device *icd, | |||
287 | ret = reg_write(client, MT9T031_ROW_ADDRESS_MODE, | 287 | ret = reg_write(client, MT9T031_ROW_ADDRESS_MODE, |
288 | ((ybin - 1) << 4) | (yskip - 1)); | 288 | ((ybin - 1) << 4) | (yskip - 1)); |
289 | } | 289 | } |
290 | dev_dbg(&icd->dev, "new physical left %u, top %u\n", left, top); | 290 | dev_dbg(&client->dev, "new physical left %u, top %u\n", left, top); |
291 | 291 | ||
292 | /* The caller provides a supported format, as guaranteed by | 292 | /* The caller provides a supported format, as guaranteed by |
293 | * icd->try_fmt_cap(), soc_camera_s_crop() and soc_camera_cropcap() */ | 293 | * icd->try_fmt_cap(), soc_camera_s_crop() and soc_camera_cropcap() */ |
@@ -567,7 +567,7 @@ static int mt9t031_s_ctrl(struct v4l2_subdev *sd, struct v4l2_control *ctrl) | |||
567 | unsigned long range = qctrl->default_value - qctrl->minimum; | 567 | unsigned long range = qctrl->default_value - qctrl->minimum; |
568 | data = ((ctrl->value - qctrl->minimum) * 8 + range / 2) / range; | 568 | data = ((ctrl->value - qctrl->minimum) * 8 + range / 2) / range; |
569 | 569 | ||
570 | dev_dbg(&icd->dev, "Setting gain %d\n", data); | 570 | dev_dbg(&client->dev, "Setting gain %d\n", data); |
571 | data = reg_write(client, MT9T031_GLOBAL_GAIN, data); | 571 | data = reg_write(client, MT9T031_GLOBAL_GAIN, data); |
572 | if (data < 0) | 572 | if (data < 0) |
573 | return -EIO; | 573 | return -EIO; |
@@ -587,7 +587,7 @@ static int mt9t031_s_ctrl(struct v4l2_subdev *sd, struct v4l2_control *ctrl) | |||
587 | /* calculated gain 65..1024 -> (1..120) << 8 + 0x60 */ | 587 | /* calculated gain 65..1024 -> (1..120) << 8 + 0x60 */ |
588 | data = (((gain - 64 + 7) * 32) & 0xff00) | 0x60; | 588 | data = (((gain - 64 + 7) * 32) & 0xff00) | 0x60; |
589 | 589 | ||
590 | dev_dbg(&icd->dev, "Setting gain from 0x%x to 0x%x\n", | 590 | dev_dbg(&client->dev, "Set gain from 0x%x to 0x%x\n", |
591 | reg_read(client, MT9T031_GLOBAL_GAIN), data); | 591 | reg_read(client, MT9T031_GLOBAL_GAIN), data); |
592 | data = reg_write(client, MT9T031_GLOBAL_GAIN, data); | 592 | data = reg_write(client, MT9T031_GLOBAL_GAIN, data); |
593 | if (data < 0) | 593 | if (data < 0) |
@@ -608,7 +608,7 @@ static int mt9t031_s_ctrl(struct v4l2_subdev *sd, struct v4l2_control *ctrl) | |||
608 | u32 old; | 608 | u32 old; |
609 | 609 | ||
610 | get_shutter(client, &old); | 610 | get_shutter(client, &old); |
611 | dev_dbg(&icd->dev, "Setting shutter width from %u to %u\n", | 611 | dev_dbg(&client->dev, "Set shutter from %u to %u\n", |
612 | old, shutter); | 612 | old, shutter); |
613 | if (set_shutter(client, shutter) < 0) | 613 | if (set_shutter(client, shutter) < 0) |
614 | return -EIO; | 614 | return -EIO; |
@@ -653,7 +653,7 @@ static int mt9t031_video_probe(struct i2c_client *client) | |||
653 | 653 | ||
654 | /* Enable the chip */ | 654 | /* Enable the chip */ |
655 | data = reg_write(client, MT9T031_CHIP_ENABLE, 1); | 655 | data = reg_write(client, MT9T031_CHIP_ENABLE, 1); |
656 | dev_dbg(&icd->dev, "write: %d\n", data); | 656 | dev_dbg(&client->dev, "write: %d\n", data); |
657 | 657 | ||
658 | /* Read out the chip version register */ | 658 | /* Read out the chip version register */ |
659 | data = reg_read(client, MT9T031_CHIP_VERSION); | 659 | data = reg_read(client, MT9T031_CHIP_VERSION); |
@@ -665,12 +665,12 @@ static int mt9t031_video_probe(struct i2c_client *client) | |||
665 | icd->num_formats = ARRAY_SIZE(mt9t031_colour_formats); | 665 | icd->num_formats = ARRAY_SIZE(mt9t031_colour_formats); |
666 | break; | 666 | break; |
667 | default: | 667 | default: |
668 | dev_err(&icd->dev, | 668 | dev_err(&client->dev, |
669 | "No MT9T031 chip detected, register read %x\n", data); | 669 | "No MT9T031 chip detected, register read %x\n", data); |
670 | return -ENODEV; | 670 | return -ENODEV; |
671 | } | 671 | } |
672 | 672 | ||
673 | dev_info(&icd->dev, "Detected a MT9T031 chip ID %x\n", data); | 673 | dev_info(&client->dev, "Detected a MT9T031 chip ID %x\n", data); |
674 | 674 | ||
675 | return 0; | 675 | return 0; |
676 | } | 676 | } |