diff options
Diffstat (limited to 'linux/drivers/media/video/v4l2-device.c')
-rw-r--r-- | linux/drivers/media/video/v4l2-device.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/linux/drivers/media/video/v4l2-device.c b/linux/drivers/media/video/v4l2-device.c index b962862fe..4fa93189d 100644 --- a/linux/drivers/media/video/v4l2-device.c +++ b/linux/drivers/media/video/v4l2-device.c @@ -86,7 +86,8 @@ void v4l2_device_unregister(struct v4l2_device *v4l2_dev) /* Unregister subdevs */ list_for_each_entry_safe(sd, next, &v4l2_dev->subdevs, list) { v4l2_device_unregister_subdev(sd); -#if defined(CONFIG_I2C) || defined(CONFIG_I2C_MODULE) +#if defined(CONFIG_I2C) || (defined(CONFIG_I2C_MODULE) && defined(MODULE)) +#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 29) if (sd->flags & V4L2_SUBDEV_FL_IS_I2C) { struct i2c_client *client = v4l2_get_subdevdata(sd); @@ -98,6 +99,7 @@ void v4l2_device_unregister(struct v4l2_device *v4l2_dev) i2c_unregister_device(client); } #endif +#endif } } EXPORT_SYMBOL_GPL(v4l2_device_unregister); |