]> Pileus Git - ~andy/linux/commitdiff
[media] radio-shark*: Remove work-around for dangling pointer in usb intfdata
authorHans de Goede <hdegoede@redhat.com>
Sat, 11 Aug 2012 09:34:52 +0000 (06:34 -0300)
committerMauro Carvalho Chehab <mchehab@redhat.com>
Sun, 12 Aug 2012 16:49:19 +0000 (13:49 -0300)
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 <hdegoede@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
drivers/media/radio/radio-shark.c
drivers/media/radio/radio-shark2.c

index d0b6bb507634a5756e7c5d6335a42f8da2b0d90f..e35b8d938a3015df036fed06bbd5e6e2587ad610 100644 (file)
@@ -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);
index b9575de3e7e8306d5f9cdf6fa6efbd2b74c0984d..fc0289d5da4e6bb8fcc21a585ba61481dba3508b 100644 (file)
@@ -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);