aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/video/mt9v022.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/media/video/mt9v022.c')
-rw-r--r--drivers/media/video/mt9v022.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/media/video/mt9v022.c b/drivers/media/video/mt9v022.c
index 3a39f0288599..82e1a3381a7a 100644
--- a/drivers/media/video/mt9v022.c
+++ b/drivers/media/video/mt9v022.c
@@ -690,6 +690,7 @@ static int mt9v022_set_control(struct soc_camera_device *icd,
690static int mt9v022_video_probe(struct soc_camera_device *icd) 690static int mt9v022_video_probe(struct soc_camera_device *icd)
691{ 691{
692 struct mt9v022 *mt9v022 = container_of(icd, struct mt9v022, icd); 692 struct mt9v022 *mt9v022 = container_of(icd, struct mt9v022, icd);
693 struct soc_camera_link *icl = mt9v022->client->dev.platform_data;
693 s32 data; 694 s32 data;
694 int ret; 695 int ret;
695 696
@@ -725,7 +726,7 @@ static int mt9v022_video_probe(struct soc_camera_device *icd)
725 ret = reg_write(icd, MT9V022_PIXEL_OPERATION_MODE, 4 | 0x11); 726 ret = reg_write(icd, MT9V022_PIXEL_OPERATION_MODE, 4 | 0x11);
726 mt9v022->model = V4L2_IDENT_MT9V022IX7ATC; 727 mt9v022->model = V4L2_IDENT_MT9V022IX7ATC;
727 icd->formats = mt9v022_colour_formats; 728 icd->formats = mt9v022_colour_formats;
728 if (mt9v022->client->dev.platform_data) 729 if (gpio_is_valid(icl->gpio))
729 icd->num_formats = ARRAY_SIZE(mt9v022_colour_formats); 730 icd->num_formats = ARRAY_SIZE(mt9v022_colour_formats);
730 else 731 else
731 icd->num_formats = 1; 732 icd->num_formats = 1;
@@ -733,7 +734,7 @@ static int mt9v022_video_probe(struct soc_camera_device *icd)
733 ret = reg_write(icd, MT9V022_PIXEL_OPERATION_MODE, 0x11); 734 ret = reg_write(icd, MT9V022_PIXEL_OPERATION_MODE, 0x11);
734 mt9v022->model = V4L2_IDENT_MT9V022IX7ATM; 735 mt9v022->model = V4L2_IDENT_MT9V022IX7ATM;
735 icd->formats = mt9v022_monochrome_formats; 736 icd->formats = mt9v022_monochrome_formats;
736 if (mt9v022->client->dev.platform_data) 737 if (gpio_is_valid(icl->gpio))
737 icd->num_formats = ARRAY_SIZE(mt9v022_monochrome_formats); 738 icd->num_formats = ARRAY_SIZE(mt9v022_monochrome_formats);
738 else 739 else
739 icd->num_formats = 1; 740 icd->num_formats = 1;