Commit 54dc9a82 authored by Greg Kroah-Hartman's avatar Greg Kroah-Hartman

[PATCH] USB core drivers: remove direct calls to dev_set* and dev_get*

change dev_set_drvdata() and dev_get_drvdata() to
usb_set_intfdata() and usb_get_intfdata()
parent 1048e635
......@@ -322,7 +322,7 @@ static int driver_probe (struct usb_interface *intf,
static void driver_disconnect(struct usb_interface *intf)
{
struct dev_state *ps = dev_get_drvdata (&intf->dev);
struct dev_state *ps = usb_get_intfdata (intf);
if (!ps)
return;
......@@ -333,7 +333,7 @@ static void driver_disconnect(struct usb_interface *intf)
/* prevent new I/O requests */
ps->dev = 0;
ps->ifclaimed = 0;
dev_set_drvdata (&intf->dev, NULL);
usb_set_intfdata (intf, NULL);
/* force async requests to complete */
destroy_all_async (ps);
......
......@@ -447,13 +447,13 @@ static int usb_hub_configure(struct usb_hub *hub,
static void hub_disconnect(struct usb_interface *intf)
{
struct usb_hub *hub = dev_get_drvdata (&intf->dev);
struct usb_hub *hub = usb_get_intfdata (intf);
unsigned long flags;
if (!hub)
return;
dev_set_drvdata (&intf->dev, NULL);
usb_set_intfdata (intf, NULL);
spin_lock_irqsave(&hub_event_lock, flags);
/* Delete it and then reset it */
......@@ -546,7 +546,7 @@ static int hub_probe(struct usb_interface *intf, const struct usb_device_id *id)
list_add(&hub->hub_list, &hub_list);
spin_unlock_irqrestore(&hub_event_lock, flags);
dev_set_drvdata (&intf->dev, hub);
usb_set_intfdata (intf, hub);
if (usb_hub_configure(hub, endpoint) >= 0) {
strcpy (intf->dev.name, "Hub");
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment