ChangeSet 1.958, 2002/12/27 15:01:29-08:00, greg@kroah.com [PATCH] USB misc 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/misc/auerswald.c b/drivers/usb/misc/auerswald.c --- a/drivers/usb/misc/auerswald.c Fri Dec 27 23:56:29 2002 +++ b/drivers/usb/misc/auerswald.c Fri Dec 27 23:56:29 2002 @@ -2061,7 +2061,7 @@ } /* all OK */ - dev_set_drvdata (&intf->dev, cp); + usb_set_intfdata (intf, cp); return 0; /* Error exit: clean up the memory */ @@ -2085,10 +2085,10 @@ */ static void auerswald_disconnect (struct usb_interface *intf) { - pauerswald_t cp = dev_get_drvdata (&intf->dev); + pauerswald_t cp = usb_get_intfdata (intf); unsigned int u; - dev_set_drvdata (&intf->dev, NULL); + usb_set_intfdata (intf, NULL); if (!cp) return; diff -Nru a/drivers/usb/misc/brlvger.c b/drivers/usb/misc/brlvger.c --- a/drivers/usb/misc/brlvger.c Fri Dec 27 23:56:29 2002 +++ b/drivers/usb/misc/brlvger.c Fri Dec 27 23:56:29 2002 @@ -406,7 +406,7 @@ out: up(&reserve_sem); if (priv) { - dev_set_drvdata (&intf->dev, priv); + usb_set_intfdata (intf, priv); return 0; } return -EIO; @@ -415,10 +415,10 @@ static void brlvger_disconnect(struct usb_interface *intf) { - struct brlvger_priv *priv = dev_get_drvdata (&intf->dev); + struct brlvger_priv *priv = usb_get_intfdata (intf); int r; - dev_set_drvdata (&intf->dev, NULL); + usb_set_intfdata (intf, NULL); if(priv){ info("Display %d disconnecting", priv->subminor); diff -Nru a/drivers/usb/misc/rio500.c b/drivers/usb/misc/rio500.c --- a/drivers/usb/misc/rio500.c Fri Dec 27 23:56:29 2002 +++ b/drivers/usb/misc/rio500.c Fri Dec 27 23:56:29 2002 @@ -491,15 +491,15 @@ init_MUTEX(&(rio->lock)); - dev_set_drvdata (&intf->dev, rio); + usb_set_intfdata (intf, rio); return 0; } static void disconnect_rio(struct usb_interface *intf) { - struct rio_usb_data *rio = dev_get_drvdata (&intf->dev); + struct rio_usb_data *rio = usb_get_intfdata (intf); - dev_set_drvdata (&intf->dev, NULL); + usb_set_intfdata (intf, NULL); if (rio) { devfs_unregister(rio->devfs); usb_deregister_dev(1, rio->minor); diff -Nru a/drivers/usb/misc/speedtouch.c b/drivers/usb/misc/speedtouch.c --- a/drivers/usb/misc/speedtouch.c Fri Dec 27 23:56:29 2002 +++ b/drivers/usb/misc/speedtouch.c Fri Dec 27 23:56:29 2002 @@ -973,16 +973,16 @@ minor_data[instance->minor] = instance; - dev_set_drvdata (&intf->dev, instance); + usb_set_intfdata (intf, instance); return 0; } static void udsl_usb_disconnect (struct usb_interface *intf) { - struct udsl_instance_data *instance = dev_get_drvdata (&intf->dev); + struct udsl_instance_data *instance = usb_get_intfdata (intf); int i; - dev_set_drvdata (&intf->dev, NULL); + usb_set_intfdata (intf, NULL); if (instance) { i = instance->minor; /* unlinking receive buffers */ diff -Nru a/drivers/usb/misc/tiglusb.c b/drivers/usb/misc/tiglusb.c --- a/drivers/usb/misc/tiglusb.c Fri Dec 27 23:56:29 2002 +++ b/drivers/usb/misc/tiglusb.c Fri Dec 27 23:56:29 2002 @@ -383,7 +383,7 @@ dev->descriptor.bcdDevice >> 8, dev->descriptor.bcdDevice & 0xff); - dev_set_drvdata (&intf->dev, s); + usb_set_intfdata (intf, s); return 0; } @@ -392,9 +392,9 @@ { char name[32]; - ptiglusb_t s = dev_get_drvdata (&intf->dev); + ptiglusb_t s = usb_get_intfdata (intf); - dev_set_drvdata (&intf->dev, NULL); + usb_set_intfdata (intf, NULL); if (!s || !s->dev) { info ("bogus disconnect"); return; diff -Nru a/drivers/usb/misc/usblcd.c b/drivers/usb/misc/usblcd.c --- a/drivers/usb/misc/usblcd.c Fri Dec 27 23:56:29 2002 +++ b/drivers/usb/misc/usblcd.c Fri Dec 27 23:56:29 2002 @@ -290,15 +290,15 @@ } dbg("probe_lcd: ibuf address:%p", lcd->ibuf); - dev_set_drvdata (&intf->dev, lcd); + usb_set_intfdata (intf, lcd); return 0; } static void disconnect_lcd(struct usb_interface *intf) { - struct lcd_usb_data *lcd = dev_get_drvdata (&intf->dev); + struct lcd_usb_data *lcd = usb_get_intfdata (intf); - dev_set_drvdata (&intf->dev, NULL); + usb_set_intfdata (intf, NULL); if (lcd) { usb_deregister_dev(1, lcd->minor); diff -Nru a/drivers/usb/misc/usbtest.c b/drivers/usb/misc/usbtest.c --- a/drivers/usb/misc/usbtest.c Fri Dec 27 23:56:29 2002 +++ b/drivers/usb/misc/usbtest.c Fri Dec 27 23:56:29 2002 @@ -635,7 +635,7 @@ static int usbtest_ioctl (struct usb_interface *intf, unsigned int code, void *buf) { - struct usbtest_dev *dev = dev_get_drvdata (&intf->dev); + struct usbtest_dev *dev = usb_get_intfdata (intf); struct usb_device *udev = testdev_to_usbdev (dev); struct usbtest_param *param = buf; int retval = -EOPNOTSUPP; @@ -957,7 +957,7 @@ } } - dev_set_drvdata (&intf->dev, dev); + usb_set_intfdata (intf, dev); info ("%s at %s ... %s speed {control%s%s} tests", info->name, dev->id, ({ char *tmp; @@ -972,11 +972,11 @@ static void usbtest_disconnect (struct usb_interface *intf) { - struct usbtest_dev *dev = dev_get_drvdata (&intf->dev); + struct usbtest_dev *dev = usb_get_intfdata (intf); down (&dev->sem); - dev_set_drvdata (&intf->dev, 0); + usb_set_intfdata (intf, NULL); info ("unbound %s", dev->id); } diff -Nru a/drivers/usb/misc/uss720.c b/drivers/usb/misc/uss720.c --- a/drivers/usb/misc/uss720.c Fri Dec 27 23:56:29 2002 +++ b/drivers/usb/misc/uss720.c Fri Dec 27 23:56:29 2002 @@ -608,7 +608,7 @@ parport_announce_port(pp); MOD_INC_USE_COUNT; - dev_set_drvdata (&intf->dev, pp); + usb_set_intfdata (intf, pp); return 0; #if 0 @@ -622,10 +622,10 @@ static void uss720_disconnect(struct usb_interface *intf) { - struct parport *pp = dev_get_drvdata (&intf->dev); + struct parport *pp = usb_get_intfdata (intf); struct parport_uss720_private *priv; - dev_set_drvdata (&intf->dev, NULL); + usb_set_intfdata (intf, NULL); if (pp) { priv = pp->private_data; #if 0