Re: [PATCH 1/7] v4l2: replace enum_mbus_fmt by enum_mbus_code
On 04/15/2015 10:08 PM, Guennadi Liakhovetski wrote: On Thu, 9 Apr 2015, Hans Verkuil wrote: From: Hans Verkuil hans.verk...@cisco.com Replace all calls to the enum_mbus_fmt video op by the pad enum_mbus_code op and remove the duplicate video op. Signed-off-by: Hans Verkuil hans.verk...@cisco.com Cc: Guennadi Liakhovetski g.liakhovet...@gmx.de Cc: Scott Jiang scott.jiang.li...@gmail.com Cc: Jonathan Corbet cor...@lwn.net Cc: Kamil Debski k.deb...@samsung.com --- [snip] diff --git a/drivers/media/i2c/soc_camera/mt9m111.c b/drivers/media/i2c/soc_camera/mt9m111.c index 441e0fd..ef8682c 100644 --- a/drivers/media/i2c/soc_camera/mt9m111.c +++ b/drivers/media/i2c/soc_camera/mt9m111.c @@ -839,13 +839,14 @@ static struct v4l2_subdev_core_ops mt9m111_subdev_core_ops = { #endif }; -static int mt9m111_enum_fmt(struct v4l2_subdev *sd, unsigned int index, -u32 *code) +static int mt9m111_enum_mbus_code(struct v4l2_subdev *sd, +struct v4l2_subdev_pad_config *cfg, +struct v4l2_subdev_mbus_code_enum *code) { -if (index = ARRAY_SIZE(mt9m111_colour_fmts)) +if (code-code || code-index = ARRAY_SIZE(mt9m111_colour_fmts)) Didn't you mean + if (code-pad || code-index = ARRAY_SIZE(mt9m111_colour_fmts)) ? Nice catch! Thanks, I've fixed this. Regards, Hans -- To unsubscribe from this list: send the line unsubscribe linux-media in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH 1/7] v4l2: replace enum_mbus_fmt by enum_mbus_code
2015-04-09 18:21 GMT+08:00 Hans Verkuil hverk...@xs4all.nl: From: Hans Verkuil hans.verk...@cisco.com Replace all calls to the enum_mbus_fmt video op by the pad enum_mbus_code op and remove the duplicate video op. Signed-off-by: Hans Verkuil hans.verk...@cisco.com Cc: Guennadi Liakhovetski g.liakhovet...@gmx.de Cc: Scott Jiang scott.jiang.li...@gmail.com Cc: Jonathan Corbet cor...@lwn.net Cc: Kamil Debski k.deb...@samsung.com --- drivers/media/i2c/adv7183.c| 15 drivers/media/i2c/vs6624.c | 15 drivers/media/platform/blackfin/bfin_capture.c | 17 +- For these patches, Acked-by: Scott Jiang scott.jiang.li...@gmail.com -- To unsubscribe from this list: send the line unsubscribe linux-media in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH 1/7] v4l2: replace enum_mbus_fmt by enum_mbus_code
Hi Hans, Thanks for the patch. On Thu, Apr 9, 2015 at 11:21 AM, Hans Verkuil hverk...@xs4all.nl wrote: From: Hans Verkuil hans.verk...@cisco.com Replace all calls to the enum_mbus_fmt video op by the pad enum_mbus_code op and remove the duplicate video op. Signed-off-by: Hans Verkuil hans.verk...@cisco.com Cc: Guennadi Liakhovetski g.liakhovet...@gmx.de Cc: Scott Jiang scott.jiang.li...@gmail.com Cc: Jonathan Corbet cor...@lwn.net Cc: Kamil Debski k.deb...@samsung.com --- drivers/media/i2c/adv7170.c| 15 drivers/media/i2c/adv7175.c| 15 drivers/media/i2c/adv7183.c| 15 drivers/media/i2c/adv7842.c| 11 + drivers/media/i2c/ak881x.c | 15 drivers/media/i2c/ml86v7667.c | 15 drivers/media/i2c/mt9v011.c| 15 drivers/media/i2c/ov7670.c | 11 + drivers/media/i2c/soc_camera/imx074.c | 16 + drivers/media/i2c/soc_camera/mt9m001.c | 15 drivers/media/i2c/soc_camera/mt9m111.c | 15 drivers/media/i2c/soc_camera/mt9t031.c | 15 drivers/media/i2c/soc_camera/mt9t112.c | 15 drivers/media/i2c/soc_camera/mt9v022.c | 15 drivers/media/i2c/soc_camera/ov2640.c | 15 drivers/media/i2c/soc_camera/ov5642.c | 15 drivers/media/i2c/soc_camera/ov6650.c | 15 drivers/media/i2c/soc_camera/ov772x.c | 15 drivers/media/i2c/soc_camera/ov9640.c | 15 drivers/media/i2c/soc_camera/ov9740.c | 19 +-- drivers/media/i2c/soc_camera/rj54n1cb0c.c | 15 drivers/media/i2c/soc_camera/tw9910.c | 15 drivers/media/i2c/sr030pc30.c | 16 + drivers/media/i2c/tvp514x.c| 20 drivers/media/i2c/tvp7002.c| 20 For the above 2, Acked-by: Lad, Prabhakar prabhakar.cse...@gmail.com Cheers, --Prabhakar Lad drivers/media/i2c/vs6624.c | 15 drivers/media/platform/blackfin/bfin_capture.c | 17 +- drivers/media/platform/soc_camera/atmel-isi.c | 19 --- drivers/media/platform/soc_camera/mx2_camera.c | 27 -- drivers/media/platform/soc_camera/mx3_camera.c | 23 ++ drivers/media/platform/soc_camera/omap1_camera.c | 21 + drivers/media/platform/soc_camera/pxa_camera.c | 19 --- drivers/media/platform/soc_camera/rcar_vin.c | 19 --- .../platform/soc_camera/sh_mobile_ceu_camera.c | 19 --- drivers/media/platform/soc_camera/soc_camera.c | 15 .../platform/soc_camera/soc_camera_platform.c | 15 include/media/v4l2-subdev.h| 4 38 files changed, 361 insertions(+), 250 deletions(-) diff --git a/drivers/media/i2c/adv7170.c b/drivers/media/i2c/adv7170.c index 40a1a95..cfe963b 100644 --- a/drivers/media/i2c/adv7170.c +++ b/drivers/media/i2c/adv7170.c @@ -262,13 +262,14 @@ static int adv7170_s_routing(struct v4l2_subdev *sd, return 0; } -static int adv7170_enum_fmt(struct v4l2_subdev *sd, unsigned int index, - u32 *code) +static int adv7170_enum_mbus_code(struct v4l2_subdev *sd, + struct v4l2_subdev_pad_config *cfg, + struct v4l2_subdev_mbus_code_enum *code) { - if (index = ARRAY_SIZE(adv7170_codes)) + if (code-pad || code-index = ARRAY_SIZE(adv7170_codes)) return -EINVAL; - *code = adv7170_codes[index]; + code-code = adv7170_codes[code-index]; return 0; } @@ -323,11 +324,15 @@ static const struct v4l2_subdev_video_ops adv7170_video_ops = { .s_routing = adv7170_s_routing, .s_mbus_fmt = adv7170_s_fmt, .g_mbus_fmt = adv7170_g_fmt, - .enum_mbus_fmt = adv7170_enum_fmt, +}; + +static const struct v4l2_subdev_pad_ops adv7170_pad_ops = { + .enum_mbus_code = adv7170_enum_mbus_code, }; static const struct v4l2_subdev_ops adv7170_ops = { .video = adv7170_video_ops, + .pad = adv7170_pad_ops, }; /* --- */ diff --git a/drivers/media/i2c/adv7175.c b/drivers/media/i2c/adv7175.c index d220af5..3f40304 100644 --- a/drivers/media/i2c/adv7175.c +++ b/drivers/media/i2c/adv7175.c @@ -300,13 +300,14 @@ static int adv7175_s_routing(struct v4l2_subdev *sd, return 0; }
Re: [PATCH 1/7] v4l2: replace enum_mbus_fmt by enum_mbus_code
On Thu, 9 Apr 2015, Hans Verkuil wrote: From: Hans Verkuil hans.verk...@cisco.com Replace all calls to the enum_mbus_fmt video op by the pad enum_mbus_code op and remove the duplicate video op. Signed-off-by: Hans Verkuil hans.verk...@cisco.com Cc: Guennadi Liakhovetski g.liakhovet...@gmx.de Cc: Scott Jiang scott.jiang.li...@gmail.com Cc: Jonathan Corbet cor...@lwn.net Cc: Kamil Debski k.deb...@samsung.com --- [snip] diff --git a/drivers/media/i2c/soc_camera/mt9m111.c b/drivers/media/i2c/soc_camera/mt9m111.c index 441e0fd..ef8682c 100644 --- a/drivers/media/i2c/soc_camera/mt9m111.c +++ b/drivers/media/i2c/soc_camera/mt9m111.c @@ -839,13 +839,14 @@ static struct v4l2_subdev_core_ops mt9m111_subdev_core_ops = { #endif }; -static int mt9m111_enum_fmt(struct v4l2_subdev *sd, unsigned int index, - u32 *code) +static int mt9m111_enum_mbus_code(struct v4l2_subdev *sd, + struct v4l2_subdev_pad_config *cfg, + struct v4l2_subdev_mbus_code_enum *code) { - if (index = ARRAY_SIZE(mt9m111_colour_fmts)) + if (code-code || code-index = ARRAY_SIZE(mt9m111_colour_fmts)) Didn't you mean + if (code-pad || code-index = ARRAY_SIZE(mt9m111_colour_fmts)) ? return -EINVAL; - *code = mt9m111_colour_fmts[index].code; + code-code = mt9m111_colour_fmts[code-index].code; return 0; } @@ -871,13 +872,17 @@ static struct v4l2_subdev_video_ops mt9m111_subdev_video_ops = { .s_crop = mt9m111_s_crop, .g_crop = mt9m111_g_crop, .cropcap= mt9m111_cropcap, - .enum_mbus_fmt = mt9m111_enum_fmt, .g_mbus_config = mt9m111_g_mbus_config, }; +static const struct v4l2_subdev_pad_ops mt9m111_subdev_pad_ops = { + .enum_mbus_code = mt9m111_enum_mbus_code, +}; + static struct v4l2_subdev_ops mt9m111_subdev_ops = { .core = mt9m111_subdev_core_ops, .video = mt9m111_subdev_video_ops, + .pad= mt9m111_subdev_pad_ops, }; /* [snip] Apart from that for soc-camera: Acked-by: Guennadi Liakhovetski g.liakhovet...@gmx.de Thanks Guennadi -- To unsubscribe from this list: send the line unsubscribe linux-media in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH 1/7] v4l2: replace enum_mbus_fmt by enum_mbus_code
From: Hans Verkuil hans.verk...@cisco.com Replace all calls to the enum_mbus_fmt video op by the pad enum_mbus_code op and remove the duplicate video op. Signed-off-by: Hans Verkuil hans.verk...@cisco.com Cc: Guennadi Liakhovetski g.liakhovet...@gmx.de Cc: Scott Jiang scott.jiang.li...@gmail.com Cc: Jonathan Corbet cor...@lwn.net Cc: Kamil Debski k.deb...@samsung.com --- drivers/media/i2c/adv7170.c| 15 drivers/media/i2c/adv7175.c| 15 drivers/media/i2c/adv7183.c| 15 drivers/media/i2c/adv7842.c| 11 + drivers/media/i2c/ak881x.c | 15 drivers/media/i2c/ml86v7667.c | 15 drivers/media/i2c/mt9v011.c| 15 drivers/media/i2c/ov7670.c | 11 + drivers/media/i2c/soc_camera/imx074.c | 16 + drivers/media/i2c/soc_camera/mt9m001.c | 15 drivers/media/i2c/soc_camera/mt9m111.c | 15 drivers/media/i2c/soc_camera/mt9t031.c | 15 drivers/media/i2c/soc_camera/mt9t112.c | 15 drivers/media/i2c/soc_camera/mt9v022.c | 15 drivers/media/i2c/soc_camera/ov2640.c | 15 drivers/media/i2c/soc_camera/ov5642.c | 15 drivers/media/i2c/soc_camera/ov6650.c | 15 drivers/media/i2c/soc_camera/ov772x.c | 15 drivers/media/i2c/soc_camera/ov9640.c | 15 drivers/media/i2c/soc_camera/ov9740.c | 19 +-- drivers/media/i2c/soc_camera/rj54n1cb0c.c | 15 drivers/media/i2c/soc_camera/tw9910.c | 15 drivers/media/i2c/sr030pc30.c | 16 + drivers/media/i2c/tvp514x.c| 20 drivers/media/i2c/tvp5150.c| 15 drivers/media/i2c/tvp7002.c| 20 drivers/media/i2c/vs6624.c | 15 drivers/media/platform/blackfin/bfin_capture.c | 17 +- drivers/media/platform/soc_camera/atmel-isi.c | 19 --- drivers/media/platform/soc_camera/mx2_camera.c | 27 -- drivers/media/platform/soc_camera/mx3_camera.c | 23 ++ drivers/media/platform/soc_camera/omap1_camera.c | 21 + drivers/media/platform/soc_camera/pxa_camera.c | 19 --- drivers/media/platform/soc_camera/rcar_vin.c | 19 --- .../platform/soc_camera/sh_mobile_ceu_camera.c | 19 --- drivers/media/platform/soc_camera/soc_camera.c | 15 .../platform/soc_camera/soc_camera_platform.c | 15 include/media/v4l2-subdev.h| 4 38 files changed, 361 insertions(+), 250 deletions(-) diff --git a/drivers/media/i2c/adv7170.c b/drivers/media/i2c/adv7170.c index 40a1a95..cfe963b 100644 --- a/drivers/media/i2c/adv7170.c +++ b/drivers/media/i2c/adv7170.c @@ -262,13 +262,14 @@ static int adv7170_s_routing(struct v4l2_subdev *sd, return 0; } -static int adv7170_enum_fmt(struct v4l2_subdev *sd, unsigned int index, - u32 *code) +static int adv7170_enum_mbus_code(struct v4l2_subdev *sd, + struct v4l2_subdev_pad_config *cfg, + struct v4l2_subdev_mbus_code_enum *code) { - if (index = ARRAY_SIZE(adv7170_codes)) + if (code-pad || code-index = ARRAY_SIZE(adv7170_codes)) return -EINVAL; - *code = adv7170_codes[index]; + code-code = adv7170_codes[code-index]; return 0; } @@ -323,11 +324,15 @@ static const struct v4l2_subdev_video_ops adv7170_video_ops = { .s_routing = adv7170_s_routing, .s_mbus_fmt = adv7170_s_fmt, .g_mbus_fmt = adv7170_g_fmt, - .enum_mbus_fmt = adv7170_enum_fmt, +}; + +static const struct v4l2_subdev_pad_ops adv7170_pad_ops = { + .enum_mbus_code = adv7170_enum_mbus_code, }; static const struct v4l2_subdev_ops adv7170_ops = { .video = adv7170_video_ops, + .pad = adv7170_pad_ops, }; /* --- */ diff --git a/drivers/media/i2c/adv7175.c b/drivers/media/i2c/adv7175.c index d220af5..3f40304 100644 --- a/drivers/media/i2c/adv7175.c +++ b/drivers/media/i2c/adv7175.c @@ -300,13 +300,14 @@ static int adv7175_s_routing(struct v4l2_subdev *sd, return 0; } -static int adv7175_enum_fmt(struct v4l2_subdev *sd, unsigned int index, - u32 *code) +static int adv7175_enum_mbus_code(struct v4l2_subdev *sd, + struct v4l2_subdev_pad_config