Message ID | 1457361082-18855-1-git-send-email-geert+renesas@glider.be (mailing list archive) |
---|---|
State | Not Applicable |
Delegated to: | Geert Uytterhoeven |
Headers | show |
Hi Geert, Thank you for the patch. On Monday 07 March 2016 15:31:22 Geert Uytterhoeven wrote: > If CONFIG_VIDEO_V4L2_SUBDEV_API=n: > > drivers/media/v4l2-core/v4l2-subdev.c: In function 'subdev_open': > drivers/media/v4l2-core/v4l2-subdev.c:86:106: error: 'struct > v4l2_subdev_fh' has no member named 'pad' > > v4l2_subdev_fh.pad exists only if CONFIG_VIDEO_V4L2_SUBDEV_API is > enabled. > > Protect the call to v4l2_subdev_call() by an #ifdef to fix this. I've already applied the same fix (squashed with the commit that introduced the issue) to my tree. > Fixes: e1879dda1574a349 ("v4l: subdev: Call pad init_cfg operation when > opening subdevs") Signed-off-by: Geert Uytterhoeven > <geert+renesas@glider.be> > --- > Against git://linuxtv.org/pinchartl/fbdev.git vsp1-kms-request-20160306 > > drivers/media/v4l2-core/v4l2-subdev.c | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/drivers/media/v4l2-core/v4l2-subdev.c > b/drivers/media/v4l2-core/v4l2-subdev.c index > 68f3b4fb75cbf569..3fdd6c5f6aca1db7 100644 > --- a/drivers/media/v4l2-core/v4l2-subdev.c > +++ b/drivers/media/v4l2-core/v4l2-subdev.c > @@ -83,7 +83,9 @@ static int subdev_open(struct file *file) > } > #endif > > +#if defined(CONFIG_VIDEO_V4L2_SUBDEV_API) > v4l2_subdev_call(sd, pad, init_cfg, subdev_fh->pad); > +#endif > > if (sd->internal_ops && sd->internal_ops->open) { > ret = sd->internal_ops->open(sd, subdev_fh);
diff --git a/drivers/media/v4l2-core/v4l2-subdev.c b/drivers/media/v4l2-core/v4l2-subdev.c index 68f3b4fb75cbf569..3fdd6c5f6aca1db7 100644 --- a/drivers/media/v4l2-core/v4l2-subdev.c +++ b/drivers/media/v4l2-core/v4l2-subdev.c @@ -83,7 +83,9 @@ static int subdev_open(struct file *file) } #endif +#if defined(CONFIG_VIDEO_V4L2_SUBDEV_API) v4l2_subdev_call(sd, pad, init_cfg, subdev_fh->pad); +#endif if (sd->internal_ops && sd->internal_ops->open) { ret = sd->internal_ops->open(sd, subdev_fh);
If CONFIG_VIDEO_V4L2_SUBDEV_API=n: drivers/media/v4l2-core/v4l2-subdev.c: In function 'subdev_open': drivers/media/v4l2-core/v4l2-subdev.c:86:106: error: 'struct v4l2_subdev_fh' has no member named 'pad' v4l2_subdev_fh.pad exists only if CONFIG_VIDEO_V4L2_SUBDEV_API is enabled. Protect the call to v4l2_subdev_call() by an #ifdef to fix this. Fixes: e1879dda1574a349 ("v4l: subdev: Call pad init_cfg operation when opening subdevs") Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be> --- Against git://linuxtv.org/pinchartl/fbdev.git vsp1-kms-request-20160306 drivers/media/v4l2-core/v4l2-subdev.c | 2 ++ 1 file changed, 2 insertions(+)