Commit 7071a3ce authored by Kay Sievers's avatar Kay Sievers Committed by Greg Kroah-Hartman

USB: usb dev_name() instead of dev->bus_id

The bus_id field is going away, use the dev_name() function instead.
Signed-off-by: default avatarKay Sievers <kay.sievers@vrfy.org>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent 36aa8117
...@@ -586,7 +586,7 @@ static int usb_uevent(struct device *dev, struct kobj_uevent_env *env) ...@@ -586,7 +586,7 @@ static int usb_uevent(struct device *dev, struct kobj_uevent_env *env)
struct usb_device *usb_dev; struct usb_device *usb_dev;
/* driver is often null here; dev_dbg() would oops */ /* driver is often null here; dev_dbg() would oops */
pr_debug("usb %s: uevent\n", dev->bus_id); pr_debug("usb %s: uevent\n", dev_name(dev));
if (is_usb_device(dev)) if (is_usb_device(dev))
usb_dev = to_usb_device(dev); usb_dev = to_usb_device(dev);
...@@ -596,11 +596,11 @@ static int usb_uevent(struct device *dev, struct kobj_uevent_env *env) ...@@ -596,11 +596,11 @@ static int usb_uevent(struct device *dev, struct kobj_uevent_env *env)
} }
if (usb_dev->devnum < 0) { if (usb_dev->devnum < 0) {
pr_debug("usb %s: already deleted?\n", dev->bus_id); pr_debug("usb %s: already deleted?\n", dev_name(dev));
return -ENODEV; return -ENODEV;
} }
if (!usb_dev->bus) { if (!usb_dev->bus) {
pr_debug("usb %s: bus removed?\n", dev->bus_id); pr_debug("usb %s: bus removed?\n", dev_name(dev));
return -ENODEV; return -ENODEV;
} }
......
...@@ -296,7 +296,7 @@ int usb_create_ep_files(struct device *parent, ...@@ -296,7 +296,7 @@ int usb_create_ep_files(struct device *parent,
retval = endpoint_get_minor(ep_dev); retval = endpoint_get_minor(ep_dev);
if (retval) { if (retval) {
dev_err(parent, "can not allocate minor number for %s\n", dev_err(parent, "can not allocate minor number for %s\n",
ep_dev->dev.bus_id); dev_name(&ep_dev->dev));
goto error_register; goto error_register;
} }
......
...@@ -150,7 +150,7 @@ int usb_register_dev(struct usb_interface *intf, ...@@ -150,7 +150,7 @@ int usb_register_dev(struct usb_interface *intf,
int retval = -EINVAL; int retval = -EINVAL;
int minor_base = class_driver->minor_base; int minor_base = class_driver->minor_base;
int minor = 0; int minor = 0;
char name[BUS_ID_SIZE]; char name[20];
char *temp; char *temp;
#ifdef CONFIG_USB_DYNAMIC_MINORS #ifdef CONFIG_USB_DYNAMIC_MINORS
...@@ -190,9 +190,9 @@ int usb_register_dev(struct usb_interface *intf, ...@@ -190,9 +190,9 @@ int usb_register_dev(struct usb_interface *intf,
intf->minor = minor; intf->minor = minor;
/* create a usb class device for this usb interface */ /* create a usb class device for this usb interface */
snprintf(name, BUS_ID_SIZE, class_driver->name, minor - minor_base); snprintf(name, sizeof(name), class_driver->name, minor - minor_base);
temp = strrchr(name, '/'); temp = strrchr(name, '/');
if (temp && (temp[1] != 0x00)) if (temp && (temp[1] != '\0'))
++temp; ++temp;
else else
temp = name; temp = name;
...@@ -227,7 +227,7 @@ void usb_deregister_dev(struct usb_interface *intf, ...@@ -227,7 +227,7 @@ void usb_deregister_dev(struct usb_interface *intf,
struct usb_class_driver *class_driver) struct usb_class_driver *class_driver)
{ {
int minor_base = class_driver->minor_base; int minor_base = class_driver->minor_base;
char name[BUS_ID_SIZE]; char name[20];
#ifdef CONFIG_USB_DYNAMIC_MINORS #ifdef CONFIG_USB_DYNAMIC_MINORS
minor_base = 0; minor_base = 0;
...@@ -242,7 +242,7 @@ void usb_deregister_dev(struct usb_interface *intf, ...@@ -242,7 +242,7 @@ void usb_deregister_dev(struct usb_interface *intf,
usb_minors[intf->minor] = NULL; usb_minors[intf->minor] = NULL;
up_write(&minor_rwsem); up_write(&minor_rwsem);
snprintf(name, BUS_ID_SIZE, class_driver->name, intf->minor - minor_base); snprintf(name, sizeof(name), class_driver->name, intf->minor - minor_base);
device_destroy(usb_class->class, MKDEV(USB_MAJOR, intf->minor)); device_destroy(usb_class->class, MKDEV(USB_MAJOR, intf->minor));
intf->usb_dev = NULL; intf->usb_dev = NULL;
intf->minor = -1; intf->minor = -1;
......
...@@ -900,14 +900,14 @@ static int register_root_hub(struct usb_hcd *hcd) ...@@ -900,14 +900,14 @@ static int register_root_hub(struct usb_hcd *hcd)
if (retval != sizeof usb_dev->descriptor) { if (retval != sizeof usb_dev->descriptor) {
mutex_unlock(&usb_bus_list_lock); mutex_unlock(&usb_bus_list_lock);
dev_dbg (parent_dev, "can't read %s device descriptor %d\n", dev_dbg (parent_dev, "can't read %s device descriptor %d\n",
usb_dev->dev.bus_id, retval); dev_name(&usb_dev->dev), retval);
return (retval < 0) ? retval : -EMSGSIZE; return (retval < 0) ? retval : -EMSGSIZE;
} }
retval = usb_new_device (usb_dev); retval = usb_new_device (usb_dev);
if (retval) { if (retval) {
dev_err (parent_dev, "can't register root hub for %s, %d\n", dev_err (parent_dev, "can't register root hub for %s, %d\n",
usb_dev->dev.bus_id, retval); dev_name(&usb_dev->dev), retval);
} }
mutex_unlock(&usb_bus_list_lock); mutex_unlock(&usb_bus_list_lock);
......
...@@ -1090,7 +1090,7 @@ void usb_disable_device(struct usb_device *dev, int skip_ep0) ...@@ -1090,7 +1090,7 @@ void usb_disable_device(struct usb_device *dev, int skip_ep0)
if (!device_is_registered(&interface->dev)) if (!device_is_registered(&interface->dev))
continue; continue;
dev_dbg(&dev->dev, "unregistering interface %s\n", dev_dbg(&dev->dev, "unregistering interface %s\n",
interface->dev.bus_id); dev_name(&interface->dev));
device_del(&interface->dev); device_del(&interface->dev);
usb_remove_sysfs_intf_files(interface); usb_remove_sysfs_intf_files(interface);
} }
...@@ -1631,12 +1631,12 @@ int usb_set_configuration(struct usb_device *dev, int configuration) ...@@ -1631,12 +1631,12 @@ int usb_set_configuration(struct usb_device *dev, int configuration)
dev_dbg(&dev->dev, dev_dbg(&dev->dev,
"adding %s (config #%d, interface %d)\n", "adding %s (config #%d, interface %d)\n",
intf->dev.bus_id, configuration, dev_name(&intf->dev), configuration,
intf->cur_altsetting->desc.bInterfaceNumber); intf->cur_altsetting->desc.bInterfaceNumber);
ret = device_add(&intf->dev); ret = device_add(&intf->dev);
if (ret != 0) { if (ret != 0) {
dev_err(&dev->dev, "device_add(%s) --> %d\n", dev_err(&dev->dev, "device_add(%s) --> %d\n",
intf->dev.bus_id, ret); dev_name(&intf->dev), ret);
continue; continue;
} }
usb_create_sysfs_intf_files(intf); usb_create_sysfs_intf_files(intf);
......
...@@ -308,7 +308,7 @@ struct usb_device *usb_alloc_dev(struct usb_device *parent, ...@@ -308,7 +308,7 @@ struct usb_device *usb_alloc_dev(struct usb_device *parent,
* by location for diagnostics, tools, driver model, etc. The * by location for diagnostics, tools, driver model, etc. The
* string is a path along hub ports, from the root. Each device's * string is a path along hub ports, from the root. Each device's
* dev->devpath will be stable until USB is re-cabled, and hubs * dev->devpath will be stable until USB is re-cabled, and hubs
* are often labeled with these port numbers. The bus_id isn't * are often labeled with these port numbers. The name isn't
* as stable: bus->busnum changes easily from modprobe order, * as stable: bus->busnum changes easily from modprobe order,
* cardbus or pci hotplugging, and so on. * cardbus or pci hotplugging, and so on.
*/ */
......
...@@ -1865,7 +1865,7 @@ static int dummy_hcd_probe(struct platform_device *pdev) ...@@ -1865,7 +1865,7 @@ static int dummy_hcd_probe(struct platform_device *pdev)
dev_info(&pdev->dev, "%s, driver " DRIVER_VERSION "\n", driver_desc); dev_info(&pdev->dev, "%s, driver " DRIVER_VERSION "\n", driver_desc);
hcd = usb_create_hcd(&dummy_hcd, &pdev->dev, pdev->dev.bus_id); hcd = usb_create_hcd(&dummy_hcd, &pdev->dev, dev_name(&pdev->dev));
if (!hcd) if (!hcd)
return -ENOMEM; return -ENOMEM;
the_controller = hcd_to_dummy (hcd); the_controller = hcd_to_dummy (hcd);
......
...@@ -1642,7 +1642,7 @@ static void eth_get_drvinfo(struct net_device *net, struct ethtool_drvinfo *p) ...@@ -1642,7 +1642,7 @@ static void eth_get_drvinfo(struct net_device *net, struct ethtool_drvinfo *p)
strlcpy(p->driver, shortname, sizeof p->driver); strlcpy(p->driver, shortname, sizeof p->driver);
strlcpy(p->version, DRIVER_VERSION, sizeof p->version); strlcpy(p->version, DRIVER_VERSION, sizeof p->version);
strlcpy(p->fw_version, dev->gadget->name, sizeof p->fw_version); strlcpy(p->fw_version, dev->gadget->name, sizeof p->fw_version);
strlcpy (p->bus_info, dev->gadget->dev.bus_id, sizeof p->bus_info); strlcpy (p->bus_info, dev_name(&dev->gadget->dev), sizeof p->bus_info);
} }
static u32 eth_get_link(struct net_device *net) static u32 eth_get_link(struct net_device *net)
......
...@@ -3868,7 +3868,7 @@ static int __init fsg_bind(struct usb_gadget *gadget) ...@@ -3868,7 +3868,7 @@ static int __init fsg_bind(struct usb_gadget *gadget)
curlun->dev.driver = &fsg_driver.driver; curlun->dev.driver = &fsg_driver.driver;
dev_set_drvdata(&curlun->dev, fsg); dev_set_drvdata(&curlun->dev, fsg);
snprintf(curlun->dev.bus_id, BUS_ID_SIZE, snprintf(curlun->dev.bus_id, BUS_ID_SIZE,
"%s-lun%d", gadget->dev.bus_id, i); "%s-lun%d", dev_name(&gadget->dev), i);
if ((rc = device_register(&curlun->dev)) != 0) { if ((rc = device_register(&curlun->dev)) != 0) {
INFO(fsg, "failed to register LUN%d: %d\n", i, rc); INFO(fsg, "failed to register LUN%d: %d\n", i, rc);
......
...@@ -1970,7 +1970,7 @@ static const struct usb_gadget_ops lh7a40x_udc_ops = { ...@@ -1970,7 +1970,7 @@ static const struct usb_gadget_ops lh7a40x_udc_ops = {
static void nop_release(struct device *dev) static void nop_release(struct device *dev)
{ {
DEBUG("%s %s\n", __func__, dev->bus_id); DEBUG("%s %s\n", __func__, dev_name(dev));
} }
static struct lh7a40x_udc memory = { static struct lh7a40x_udc memory = {
......
...@@ -1818,7 +1818,7 @@ pxa25x_udc_irq(int irq, void *_dev) ...@@ -1818,7 +1818,7 @@ pxa25x_udc_irq(int irq, void *_dev)
static void nop_release (struct device *dev) static void nop_release (struct device *dev)
{ {
DMSG("%s %s\n", __func__, dev->bus_id); DMSG("%s %s\n", __func__, dev_name(dev));
} }
/* this uses load-time allocation and initialization (instead of /* this uses load-time allocation and initialization (instead of
......
...@@ -676,7 +676,7 @@ static ssize_t fill_registers_buffer(struct debug_buffer *buf) ...@@ -676,7 +676,7 @@ static ssize_t fill_registers_buffer(struct debug_buffer *buf)
"%s\n" "%s\n"
"SUSPENDED (no register access)\n", "SUSPENDED (no register access)\n",
hcd->self.controller->bus->name, hcd->self.controller->bus->name,
hcd->self.controller->bus_id, dev_name(hcd->self.controller),
hcd->product_desc); hcd->product_desc);
goto done; goto done;
} }
...@@ -688,7 +688,7 @@ static ssize_t fill_registers_buffer(struct debug_buffer *buf) ...@@ -688,7 +688,7 @@ static ssize_t fill_registers_buffer(struct debug_buffer *buf)
"%s\n" "%s\n"
"EHCI %x.%02x, hcd state %d\n", "EHCI %x.%02x, hcd state %d\n",
hcd->self.controller->bus->name, hcd->self.controller->bus->name,
hcd->self.controller->bus_id, dev_name(hcd->self.controller),
hcd->product_desc, hcd->product_desc,
i >> 8, i & 0x0ff, hcd->state); i >> 8, i & 0x0ff, hcd->state);
size -= temp; size -= temp;
......
...@@ -56,7 +56,7 @@ int usb_hcd_fsl_probe(const struct hc_driver *driver, ...@@ -56,7 +56,7 @@ int usb_hcd_fsl_probe(const struct hc_driver *driver,
pdata = (struct fsl_usb2_platform_data *)pdev->dev.platform_data; pdata = (struct fsl_usb2_platform_data *)pdev->dev.platform_data;
if (!pdata) { if (!pdata) {
dev_err(&pdev->dev, dev_err(&pdev->dev,
"No platform data for %s.\n", pdev->dev.bus_id); "No platform data for %s.\n", dev_name(&pdev->dev));
return -ENODEV; return -ENODEV;
} }
...@@ -69,7 +69,7 @@ int usb_hcd_fsl_probe(const struct hc_driver *driver, ...@@ -69,7 +69,7 @@ int usb_hcd_fsl_probe(const struct hc_driver *driver,
(pdata->operating_mode == FSL_USB2_DR_OTG))) { (pdata->operating_mode == FSL_USB2_DR_OTG))) {
dev_err(&pdev->dev, dev_err(&pdev->dev,
"Non Host Mode configured for %s. Wrong driver linked.\n", "Non Host Mode configured for %s. Wrong driver linked.\n",
pdev->dev.bus_id); dev_name(&pdev->dev));
return -ENODEV; return -ENODEV;
} }
...@@ -77,12 +77,12 @@ int usb_hcd_fsl_probe(const struct hc_driver *driver, ...@@ -77,12 +77,12 @@ int usb_hcd_fsl_probe(const struct hc_driver *driver,
if (!res) { if (!res) {
dev_err(&pdev->dev, dev_err(&pdev->dev,
"Found HC with no IRQ. Check %s setup!\n", "Found HC with no IRQ. Check %s setup!\n",
pdev->dev.bus_id); dev_name(&pdev->dev));
return -ENODEV; return -ENODEV;
} }
irq = res->start; irq = res->start;
hcd = usb_create_hcd(driver, &pdev->dev, pdev->dev.bus_id); hcd = usb_create_hcd(driver, &pdev->dev, dev_name(&pdev->dev));
if (!hcd) { if (!hcd) {
retval = -ENOMEM; retval = -ENOMEM;
goto err1; goto err1;
...@@ -92,7 +92,7 @@ int usb_hcd_fsl_probe(const struct hc_driver *driver, ...@@ -92,7 +92,7 @@ int usb_hcd_fsl_probe(const struct hc_driver *driver,
if (!res) { if (!res) {
dev_err(&pdev->dev, dev_err(&pdev->dev,
"Found HC with no register addr. Check %s setup!\n", "Found HC with no register addr. Check %s setup!\n",
pdev->dev.bus_id); dev_name(&pdev->dev));
retval = -ENODEV; retval = -ENODEV;
goto err2; goto err2;
} }
...@@ -132,7 +132,7 @@ int usb_hcd_fsl_probe(const struct hc_driver *driver, ...@@ -132,7 +132,7 @@ int usb_hcd_fsl_probe(const struct hc_driver *driver,
err2: err2:
usb_put_hcd(hcd); usb_put_hcd(hcd);
err1: err1:
dev_err(&pdev->dev, "init %s fail, %d\n", pdev->dev.bus_id, retval); dev_err(&pdev->dev, "init %s fail, %d\n", dev_name(&pdev->dev), retval);
return retval; return retval;
} }
......
...@@ -77,12 +77,12 @@ static int ixp4xx_ehci_probe(struct platform_device *pdev) ...@@ -77,12 +77,12 @@ static int ixp4xx_ehci_probe(struct platform_device *pdev)
if (!res) { if (!res) {
dev_err(&pdev->dev, dev_err(&pdev->dev,
"Found HC with no IRQ. Check %s setup!\n", "Found HC with no IRQ. Check %s setup!\n",
pdev->dev.bus_id); dev_name(&pdev->dev));
return -ENODEV; return -ENODEV;
} }
irq = res->start; irq = res->start;
hcd = usb_create_hcd(driver, &pdev->dev, pdev->dev.bus_id); hcd = usb_create_hcd(driver, &pdev->dev, dev_name(&pdev->dev));
if (!hcd) { if (!hcd) {
retval = -ENOMEM; retval = -ENOMEM;
goto fail_create_hcd; goto fail_create_hcd;
...@@ -92,7 +92,7 @@ static int ixp4xx_ehci_probe(struct platform_device *pdev) ...@@ -92,7 +92,7 @@ static int ixp4xx_ehci_probe(struct platform_device *pdev)
if (!res) { if (!res) {
dev_err(&pdev->dev, dev_err(&pdev->dev,
"Found HC with no register addr. Check %s setup!\n", "Found HC with no register addr. Check %s setup!\n",
pdev->dev.bus_id); dev_name(&pdev->dev));
retval = -ENODEV; retval = -ENODEV;
goto fail_request_resource; goto fail_request_resource;
} }
...@@ -126,7 +126,7 @@ static int ixp4xx_ehci_probe(struct platform_device *pdev) ...@@ -126,7 +126,7 @@ static int ixp4xx_ehci_probe(struct platform_device *pdev)
fail_request_resource: fail_request_resource:
usb_put_hcd(hcd); usb_put_hcd(hcd);
fail_create_hcd: fail_create_hcd:
dev_err(&pdev->dev, "init %s fail, %d\n", pdev->dev.bus_id, retval); dev_err(&pdev->dev, "init %s fail, %d\n", dev_name(&pdev->dev), retval);
return retval; return retval;
} }
......
...@@ -204,7 +204,7 @@ static int __init ehci_orion_drv_probe(struct platform_device *pdev) ...@@ -204,7 +204,7 @@ static int __init ehci_orion_drv_probe(struct platform_device *pdev)
if (irq <= 0) { if (irq <= 0) {
dev_err(&pdev->dev, dev_err(&pdev->dev,
"Found HC with no IRQ. Check %s setup!\n", "Found HC with no IRQ. Check %s setup!\n",
pdev->dev.bus_id); dev_name(&pdev->dev));
err = -ENODEV; err = -ENODEV;
goto err1; goto err1;
} }
...@@ -213,7 +213,7 @@ static int __init ehci_orion_drv_probe(struct platform_device *pdev) ...@@ -213,7 +213,7 @@ static int __init ehci_orion_drv_probe(struct platform_device *pdev)
if (!res) { if (!res) {
dev_err(&pdev->dev, dev_err(&pdev->dev,
"Found HC with no register addr. Check %s setup!\n", "Found HC with no register addr. Check %s setup!\n",
pdev->dev.bus_id); dev_name(&pdev->dev));
err = -ENODEV; err = -ENODEV;
goto err1; goto err1;
} }
...@@ -233,7 +233,7 @@ static int __init ehci_orion_drv_probe(struct platform_device *pdev) ...@@ -233,7 +233,7 @@ static int __init ehci_orion_drv_probe(struct platform_device *pdev)
} }
hcd = usb_create_hcd(&ehci_orion_hc_driver, hcd = usb_create_hcd(&ehci_orion_hc_driver,
&pdev->dev, pdev->dev.bus_id); &pdev->dev, dev_name(&pdev->dev));
if (!hcd) { if (!hcd) {
err = -ENOMEM; err = -ENOMEM;
goto err3; goto err3;
...@@ -276,7 +276,7 @@ static int __init ehci_orion_drv_probe(struct platform_device *pdev) ...@@ -276,7 +276,7 @@ static int __init ehci_orion_drv_probe(struct platform_device *pdev)
release_mem_region(res->start, res->end - res->start + 1); release_mem_region(res->start, res->end - res->start + 1);
err1: err1:
dev_err(&pdev->dev, "init %s fail, %d\n", dev_err(&pdev->dev, "init %s fail, %d\n",
pdev->dev.bus_id, err); dev_name(&pdev->dev), err);
return err; return err;
} }
......
...@@ -128,7 +128,7 @@ static int ps3_ehci_probe(struct ps3_system_bus_device *dev) ...@@ -128,7 +128,7 @@ static int ps3_ehci_probe(struct ps3_system_bus_device *dev)
dev->core.dma_mask = &dummy_mask; /* FIXME: for improper usb code */ dev->core.dma_mask = &dummy_mask; /* FIXME: for improper usb code */
hcd = usb_create_hcd(&ps3_ehci_hc_driver, &dev->core, dev->core.bus_id); hcd = usb_create_hcd(&ps3_ehci_hc_driver, &dev->core, dev_name(&dev->core));
if (!hcd) { if (!hcd) {
dev_dbg(&dev->core, "%s:%d: usb_create_hcd failed\n", __func__, dev_dbg(&dev->core, "%s:%d: usb_create_hcd failed\n", __func__,
......
...@@ -1592,7 +1592,7 @@ static int __devinit isp116x_probe(struct platform_device *pdev) ...@@ -1592,7 +1592,7 @@ static int __devinit isp116x_probe(struct platform_device *pdev)
} }
/* allocate and initialize hcd */ /* allocate and initialize hcd */
hcd = usb_create_hcd(&isp116x_hc_driver, &pdev->dev, pdev->dev.bus_id); hcd = usb_create_hcd(&isp116x_hc_driver, &pdev->dev, dev_name(&pdev->dev));
if (!hcd) { if (!hcd) {
ret = -ENOMEM; ret = -ENOMEM;
goto err5; goto err5;
......
...@@ -41,7 +41,7 @@ static int of_isp1760_probe(struct of_device *dev, ...@@ -41,7 +41,7 @@ static int of_isp1760_probe(struct of_device *dev,
return -ENXIO; return -ENXIO;
res = request_mem_region(memory.start, memory.end - memory.start + 1, res = request_mem_region(memory.start, memory.end - memory.start + 1,
dev->dev.bus_id); dev_name(&dev->dev));
if (!res) if (!res)
return -EBUSY; return -EBUSY;
...@@ -56,7 +56,7 @@ static int of_isp1760_probe(struct of_device *dev, ...@@ -56,7 +56,7 @@ static int of_isp1760_probe(struct of_device *dev,
oirq.size); oirq.size);
hcd = isp1760_register(memory.start, res_len, virq, hcd = isp1760_register(memory.start, res_len, virq,
IRQF_SHARED | IRQF_DISABLED, &dev->dev, dev->dev.bus_id); IRQF_SHARED | IRQF_DISABLED, &dev->dev, dev_name(&dev->dev));
if (IS_ERR(hcd)) { if (IS_ERR(hcd)) {
ret = PTR_ERR(hcd); ret = PTR_ERR(hcd);
goto release_reg; goto release_reg;
...@@ -200,7 +200,7 @@ static int __devinit isp1761_pci_probe(struct pci_dev *dev, ...@@ -200,7 +200,7 @@ static int __devinit isp1761_pci_probe(struct pci_dev *dev,
dev->dev.dma_mask = NULL; dev->dev.dma_mask = NULL;
hcd = isp1760_register(pci_mem_phy0, length, dev->irq, hcd = isp1760_register(pci_mem_phy0, length, dev->irq,
IRQF_SHARED | IRQF_DISABLED, &dev->dev, dev->dev.bus_id); IRQF_SHARED | IRQF_DISABLED, &dev->dev, dev_name(&dev->dev));
pci_set_drvdata(dev, hcd); pci_set_drvdata(dev, hcd);
if (!hcd) if (!hcd)
return 0; return 0;
......
...@@ -651,7 +651,7 @@ static ssize_t fill_registers_buffer(struct debug_buffer *buf) ...@@ -651,7 +651,7 @@ static ssize_t fill_registers_buffer(struct debug_buffer *buf)
"%s\n" "%s\n"
"%s version " DRIVER_VERSION "\n", "%s version " DRIVER_VERSION "\n",
hcd->self.controller->bus->name, hcd->self.controller->bus->name,
hcd->self.controller->bus_id, dev_name(hcd->self.controller),
hcd->product_desc, hcd->product_desc,
hcd_name); hcd_name);
......
...@@ -329,7 +329,7 @@ static int usb_hcd_omap_probe (const struct hc_driver *driver, ...@@ -329,7 +329,7 @@ static int usb_hcd_omap_probe (const struct hc_driver *driver,
} }
hcd = usb_create_hcd (driver, &pdev->dev, pdev->dev.bus_id); hcd = usb_create_hcd (driver, &pdev->dev, dev_name(&pdev->dev));
if (!hcd) { if (!hcd) {
retval = -ENOMEM; retval = -ENOMEM;
goto err0; goto err0;
......
...@@ -389,7 +389,7 @@ static int __devinit usb_hcd_pnx4008_probe(struct platform_device *pdev) ...@@ -389,7 +389,7 @@ static int __devinit usb_hcd_pnx4008_probe(struct platform_device *pdev)
while ((__raw_readl(USB_OTG_CLK_STAT) & USB_CLOCK_MASK) != while ((__raw_readl(USB_OTG_CLK_STAT) & USB_CLOCK_MASK) !=
USB_CLOCK_MASK) ; USB_CLOCK_MASK) ;
hcd = usb_create_hcd (driver, &pdev->dev, pdev->dev.bus_id); hcd = usb_create_hcd (driver, &pdev->dev, dev_name(&pdev->dev));
if (!hcd) { if (!hcd) {
err("Failed to allocate HC buffer"); err("Failed to allocate HC buffer");
ret = -ENOMEM; ret = -ENOMEM;
......
...@@ -129,7 +129,7 @@ static int ps3_ohci_probe(struct ps3_system_bus_device *dev) ...@@ -129,7 +129,7 @@ static int ps3_ohci_probe(struct ps3_system_bus_device *dev)
dev->core.dma_mask = &dummy_mask; /* FIXME: for improper usb code */ dev->core.dma_mask = &dummy_mask; /* FIXME: for improper usb code */
hcd = usb_create_hcd(&ps3_ohci_hc_driver, &dev->core, dev->core.bus_id); hcd = usb_create_hcd(&ps3_ohci_hc_driver, &dev->core, dev_name(&dev->core));
if (!hcd) { if (!hcd) {
dev_dbg(&dev->core, "%s:%d: usb_create_hcd failed\n", __func__, dev_dbg(&dev->core, "%s:%d: usb_create_hcd failed\n", __func__,
......
...@@ -143,7 +143,7 @@ static int ohci_hcd_sm501_drv_probe(struct platform_device *pdev) ...@@ -143,7 +143,7 @@ static int ohci_hcd_sm501_drv_probe(struct platform_device *pdev)
goto err2; goto err2;
} }
hcd = usb_create_hcd(driver, &pdev->dev, pdev->dev.bus_id); hcd = usb_create_hcd(driver, &pdev->dev, dev_name(&pdev->dev));
if (!hcd) { if (!hcd) {
retval = -ENOMEM; retval = -ENOMEM;
goto err2; goto err2;
......
...@@ -113,7 +113,7 @@ static int ssb_ohci_attach(struct ssb_device *dev) ...@@ -113,7 +113,7 @@ static int ssb_ohci_attach(struct ssb_device *dev)
ssb_device_enable(dev, flags); ssb_device_enable(dev, flags);
hcd = usb_create_hcd(&ssb_ohci_hc_driver, dev->dev, hcd = usb_create_hcd(&ssb_ohci_hc_driver, dev->dev,
dev->dev->bus_id); dev_name(dev->dev));
if (!hcd) if (!hcd)
goto err_dev_disable; goto err_dev_disable;
ohcidev = hcd_to_ssb_ohci(hcd); ohcidev = hcd_to_ssb_ohci(hcd);
......
...@@ -1674,7 +1674,7 @@ sl811h_probe(struct platform_device *dev) ...@@ -1674,7 +1674,7 @@ sl811h_probe(struct platform_device *dev)
} }
/* allocate and initialize hcd */ /* allocate and initialize hcd */
hcd = usb_create_hcd(&sl811h_hc_driver, &dev->dev, dev->dev.bus_id); hcd = usb_create_hcd(&sl811h_hc_driver, &dev->dev, dev_name(&dev->dev));
if (!hcd) { if (!hcd) {
retval = -ENOMEM; retval = -ENOMEM;
goto err5; goto err5;
......
...@@ -3124,7 +3124,7 @@ static int __devinit u132_probe(struct platform_device *pdev) ...@@ -3124,7 +3124,7 @@ static int __devinit u132_probe(struct platform_device *pdev)
if (pdev->dev.dma_mask) if (pdev->dev.dma_mask)
return -EINVAL; return -EINVAL;
hcd = usb_create_hcd(&u132_hc_driver, &pdev->dev, pdev->dev.bus_id); hcd = usb_create_hcd(&u132_hc_driver, &pdev->dev, dev_name(&pdev->dev));
if (!hcd) { if (!hcd) {
printk(KERN_ERR "failed to create the usb hcd struct for U132\n" printk(KERN_ERR "failed to create the usb hcd struct for U132\n"
); );
......
...@@ -505,7 +505,7 @@ static void port_release(struct device *dev) ...@@ -505,7 +505,7 @@ static void port_release(struct device *dev)
{ {
struct usb_serial_port *port = to_usb_serial_port(dev); struct usb_serial_port *port = to_usb_serial_port(dev);
dbg ("%s - %s", __func__, dev->bus_id); dbg ("%s - %s", __func__, dev_name(dev));
port_free(port); port_free(port);
} }
...@@ -939,7 +939,7 @@ int usb_serial_probe(struct usb_interface *interface, ...@@ -939,7 +939,7 @@ int usb_serial_probe(struct usb_interface *interface,
port->dev.release = &port_release; port->dev.release = &port_release;
snprintf (&port->dev.bus_id[0], sizeof(port->dev.bus_id), "ttyUSB%d", port->number); snprintf (&port->dev.bus_id[0], sizeof(port->dev.bus_id), "ttyUSB%d", port->number);
dbg ("%s - registering %s", __func__, port->dev.bus_id); dbg ("%s - registering %s", __func__, dev_name(&port->dev));
retval = device_register(&port->dev); retval = device_register(&port->dev);
if (retval) if (retval)
dev_err(&port->dev, "Error registering port device, " dev_err(&port->dev, "Error registering port device, "
......
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