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

[PATCH] USB: fixed up pci slot_name accesses in usb gadget code

parent b323bb49
...@@ -2496,7 +2496,7 @@ static void net2280_remove (struct pci_dev *pdev) ...@@ -2496,7 +2496,7 @@ static void net2280_remove (struct pci_dev *pdev)
device_remove_file (&pdev->dev, &dev_attr_registers); device_remove_file (&pdev->dev, &dev_attr_registers);
pci_set_drvdata (pdev, 0); pci_set_drvdata (pdev, 0);
INFO (dev, "unbind from pci %s\n", pdev->slot_name); INFO (dev, "unbind from pci %s\n", pci_name(pdev));
kfree (dev); kfree (dev);
the_controller = 0; the_controller = 0;
...@@ -2518,7 +2518,7 @@ static int net2280_probe (struct pci_dev *pdev, const struct pci_device_id *id) ...@@ -2518,7 +2518,7 @@ static int net2280_probe (struct pci_dev *pdev, const struct pci_device_id *id)
* usb_gadget_driver_{register,unregister}() must change. * usb_gadget_driver_{register,unregister}() must change.
*/ */
if (the_controller) { if (the_controller) {
WARN (the_controller, "ignoring %s\n", pdev->slot_name); WARN (the_controller, "ignoring %s\n", pci_name(pdev));
return -EBUSY; return -EBUSY;
} }
...@@ -2534,7 +2534,7 @@ static int net2280_probe (struct pci_dev *pdev, const struct pci_device_id *id) ...@@ -2534,7 +2534,7 @@ static int net2280_probe (struct pci_dev *pdev, const struct pci_device_id *id)
dev->pdev = pdev; dev->pdev = pdev;
dev->gadget.ops = &net2280_ops; dev->gadget.ops = &net2280_ops;
strcpy (dev->gadget.dev.bus_id, pdev->slot_name); strcpy (dev->gadget.dev.bus_id, pci_name(pdev));
strcpy (dev->gadget.dev.name, pdev->dev.name); strcpy (dev->gadget.dev.name, pdev->dev.name);
dev->gadget.dev.parent = &pdev->dev; dev->gadget.dev.parent = &pdev->dev;
dev->gadget.dev.dma_mask = pdev->dev.dma_mask; dev->gadget.dev.dma_mask = pdev->dev.dma_mask;
......
...@@ -654,7 +654,7 @@ static inline void net2280_led_shutdown (struct net2280 *dev) ...@@ -654,7 +654,7 @@ static inline void net2280_led_shutdown (struct net2280 *dev)
#define xprintk(dev,level,fmt,args...) \ #define xprintk(dev,level,fmt,args...) \
printk(level "%s %s: " fmt , driver_name , \ printk(level "%s %s: " fmt , driver_name , \
dev->pdev->slot_name , ## args) pci_name(dev->pdev) , ## args)
#ifdef DEBUG #ifdef DEBUG
#undef DEBUG #undef DEBUG
......
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