Commit e1dc6e4f authored by Greg Kroah-Hartman's avatar Greg Kroah-Hartman

[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()
parent 4a7e569d
......@@ -3815,7 +3815,7 @@ static int usb_audio_probe(struct usb_interface *intf,
}
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 int usb_audio_probe(struct usb_interface *intf,
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 @@ static void usb_audio_disconnect(struct usb_interface *intf)
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) {
......
......@@ -1207,7 +1207,7 @@ static int usb_bluetooth_probe (struct usb_interface *intf,
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 int usb_bluetooth_probe (struct usb_interface *intf,
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);
......
......@@ -652,7 +652,7 @@ static int acm_probe (struct usb_interface *intf,
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 int acm_probe (struct usb_interface *intf,
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 @@ static void acm_disconnect(struct usb_interface *intf)
}
acm->dev = NULL;
dev_set_drvdata (&intf->dev, NULL);
usb_set_intfdata (intf, NULL);
usb_unlink_urb(acm->ctrlurb);
usb_unlink_urb(acm->readurb);
......
......@@ -2056,14 +2056,14 @@ static int usb_midi_probe(struct usb_interface *intf,
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 @@ static void usb_midi_disconnect(struct usb_interface *intf)
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);
......
......@@ -338,7 +338,7 @@ static int usblp_open(struct inode *inode, struct file *file)
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 @@ static int usblp_probe(struct usb_interface *intf,
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 int usblp_cache_device_id_string(struct usblp *usblp)
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 @@ static void usblp_disconnect(struct usb_interface *intf)
down (&usblp->sem);
lock_kernel();
usblp->dev = NULL;
dev_set_drvdata (&intf->dev, NULL);
usb_set_intfdata (intf, NULL);
usblp_unlink_urbs(usblp);
......
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