ChangeSet 1.969, 2002/12/27 15:05:14-08:00, greg@kroah.com [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() diff -Nru a/drivers/bluetooth/hci_usb.c b/drivers/bluetooth/hci_usb.c --- a/drivers/bluetooth/hci_usb.c Fri Dec 27 23:55:31 2002 +++ b/drivers/bluetooth/hci_usb.c Fri Dec 27 23:55:31 2002 @@ -763,7 +763,7 @@ goto probe_error; } - dev_set_drvdata(&intf->dev, husb); + usb_set_intfdata(intf, husb); return 0; probe_error: @@ -775,12 +775,12 @@ 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); diff -Nru a/drivers/input/joystick/iforce/iforce-usb.c b/drivers/input/joystick/iforce/iforce-usb.c --- a/drivers/input/joystick/iforce/iforce-usb.c Fri Dec 27 23:55:31 2002 +++ b/drivers/input/joystick/iforce/iforce-usb.c Fri Dec 27 23:55:31 2002 @@ -174,7 +174,7 @@ 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 @@ 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); diff -Nru a/drivers/isdn/hisax/st5481_init.c b/drivers/isdn/hisax/st5481_init.c --- a/drivers/isdn/hisax/st5481_init.c Fri Dec 27 23:55:31 2002 +++ b/drivers/isdn/hisax/st5481_init.c Fri Dec 27 23:55:31 2002 @@ -114,7 +114,7 @@ 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 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; diff -Nru a/drivers/media/video/cpia_usb.c b/drivers/media/video/cpia_usb.c --- a/drivers/media/video/cpia_usb.c Fri Dec 27 23:55:30 2002 +++ b/drivers/media/video/cpia_usb.c Fri Dec 27 23:55:30 2002 @@ -552,7 +552,7 @@ 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 @@ /* 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; diff -Nru a/drivers/net/irda/irda-usb.c b/drivers/net/irda/irda-usb.c --- a/drivers/net/irda/irda-usb.c Fri Dec 27 23:55:30 2002 +++ b/drivers/net/irda/irda-usb.c Fri Dec 27 23:55:30 2002 @@ -1524,7 +1524,7 @@ if (ret) return -ENOMEM; - dev_set_drvdata(&intf->dev, self); + usb_set_intfdata(intf, self); return 0; } @@ -1543,12 +1543,12 @@ 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; diff -Nru a/sound/usb/usbaudio.c b/sound/usb/usbaudio.c --- a/sound/usb/usbaudio.c Fri Dec 27 23:55:30 2002 +++ b/sound/usb/usbaudio.c Fri Dec 27 23:55:31 2002 @@ -2323,7 +2323,7 @@ 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 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