Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 138261
b: refs/heads/master
c: c457377
h: refs/heads/master
i:
  138259: 27e50f7
v: v3
  • Loading branch information
Janne Grunau authored and Mauro Carvalho Chehab committed Mar 30, 2009
1 parent 27bf632 commit b39d611
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 2 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 235d0ff2874091981c482d71bbce8b7c30cbc3b3
refs/heads/master: c457377a3a18117aa99653f3715d81960a1c6bda
4 changes: 3 additions & 1 deletion trunk/drivers/media/video/hdpvr/Makefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
hdpvr-objs := hdpvr-control.o hdpvr-core.o hdpvr-i2c.o hdpvr-video.o
hdpvr-objs := hdpvr-control.o hdpvr-core.o hdpvr-video.o

hdpvr-$(CONFIG_I2C) += hdpvr-i2c.o

obj-$(CONFIG_VIDEO_HDPVR) += hdpvr.o

Expand Down
10 changes: 10 additions & 0 deletions trunk/drivers/media/video/hdpvr/hdpvr-core.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -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);

Expand Down

0 comments on commit b39d611

Please sign in to comment.