From: Hans de Goede <hdegoede@redhat.com>
To: Linux Media Mailing List <linux-media@vger.kernel.org>
Cc: Mauro Carvalho Chehab <mchehab@infradead.org>,
David Rientjes <rientjes@google.com>,
linux-kernel@vger.kernel.org, Hans de Goede <hdegoede@redhat.com>
Subject: [PATCH 1/4] radio-shark*: Remove work-around for dangling pointer in usb intfdata
Date: Sat, 11 Aug 2012 12:34:52 +0200 [thread overview]
Message-ID: <1344681295-2485-2-git-send-email-hdegoede@redhat.com> (raw)
In-Reply-To: <1344681295-2485-1-git-send-email-hdegoede@redhat.com>
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>
---
drivers/media/radio/radio-shark.c | 9 ---------
drivers/media/radio/radio-shark2.c | 9 ---------
2 files changed, 18 deletions(-)
diff --git a/drivers/media/radio/radio-shark.c b/drivers/media/radio/radio-shark.c
index c2ead23..6117132 100644
--- a/drivers/media/radio/radio-shark.c
+++ b/drivers/media/radio/radio-shark.c
@@ -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);
diff --git a/drivers/media/radio/radio-shark2.c b/drivers/media/radio/radio-shark2.c
index b9575de..fc0289d 100644
--- a/drivers/media/radio/radio-shark2.c
+++ b/drivers/media/radio/radio-shark2.c
@@ -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);
--
1.7.11.4
next prev parent reply other threads:[~2012-08-11 10:34 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-08-11 10:34 [PATCH 0/4] radio-shark*: Only compile led support when CONFIG_LED_CLA Hans de Goede
2012-08-11 10:34 ` Hans de Goede [this message]
2012-08-11 10:34 ` [PATCH 2/4] radio-shark*: Call cancel_work_sync from disconnect rather then release Hans de Goede
2012-08-11 10:34 ` [PATCH 3/4] radio-shark: Only compile led support when CONFIG_LED_CLASS is set Hans de Goede
2012-08-11 10:34 ` [PATCH 4/4] radio-shark2: " Hans de Goede
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1344681295-2485-2-git-send-email-hdegoede@redhat.com \
--to=hdegoede@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-media@vger.kernel.org \
--cc=mchehab@infradead.org \
--cc=rientjes@google.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®