diff options
author | Janne Grunau <j@jannau.net> | 2009-03-24 00:18:54 +0300 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2009-03-30 19:43:32 +0400 |
commit | c457377a3a18117aa99653f3715d81960a1c6bda (patch) | |
tree | 9ce1c8db8a3464727701e84190bc43815b78eadd /drivers/media/video/hdpvr/hdpvr-core.c | |
parent | 235d0ff2874091981c482d71bbce8b7c30cbc3b3 (diff) | |
download | linux-c457377a3a18117aa99653f3715d81960a1c6bda.tar.xz |
V4L/DVB (11152): hdpvr: Fix build with Config_I2C not set
Signed-off-by: Janne Grunau <j@jannau.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/video/hdpvr/hdpvr-core.c')
-rw-r--r-- | drivers/media/video/hdpvr/hdpvr-core.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/drivers/media/video/hdpvr/hdpvr-core.c b/drivers/media/video/hdpvr/hdpvr-core.c index 1c93589bf595..e96aed42d192 100644 --- a/drivers/media/video/hdpvr/hdpvr-core.c +++ b/drivers/media/video/hdpvr/hdpvr-core.c @@ -348,6 +348,14 @@ static int hdpvr_probe(struct usb_interface *interface, goto error; } +#ifdef CONFIG_I2C + /* until i2c is working properly */ + retval = 0; /* hdpvr_register_i2c_adapter(dev); */ + if (retval < 0) { + err("registering i2c adapter failed"); + goto error; + } +#endif /* CONFIG_I2C */ /* save our data pointer in this interface device */ usb_set_intfdata(interface, dev); @@ -389,12 +397,14 @@ static void hdpvr_disconnect(struct usb_interface *interface) mutex_unlock(&dev->io_mutex); /* deregister I2C adapter */ +#ifdef CONFIG_I2C mutex_lock(&dev->i2c_mutex); if (dev->i2c_adapter) i2c_del_adapter(dev->i2c_adapter); kfree(dev->i2c_adapter); dev->i2c_adapter = NULL; mutex_unlock(&dev->i2c_mutex); +#endif /* CONFIG_I2C */ atomic_dec(&dev_nr); |