From 6f5d1d816e6bda52a698c98b2f96426eb68a42c4 Mon Sep 17 00:00:00 2001 From: Hans Verkuil Date: Sat, 6 Jun 2009 18:29:37 +0200 Subject: v4l2-device: fix incorrect kernel check From: Hans Verkuil i2c_unregister_device must be called on kernels >= 2.6.26, not just for kernels >= 2.6.29. Priority: normal Signed-off-by: Hans Verkuil --- linux/drivers/media/video/v4l2-device.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/linux/drivers/media/video/v4l2-device.c b/linux/drivers/media/video/v4l2-device.c index 18d404499..655d19cd6 100644 --- a/linux/drivers/media/video/v4l2-device.c +++ b/linux/drivers/media/video/v4l2-device.c @@ -87,7 +87,7 @@ void v4l2_device_unregister(struct v4l2_device *v4l2_dev) 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 LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 29) +#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 26) if (sd->flags & V4L2_SUBDEV_FL_IS_I2C) { struct i2c_client *client = v4l2_get_subdevdata(sd); -- cgit v1.2.3