diff options
Diffstat (limited to 'drivers/media/i2c/soc_camera/mt9v022.c')
-rw-r--r-- | drivers/media/i2c/soc_camera/mt9v022.c | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/drivers/media/i2c/soc_camera/mt9v022.c b/drivers/media/i2c/soc_camera/mt9v022.c index 99022c8d76eb..a246d4d64b8b 100644 --- a/drivers/media/i2c/soc_camera/mt9v022.c +++ b/drivers/media/i2c/soc_camera/mt9v022.c | |||
@@ -85,13 +85,13 @@ MODULE_PARM_DESC(sensor_type, "Sensor type: \"colour\" or \"monochrome\""); | |||
85 | 85 | ||
86 | /* MT9V022 has only one fixed colorspace per pixelcode */ | 86 | /* MT9V022 has only one fixed colorspace per pixelcode */ |
87 | struct mt9v022_datafmt { | 87 | struct mt9v022_datafmt { |
88 | enum v4l2_mbus_pixelcode code; | 88 | u32 code; |
89 | enum v4l2_colorspace colorspace; | 89 | enum v4l2_colorspace colorspace; |
90 | }; | 90 | }; |
91 | 91 | ||
92 | /* Find a data format by a pixel code in an array */ | 92 | /* Find a data format by a pixel code in an array */ |
93 | static const struct mt9v022_datafmt *mt9v022_find_datafmt( | 93 | static const struct mt9v022_datafmt *mt9v022_find_datafmt( |
94 | enum v4l2_mbus_pixelcode code, const struct mt9v022_datafmt *fmt, | 94 | u32 code, const struct mt9v022_datafmt *fmt, |
95 | int n) | 95 | int n) |
96 | { | 96 | { |
97 | int i; | 97 | int i; |
@@ -107,14 +107,14 @@ static const struct mt9v022_datafmt mt9v022_colour_fmts[] = { | |||
107 | * Order important: first natively supported, | 107 | * Order important: first natively supported, |
108 | * second supported with a GPIO extender | 108 | * second supported with a GPIO extender |
109 | */ | 109 | */ |
110 | {V4L2_MBUS_FMT_SBGGR10_1X10, V4L2_COLORSPACE_SRGB}, | 110 | {MEDIA_BUS_FMT_SBGGR10_1X10, V4L2_COLORSPACE_SRGB}, |
111 | {V4L2_MBUS_FMT_SBGGR8_1X8, V4L2_COLORSPACE_SRGB}, | 111 | {MEDIA_BUS_FMT_SBGGR8_1X8, V4L2_COLORSPACE_SRGB}, |
112 | }; | 112 | }; |
113 | 113 | ||
114 | static const struct mt9v022_datafmt mt9v022_monochrome_fmts[] = { | 114 | static const struct mt9v022_datafmt mt9v022_monochrome_fmts[] = { |
115 | /* Order important - see above */ | 115 | /* Order important - see above */ |
116 | {V4L2_MBUS_FMT_Y10_1X10, V4L2_COLORSPACE_JPEG}, | 116 | {MEDIA_BUS_FMT_Y10_1X10, V4L2_COLORSPACE_JPEG}, |
117 | {V4L2_MBUS_FMT_Y8_1X8, V4L2_COLORSPACE_JPEG}, | 117 | {MEDIA_BUS_FMT_Y8_1X8, V4L2_COLORSPACE_JPEG}, |
118 | }; | 118 | }; |
119 | 119 | ||
120 | /* only registers with different addresses on different mt9v02x sensors */ | 120 | /* only registers with different addresses on different mt9v02x sensors */ |
@@ -410,13 +410,13 @@ static int mt9v022_s_fmt(struct v4l2_subdev *sd, | |||
410 | * .try_mbus_fmt(), datawidth is from our supported format list | 410 | * .try_mbus_fmt(), datawidth is from our supported format list |
411 | */ | 411 | */ |
412 | switch (mf->code) { | 412 | switch (mf->code) { |
413 | case V4L2_MBUS_FMT_Y8_1X8: | 413 | case MEDIA_BUS_FMT_Y8_1X8: |
414 | case V4L2_MBUS_FMT_Y10_1X10: | 414 | case MEDIA_BUS_FMT_Y10_1X10: |
415 | if (mt9v022->model != MT9V022IX7ATM) | 415 | if (mt9v022->model != MT9V022IX7ATM) |
416 | return -EINVAL; | 416 | return -EINVAL; |
417 | break; | 417 | break; |
418 | case V4L2_MBUS_FMT_SBGGR8_1X8: | 418 | case MEDIA_BUS_FMT_SBGGR8_1X8: |
419 | case V4L2_MBUS_FMT_SBGGR10_1X10: | 419 | case MEDIA_BUS_FMT_SBGGR10_1X10: |
420 | if (mt9v022->model != MT9V022IX7ATC) | 420 | if (mt9v022->model != MT9V022IX7ATC) |
421 | return -EINVAL; | 421 | return -EINVAL; |
422 | break; | 422 | break; |
@@ -443,8 +443,8 @@ static int mt9v022_try_fmt(struct v4l2_subdev *sd, | |||
443 | struct i2c_client *client = v4l2_get_subdevdata(sd); | 443 | struct i2c_client *client = v4l2_get_subdevdata(sd); |
444 | struct mt9v022 *mt9v022 = to_mt9v022(client); | 444 | struct mt9v022 *mt9v022 = to_mt9v022(client); |
445 | const struct mt9v022_datafmt *fmt; | 445 | const struct mt9v022_datafmt *fmt; |
446 | int align = mf->code == V4L2_MBUS_FMT_SBGGR8_1X8 || | 446 | int align = mf->code == MEDIA_BUS_FMT_SBGGR8_1X8 || |
447 | mf->code == V4L2_MBUS_FMT_SBGGR10_1X10; | 447 | mf->code == MEDIA_BUS_FMT_SBGGR10_1X10; |
448 | 448 | ||
449 | v4l_bound_align_image(&mf->width, MT9V022_MIN_WIDTH, | 449 | v4l_bound_align_image(&mf->width, MT9V022_MIN_WIDTH, |
450 | MT9V022_MAX_WIDTH, align, | 450 | MT9V022_MAX_WIDTH, align, |
@@ -759,7 +759,7 @@ static struct v4l2_subdev_core_ops mt9v022_subdev_core_ops = { | |||
759 | }; | 759 | }; |
760 | 760 | ||
761 | static int mt9v022_enum_fmt(struct v4l2_subdev *sd, unsigned int index, | 761 | static int mt9v022_enum_fmt(struct v4l2_subdev *sd, unsigned int index, |
762 | enum v4l2_mbus_pixelcode *code) | 762 | u32 *code) |
763 | { | 763 | { |
764 | struct i2c_client *client = v4l2_get_subdevdata(sd); | 764 | struct i2c_client *client = v4l2_get_subdevdata(sd); |
765 | struct mt9v022 *mt9v022 = to_mt9v022(client); | 765 | struct mt9v022 *mt9v022 = to_mt9v022(client); |