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