ChangeSet 1.963, 2002/12/27 15:03:18-08:00, greg@kroah.com [PATCH] USB class 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() diff -Nru a/drivers/usb/class/audio.c b/drivers/usb/class/audio.c --- a/drivers/usb/class/audio.c Fri Dec 27 23:56:03 2002 +++ b/drivers/usb/class/audio.c Fri Dec 27 23:56:03 2002 @@ -3815,7 +3815,7 @@ } s = usb_audio_parsecontrol(dev, buffer, buflen, intf->altsetting->desc.bInterfaceNumber); if (s) { - dev_set_drvdata (&intf->dev, s); + usb_set_intfdata (intf, s); return 0; } return -ENODEV; @@ -3826,7 +3826,7 @@ static void usb_audio_disconnect(struct usb_interface *intf) { - struct usb_audio_state *s = dev_get_drvdata (&intf->dev); + struct usb_audio_state *s = usb_get_intfdata (intf); struct list_head *list; struct usb_audiodev *as; struct usb_mixerdev *ms; @@ -3846,7 +3846,7 @@ down(&open_sem); list_del_init(&s->audiodev); s->usbdev = NULL; - dev_set_drvdata (&intf->dev, NULL); + usb_set_intfdata (intf, NULL); /* deregister all audio and mixer devices, so no new processes can open this device */ for(list = s->audiolist.next; list != &s->audiolist; list = list->next) { diff -Nru a/drivers/usb/class/bluetty.c b/drivers/usb/class/bluetty.c --- a/drivers/usb/class/bluetty.c Fri Dec 27 23:56:03 2002 +++ b/drivers/usb/class/bluetty.c Fri Dec 27 23:56:03 2002 @@ -1207,7 +1207,7 @@ bluetooth_table[minor] = bluetooth; /* success */ - dev_set_drvdata (&intf->dev, bluetooth); + usb_set_intfdata (intf, bluetooth); return 0; probe_error: @@ -1243,10 +1243,10 @@ static void usb_bluetooth_disconnect(struct usb_interface *intf) { - struct usb_bluetooth *bluetooth = dev_get_drvdata (&intf->dev); + struct usb_bluetooth *bluetooth = usb_get_intfdata (intf); int i; - dev_set_drvdata (&intf->dev, NULL); + usb_set_intfdata (intf, NULL); if (bluetooth) { if ((bluetooth->open_count) && (bluetooth->tty)) tty_hangup(bluetooth->tty); diff -Nru a/drivers/usb/class/cdc-acm.c b/drivers/usb/class/cdc-acm.c --- a/drivers/usb/class/cdc-acm.c Fri Dec 27 23:56:03 2002 +++ b/drivers/usb/class/cdc-acm.c Fri Dec 27 23:56:03 2002 @@ -652,7 +652,7 @@ tty_register_devfs(&acm_tty_driver, 0, minor); acm_table[minor] = acm; - dev_set_drvdata (&intf->dev, acm); + usb_set_intfdata (intf, acm); return 0; } @@ -661,7 +661,7 @@ static void acm_disconnect(struct usb_interface *intf) { - struct acm *acm = dev_get_drvdata (&intf->dev); + struct acm *acm = usb_get_intfdata (intf); if (!acm || !acm->dev) { dbg("disconnect on nonexisting interface"); @@ -669,7 +669,7 @@ } acm->dev = NULL; - dev_set_drvdata (&intf->dev, NULL); + usb_set_intfdata (intf, NULL); usb_unlink_urb(acm->ctrlurb); usb_unlink_urb(acm->readurb); diff -Nru a/drivers/usb/class/usb-midi.c b/drivers/usb/class/usb-midi.c --- a/drivers/usb/class/usb-midi.c Fri Dec 27 23:56:03 2002 +++ b/drivers/usb/class/usb-midi.c Fri Dec 27 23:56:03 2002 @@ -2056,14 +2056,14 @@ MOD_INC_USE_COUNT; #endif - dev_set_drvdata (&intf->dev, s); + usb_set_intfdata (intf, s); return 0; } static void usb_midi_disconnect(struct usb_interface *intf) { - struct usb_midi_state *s = dev_get_drvdata (&intf->dev); + struct usb_midi_state *s = usb_get_intfdata (intf); struct list_head *list; struct usb_mididev *m; @@ -2080,7 +2080,7 @@ list_del(&s->mididev); INIT_LIST_HEAD(&s->mididev); s->usbdev = NULL; - dev_set_drvdata (&intf->dev, NULL); + usb_set_intfdata (intf, NULL); for ( list = s->midiDevList.next; list != &s->midiDevList; list = list->next ) { m = list_entry(list, struct usb_mididev, list); diff -Nru a/drivers/usb/class/usblp.c b/drivers/usb/class/usblp.c --- a/drivers/usb/class/usblp.c Fri Dec 27 23:56:03 2002 +++ b/drivers/usb/class/usblp.c Fri Dec 27 23:56:03 2002 @@ -338,7 +338,7 @@ if (!intf) { goto out; } - usblp = dev_get_drvdata (&intf->dev); + usblp = usb_get_intfdata (intf); if (!usblp || !usblp->dev) goto out; @@ -923,7 +923,7 @@ usblp->current_protocol, usblp->dev->descriptor.idVendor, usblp->dev->descriptor.idProduct); - dev_set_drvdata (&intf->dev, usblp); + usb_set_intfdata (intf, usblp); /* add device id so the device works when advertised */ intf->kdev = mk_kdev(USB_MAJOR,usblp->minor); @@ -1110,7 +1110,7 @@ static void usblp_disconnect(struct usb_interface *intf) { - struct usblp *usblp = dev_get_drvdata (&intf->dev); + struct usblp *usblp = usb_get_intfdata (intf); /* remove device id to disable open() */ intf->kdev = NODEV; @@ -1123,7 +1123,7 @@ down (&usblp->sem); lock_kernel(); usblp->dev = NULL; - dev_set_drvdata (&intf->dev, NULL); + usb_set_intfdata (intf, NULL); usblp_unlink_urbs(usblp);