Skip to content

Commit

Permalink
[media] radio-shark*: Remove work-around for dangling pointer in usb …
Browse files Browse the repository at this point in the history
…intfdata

Recent kernels properly clear the usb intfdata pointer when another
driver fails to bind (in the radio-shark* case the usbhid driver would try
to bind first.

Signed-off-by: Hans de Goede <[email protected]>
Signed-off-by: Mauro Carvalho Chehab <[email protected]>
  • Loading branch information
jwrdegoede authored and Mauro Carvalho Chehab committed Aug 12, 2012
1 parent ac6eb45 commit 820ddfa
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 18 deletions.
9 changes: 0 additions & 9 deletions drivers/media/radio/radio-shark.c
Original file line number Diff line number Diff line change
Expand Up @@ -286,15 +286,6 @@ static int usb_shark_probe(struct usb_interface *intf,
if (!shark->transfer_buffer)
goto err_alloc_buffer;

/*
* Work around a bug in usbhid/hid-core.c, where it leaves a dangling
* pointer in intfdata causing v4l2-device.c to not set it. Which
* results in usb_shark_disconnect() referencing the dangling pointer
*
* REMOVE (as soon as the above bug is fixed, patch submitted)
*/
usb_set_intfdata(intf, NULL);

shark->v4l2_dev.release = usb_shark_release;
v4l2_device_set_name(&shark->v4l2_dev, DRV_NAME, &shark_instance);
retval = v4l2_device_register(&intf->dev, &shark->v4l2_dev);
Expand Down
9 changes: 0 additions & 9 deletions drivers/media/radio/radio-shark2.c
Original file line number Diff line number Diff line change
Expand Up @@ -258,15 +258,6 @@ static int usb_shark_probe(struct usb_interface *intf,
if (!shark->transfer_buffer)
goto err_alloc_buffer;

/*
* Work around a bug in usbhid/hid-core.c, where it leaves a dangling
* pointer in intfdata causing v4l2-device.c to not set it. Which
* results in usb_shark_disconnect() referencing the dangling pointer
*
* REMOVE (as soon as the above bug is fixed, patch submitted)
*/
usb_set_intfdata(intf, NULL);

shark->v4l2_dev.release = usb_shark_release;
v4l2_device_set_name(&shark->v4l2_dev, DRV_NAME, &shark_instance);
retval = v4l2_device_register(&intf->dev, &shark->v4l2_dev);
Expand Down

0 comments on commit 820ddfa

Please sign in to comment.