diff options
author | Devin Heitmueller <dheitmueller@linuxtv.org> | 2009-04-28 13:14:07 -0300 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2009-04-29 16:02:51 -0300 |
commit | fe78a49c8ae009d33d6e2c80d4f7f2634440d523 (patch) | |
tree | ead4af63302bbf6790167789fa0778cc640466c9 /drivers/media | |
parent | d4dc673da9a94716ca2410306c1b36b5faf6c4cc (diff) | |
download | kernel_samsung_aries-fe78a49c8ae009d33d6e2c80d4f7f2634440d523.zip kernel_samsung_aries-fe78a49c8ae009d33d6e2c80d4f7f2634440d523.tar.gz kernel_samsung_aries-fe78a49c8ae009d33d6e2c80d4f7f2634440d523.tar.bz2 |
V4L/DVB (11652): au0828: fix kernel oops regression on USB disconnect.
A regression was introduced in hg changeset 33810c734a0d, which resulted in
a kernel panic whenever the device was disconnected from USB. The call to
4l2_device_register() was overwriting the pointer for usb_set_intfdata(), so
when au0828_usb_disconnect() was called, the usb_get_intfdata() returned a
pointer to the v4l2_device instead of the au0828_dev structure.
Signed-off-by: Devin Heitmueller <dheitmueller@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media')
-rw-r--r-- | drivers/media/video/au0828/au0828-core.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/media/video/au0828/au0828-core.c b/drivers/media/video/au0828/au0828-core.c index 4cee0b9..a1e4c0d 100644 --- a/drivers/media/video/au0828/au0828-core.c +++ b/drivers/media/video/au0828/au0828-core.c @@ -192,8 +192,6 @@ static int au0828_usb_probe(struct usb_interface *interface, dev->usbdev = usbdev; dev->boardnr = id->driver_info; - usb_set_intfdata(interface, dev); - /* Create the v4l2_device */ retval = v4l2_device_register(&interface->dev, &dev->v4l2_dev); if (retval) { @@ -222,6 +220,10 @@ static int au0828_usb_probe(struct usb_interface *interface, /* Digital TV */ au0828_dvb_register(dev); + /* Store the pointer to the au0828_dev so it can be accessed in + au0828_usb_disconnect */ + usb_set_intfdata(interface, dev); + printk(KERN_INFO "Registered device AU0828 [%s]\n", dev->board.name == NULL ? "Unset" : dev->board.name); |