Commit 159863d3 authored by Greg Kroah-Hartman's avatar Greg Kroah-Hartman

[PATCH] USB drivers outside /drivers/usb: 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 602470cd
...@@ -763,7 +763,7 @@ int hci_usb_probe(struct usb_interface *intf, const struct usb_device_id *id) ...@@ -763,7 +763,7 @@ int hci_usb_probe(struct usb_interface *intf, const struct usb_device_id *id)
goto probe_error; goto probe_error;
} }
dev_set_drvdata(&intf->dev, husb); usb_set_intfdata(intf, husb);
return 0; return 0;
probe_error: probe_error:
...@@ -775,12 +775,12 @@ int hci_usb_probe(struct usb_interface *intf, const struct usb_device_id *id) ...@@ -775,12 +775,12 @@ int hci_usb_probe(struct usb_interface *intf, const struct usb_device_id *id)
static void hci_usb_disconnect(struct usb_interface *intf) static void hci_usb_disconnect(struct usb_interface *intf)
{ {
struct hci_usb *husb = dev_get_drvdata(&intf->dev); struct hci_usb *husb = usb_get_intfdata(intf);
struct hci_dev *hdev; struct hci_dev *hdev;
if (!husb) if (!husb)
return; return;
dev_set_drvdata(&intf->dev, NULL); usb_set_intfdata(intf, NULL);
hdev = &husb->hdev; hdev = &husb->hdev;
BT_DBG("%s", hdev->name); BT_DBG("%s", hdev->name);
......
...@@ -174,7 +174,7 @@ static int iforce_usb_probe(struct usb_interface *intf, ...@@ -174,7 +174,7 @@ static int iforce_usb_probe(struct usb_interface *intf,
if (iforce_init_device(iforce)) goto fail; if (iforce_init_device(iforce)) goto fail;
dev_set_drvdata (&intf->dev, iforce); usb_set_intfdata(intf, iforce);
return 0; return 0;
fail: fail:
...@@ -203,10 +203,10 @@ void iforce_usb_delete(struct iforce* iforce) ...@@ -203,10 +203,10 @@ void iforce_usb_delete(struct iforce* iforce)
static void iforce_usb_disconnect(struct usb_interface *intf) static void iforce_usb_disconnect(struct usb_interface *intf)
{ {
struct iforce *iforce = dev_get_drvdata (&intf->dev); struct iforce *iforce = usb_get_intfdata(intf);
int open = 0; /* FIXME! iforce->dev.handle->open; */ int open = 0; /* FIXME! iforce->dev.handle->open; */
dev_set_drvdata (&intf->dev, NULL); usb_set_intfdata(intf, NULL);
if (iforce) { if (iforce) {
iforce->usbdev = NULL; iforce->usbdev = NULL;
input_unregister_device(&iforce->dev); input_unregister_device(&iforce->dev);
......
...@@ -114,7 +114,7 @@ static int probe_st5481(struct usb_interface *intf, ...@@ -114,7 +114,7 @@ static int probe_st5481(struct usb_interface *intf,
hisax_register(&adapter->hisax_d_if, b_if, "st5481_usb", protocol); hisax_register(&adapter->hisax_d_if, b_if, "st5481_usb", protocol);
st5481_start(adapter); st5481_start(adapter);
dev_set_drvdata(&intf->dev, adapter); usb_set_intfdata(intf, adapter);
return 0; return 0;
err_b: err_b:
...@@ -133,11 +133,11 @@ static int probe_st5481(struct usb_interface *intf, ...@@ -133,11 +133,11 @@ static int probe_st5481(struct usb_interface *intf,
*/ */
static void disconnect_st5481(struct usb_interface *intf) static void disconnect_st5481(struct usb_interface *intf)
{ {
struct st5481_adapter *adapter = dev_get_drvdata(&intf->dev); struct st5481_adapter *adapter = usb_get_intfdata(intf);
DBG(1,""); DBG(1,"");
dev_set_drvdata(&intf->dev, NULL); usb_set_intfdata(intf, NULL);
if (!adapter) if (!adapter)
return; return;
......
...@@ -552,7 +552,7 @@ static int cpia_probe(struct usb_interface *intf, ...@@ -552,7 +552,7 @@ static int cpia_probe(struct usb_interface *intf,
cpia_add_to_list(&cam_list, &cam); cpia_add_to_list(&cam_list, &cam);
spin_unlock( &cam_list_lock_usb ); spin_unlock( &cam_list_lock_usb );
dev_set_drvdata(&intf->dev, cam); usb_set_intfdata(intf, cam);
return 0; return 0;
fail_all: fail_all:
...@@ -593,11 +593,11 @@ static struct usb_driver cpia_driver = { ...@@ -593,11 +593,11 @@ static struct usb_driver cpia_driver = {
/* will do it for us as well as passing a udev structure - jerdfelt */ /* will do it for us as well as passing a udev structure - jerdfelt */
static void cpia_disconnect(struct usb_interface *intf) static void cpia_disconnect(struct usb_interface *intf)
{ {
struct cam_data *cam = dev_get_drvdata(&intf->dev); struct cam_data *cam = usb_get_intfdata(intf);
struct usb_cpia *ucpia; struct usb_cpia *ucpia;
struct usb_device *udev; struct usb_device *udev;
dev_set_drvdata(&intf->dev, NULL); usb_set_intfdata(intf, NULL);
if (!cam) if (!cam)
return; return;
......
...@@ -1524,7 +1524,7 @@ static int irda_usb_probe(struct usb_interface *intf, ...@@ -1524,7 +1524,7 @@ static int irda_usb_probe(struct usb_interface *intf,
if (ret) if (ret)
return -ENOMEM; return -ENOMEM;
dev_set_drvdata(&intf->dev, self); usb_set_intfdata(intf, self);
return 0; return 0;
} }
...@@ -1543,12 +1543,12 @@ static int irda_usb_probe(struct usb_interface *intf, ...@@ -1543,12 +1543,12 @@ static int irda_usb_probe(struct usb_interface *intf,
static void irda_usb_disconnect(struct usb_interface *intf) static void irda_usb_disconnect(struct usb_interface *intf)
{ {
unsigned long flags; unsigned long flags;
struct irda_usb_cb *self = dev_get_drvdata (&intf->dev); struct irda_usb_cb *self = usb_get_intfdata(intf);
int i; int i;
IRDA_DEBUG(1, "%s()\n", __FUNCTION__); IRDA_DEBUG(1, "%s()\n", __FUNCTION__);
dev_set_drvdata(&intf->dev, NULL); usb_set_intfdata(intf, NULL);
if (!self) if (!self)
return; return;
......
...@@ -2323,7 +2323,7 @@ static int usb_audio_probe(struct usb_interface *intf, ...@@ -2323,7 +2323,7 @@ static int usb_audio_probe(struct usb_interface *intf,
void *chip; void *chip;
chip = snd_usb_audio_probe(interface_to_usbdev(intf), intf, id); chip = snd_usb_audio_probe(interface_to_usbdev(intf), intf, id);
if (chip) { if (chip) {
dev_set_drvdata(&intf->dev, chip); usb_set_intfdata(intf, chip);
return 0; return 0;
} else } else
return -EIO; return -EIO;
...@@ -2332,7 +2332,7 @@ static int usb_audio_probe(struct usb_interface *intf, ...@@ -2332,7 +2332,7 @@ static int usb_audio_probe(struct usb_interface *intf,
static void usb_audio_disconnect(struct usb_interface *intf) static void usb_audio_disconnect(struct usb_interface *intf)
{ {
snd_usb_audio_disconnect(interface_to_usbdev(intf), snd_usb_audio_disconnect(interface_to_usbdev(intf),
dev_get_drvdata(&intf->dev)); usb_get_intfdata(intf));
} }
#endif #endif
......
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