summaryrefslogtreecommitdiff
path: root/linux/drivers/media/video/hdpvr/hdpvr-core.c
diff options
context:
space:
mode:
authorJanne Grunau <j@jannau.net>2009-03-23 22:18:54 +0100
committerJanne Grunau <j@jannau.net>2009-03-23 22:18:54 +0100
commit160a63ae7b94800a275bb2b0d5f78b2be4d91b16 (patch)
tree59c3bc9837adbdd5488e95da148f766b7f9e7541 /linux/drivers/media/video/hdpvr/hdpvr-core.c
parent67db6dc70c25afa359db09bf6ca885caebfb5a62 (diff)
downloadmediapointer-dvb-s2-160a63ae7b94800a275bb2b0d5f78b2be4d91b16.tar.gz
mediapointer-dvb-s2-160a63ae7b94800a275bb2b0d5f78b2be4d91b16.tar.bz2
hdpvr: Fix build with Config_I2C not set
From: Janne Grunau <j@jannau.net> Priority: normal Signed-off-by: Janne Grunau <j@jannau.net>
Diffstat (limited to 'linux/drivers/media/video/hdpvr/hdpvr-core.c')
-rw-r--r--linux/drivers/media/video/hdpvr/hdpvr-core.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/linux/drivers/media/video/hdpvr/hdpvr-core.c b/linux/drivers/media/video/hdpvr/hdpvr-core.c
index 4a2bbb72b..e96aed42d 100644
--- a/linux/drivers/media/video/hdpvr/hdpvr-core.c
+++ b/linux/drivers/media/video/hdpvr/hdpvr-core.c
@@ -348,13 +348,14 @@ static int hdpvr_probe(struct usb_interface *interface,
goto error;
}
-#if 0 /* until i2c is working properly */
- retval = hdpvr_register_i2c_adapter(dev);
+#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
+#endif /* CONFIG_I2C */
/* save our data pointer in this interface device */
usb_set_intfdata(interface, dev);
@@ -396,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);