• Mauro Carvalho Chehab's avatar
    [media] ov2659: Don't depend on subdev API · fa8cb644
    Mauro Carvalho Chehab authored
    The subdev API is optional. No driver should depend on it.
    
    Avoid compilation breakages if subdev API is not selected:
    
    drivers/media/i2c/ov2659.c: In function ‘ov2659_get_fmt’:
    drivers/media/i2c/ov2659.c:1054:3: error: implicit declaration of function ‘v4l2_subdev_get_try_format’ [-Werror=implicit-function-declaration]
       mf = v4l2_subdev_get_try_format(sd, cfg, 0);
       ^
    drivers/media/i2c/ov2659.c:1054:6: warning: assignment makes pointer from integer without a cast
       mf = v4l2_subdev_get_try_format(sd, cfg, 0);
          ^
    drivers/media/i2c/ov2659.c: In function ‘ov2659_set_fmt’:
    drivers/media/i2c/ov2659.c:1129:6: warning: assignment makes pointer from integer without a cast
       mf = v4l2_subdev_get_try_format(sd, cfg, fmt->pad);
          ^
    drivers/media/i2c/ov2659.c: In function ‘ov2659_open’:
    drivers/media/i2c/ov2659.c:1264:38: error: ‘struct v4l2_subdev_fh’ has no member named ‘pad’
         v4l2_subdev_get_try_format(sd, fh->pad, 0);
                                          ^
    Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@osg.samsung.com>
    Tested-by: default avatarLad, Prabhakar <prabhakar.csengg@gmail.com>
    fa8cb644
ov2659.c 36.2 KB