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

[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()
parent 8d244aa7
......@@ -2061,7 +2061,7 @@ static int auerswald_probe (struct usb_interface *intf,
}
/* 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 @@ pfail: auerswald_delete (cp);
*/
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;
......
......@@ -406,7 +406,7 @@ brlvger_probe (struct usb_interface *intf,
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 @@ brlvger_probe (struct usb_interface *intf,
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);
......
......@@ -491,15 +491,15 @@ static int probe_rio(struct usb_interface *intf,
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);
......
......@@ -973,16 +973,16 @@ static int udsl_usb_probe (struct usb_interface *intf, const struct usb_device_i
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 */
......
......@@ -383,7 +383,7 @@ tiglusb_probe (struct usb_interface *intf,
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 @@ tiglusb_disconnect (struct usb_interface *intf)
{
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;
......
......@@ -290,15 +290,15 @@ static int probe_lcd(struct usb_interface *intf, const struct usb_device_id *id)
}
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);
......
......@@ -635,7 +635,7 @@ static int unlink_simple (struct usbtest_dev *dev, int pipe, int len)
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 @@ usbtest_probe (struct usb_interface *intf, const struct usb_device_id *id)
}
}
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 @@ usbtest_probe (struct usb_interface *intf, const struct usb_device_id *id)
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);
}
......
......@@ -608,7 +608,7 @@ static int uss720_probe(struct usb_interface *intf,
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 int uss720_probe(struct usb_interface *intf,
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
......
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