ChangeSet 1.967, 2002/12/27 15:04:35-08:00, greg@kroah.com [PATCH] USB net 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/net/catc.c b/drivers/usb/net/catc.c --- a/drivers/usb/net/catc.c Fri Dec 27 23:55:41 2002 +++ b/drivers/usb/net/catc.c Fri Dec 27 23:55:41 2002 @@ -928,15 +928,15 @@ usbdev->bus->bus_name, usbdev->devpath); for (i = 0; i < 5; i++) printk("%2.2x:", netdev->dev_addr[i]); printk("%2.2x.\n", netdev->dev_addr[i]); - dev_set_drvdata (&intf->dev, catc); + usb_set_intfdata(intf, catc); return 0; } static void catc_disconnect(struct usb_interface *intf) { - struct catc *catc = dev_get_drvdata (&intf->dev); + struct catc *catc = usb_get_intfdata(intf); - dev_set_drvdata (&intf->dev, NULL); + usb_set_intfdata(intf, NULL); if (catc) { unregister_netdev(catc->netdev); usb_free_urb(catc->ctrl_urb); diff -Nru a/drivers/usb/net/cdc-ether.c b/drivers/usb/net/cdc-ether.c --- a/drivers/usb/net/cdc-ether.c Fri Dec 27 23:55:41 2002 +++ b/drivers/usb/net/cdc-ether.c Fri Dec 27 23:55:41 2002 @@ -1287,10 +1287,10 @@ static void CDCEther_disconnect( struct usb_interface *intf ) { - ether_dev_t *ether_dev = dev_get_drvdata (&intf->dev); + ether_dev_t *ether_dev = usb_get_intfdata(intf); struct usb_device *usb; - dev_set_drvdata (&intf->dev, NULL); + usb_set_intfdata(intf, NULL); // Sanity check!!! if ( !ether_dev || !ether_dev->usb ) { diff -Nru a/drivers/usb/net/kaweth.c b/drivers/usb/net/kaweth.c --- a/drivers/usb/net/kaweth.c Fri Dec 27 23:55:41 2002 +++ b/drivers/usb/net/kaweth.c Fri Dec 27 23:55:41 2002 @@ -1066,7 +1066,7 @@ kaweth_dbg("Kaweth probe returning."); - dev_set_drvdata (&intf->dev, kaweth); + usb_set_intfdata(intf, kaweth); return 0; err_tx_and_rx: @@ -1085,11 +1085,11 @@ ****************************************************************/ static void kaweth_disconnect(struct usb_interface *intf) { - struct kaweth_device *kaweth = dev_get_drvdata (&intf->dev); + struct kaweth_device *kaweth = usb_get_intfdata(intf); kaweth_info("Unregistering"); - dev_set_drvdata (&intf->dev, NULL); + usb_set_intfdata(intf, NULL); if (!kaweth) { kaweth_warn("unregistering non-existant device"); return; diff -Nru a/drivers/usb/net/pegasus.c b/drivers/usb/net/pegasus.c --- a/drivers/usb/net/pegasus.c Fri Dec 27 23:55:41 2002 +++ b/drivers/usb/net/pegasus.c Fri Dec 27 23:55:41 2002 @@ -1244,7 +1244,7 @@ exit: up(&pegasus->sem); if (pegasus) { - dev_set_drvdata(&intf->dev, pegasus); + usb_set_intfdata(intf, pegasus); return 0; } return -EIO; @@ -1252,9 +1252,9 @@ static void pegasus_disconnect(struct usb_interface *intf) { - struct pegasus *pegasus = dev_get_drvdata(&intf->dev); + struct pegasus *pegasus = usb_get_intfdata(intf); - dev_set_drvdata(&intf->dev, NULL); + usb_set_intfdata(intf, NULL); if (!pegasus) { warn("unregistering non-existant device"); return; diff -Nru a/drivers/usb/net/rtl8150.c b/drivers/usb/net/rtl8150.c --- a/drivers/usb/net/rtl8150.c Fri Dec 27 23:55:41 2002 +++ b/drivers/usb/net/rtl8150.c Fri Dec 27 23:55:41 2002 @@ -842,7 +842,7 @@ info("%s: rtl8150 is detected", netdev->name); up(&dev->sem); - dev_set_drvdata(&intf->dev, dev); + usb_set_intfdata(intf, dev); return 0; err: unregister_netdev(dev->netdev); @@ -854,9 +854,9 @@ static void rtl8150_disconnect(struct usb_interface *intf) { - rtl8150_t *dev = dev_get_drvdata(&intf->dev); + rtl8150_t *dev = usb_get_intfdata(intf); - dev_set_drvdata(&intf->dev, NULL); + usb_set_intfdata(intf, NULL); if (dev) { set_bit(RTL8150_UNPLUG, &dev->flags); unregister_netdev(dev->netdev); diff -Nru a/drivers/usb/net/usbnet.c b/drivers/usb/net/usbnet.c --- a/drivers/usb/net/usbnet.c Fri Dec 27 23:55:41 2002 +++ b/drivers/usb/net/usbnet.c Fri Dec 27 23:55:41 2002 @@ -2094,8 +2094,8 @@ struct usbnet *dev; struct usb_device *xdev; - dev = dev_get_drvdata (&intf->dev); - dev_set_drvdata (&intf->dev, NULL); + dev = usb_get_intfdata(intf); + usb_set_intfdata(intf, NULL); if (!dev) return; @@ -2206,7 +2206,7 @@ #endif // ok, it's ready to go. - dev_set_drvdata (&udev->dev, dev); + usb_set_intfdata(udev, dev); mutex_lock (&usbnet_mutex); list_add (&dev->dev_list, &usbnet_list); mutex_unlock (&dev->mutex);