aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/video
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/media/video')
-rw-r--r--drivers/media/video/hdpvr/Makefile4
-rw-r--r--drivers/media/video/hdpvr/hdpvr-core.c10
2 files changed, 13 insertions, 1 deletions
diff --git a/drivers/media/video/hdpvr/Makefile b/drivers/media/video/hdpvr/Makefile
index 79ad2e16cb8f..e0230fcb2e36 100644
--- a/drivers/media/video/hdpvr/Makefile
+++ b/drivers/media/video/hdpvr/Makefile
@@ -1,4 +1,6 @@
1hdpvr-objs := hdpvr-control.o hdpvr-core.o hdpvr-i2c.o hdpvr-video.o 1hdpvr-objs := hdpvr-control.o hdpvr-core.o hdpvr-video.o
2
3hdpvr-$(CONFIG_I2C) += hdpvr-i2c.o
2 4
3obj-$(CONFIG_VIDEO_HDPVR) += hdpvr.o 5obj-$(CONFIG_VIDEO_HDPVR) += hdpvr.o
4 6
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,
348 goto error; 348 goto error;
349 } 349 }
350 350
351#ifdef CONFIG_I2C
352 /* until i2c is working properly */
353 retval = 0; /* hdpvr_register_i2c_adapter(dev); */
354 if (retval < 0) {
355 err("registering i2c adapter failed");
356 goto error;
357 }
358#endif /* CONFIG_I2C */
351 359
352 /* save our data pointer in this interface device */ 360 /* save our data pointer in this interface device */
353 usb_set_intfdata(interface, dev); 361 usb_set_intfdata(interface, dev);
@@ -389,12 +397,14 @@ static void hdpvr_disconnect(struct usb_interface *interface)
389 mutex_unlock(&dev->io_mutex); 397 mutex_unlock(&dev->io_mutex);
390 398
391 /* deregister I2C adapter */ 399 /* deregister I2C adapter */
400#ifdef CONFIG_I2C
392 mutex_lock(&dev->i2c_mutex); 401 mutex_lock(&dev->i2c_mutex);
393 if (dev->i2c_adapter) 402 if (dev->i2c_adapter)
394 i2c_del_adapter(dev->i2c_adapter); 403 i2c_del_adapter(dev->i2c_adapter);
395 kfree(dev->i2c_adapter); 404 kfree(dev->i2c_adapter);
396 dev->i2c_adapter = NULL; 405 dev->i2c_adapter = NULL;
397 mutex_unlock(&dev->i2c_mutex); 406 mutex_unlock(&dev->i2c_mutex);
407#endif /* CONFIG_I2C */
398 408
399 atomic_dec(&dev_nr); 409 atomic_dec(&dev_nr);
400 410