Commit 7309225c authored by Greg Kroah-Hartman's avatar Greg Kroah-Hartman

[PATCH] USB: drivers/usb/core/ fixups due to dev_printk change

parent 27cb1287
......@@ -147,7 +147,7 @@ int usb_hcd_pci_probe (struct pci_dev *dev, const struct pci_device_id *id)
goto clean_2;
}
dev_info (*hcd->controller, "%s\n", hcd->product_desc);
dev_info (hcd->controller, "%s\n", hcd->product_desc);
#ifndef __sparc__
sprintf (buf, "%d", dev->irq);
......@@ -156,7 +156,7 @@ int usb_hcd_pci_probe (struct pci_dev *dev, const struct pci_device_id *id)
#endif
if (request_irq (dev->irq, usb_hcd_irq, SA_SHIRQ, hcd->description, hcd)
!= 0) {
dev_err (*hcd->controller,
dev_err (hcd->controller,
"request interrupt %s failed\n", bufp);
retval = -EBUSY;
goto clean_3;
......@@ -165,7 +165,7 @@ int usb_hcd_pci_probe (struct pci_dev *dev, const struct pci_device_id *id)
hcd->regs = base;
hcd->region = region;
dev_info (*hcd->controller, "irq %s, %s %p\n", bufp,
dev_info (hcd->controller, "irq %s, %s %p\n", bufp,
(driver->flags & HCD_MEMORY) ? "pci mem" : "io base",
base);
......@@ -207,7 +207,7 @@ void usb_hcd_pci_remove (struct pci_dev *dev)
hcd = pci_get_drvdata(dev);
if (!hcd)
return;
dev_info (*hcd->controller, "remove, state %x\n", hcd->state);
dev_info (hcd->controller, "remove, state %x\n", hcd->state);
if (in_interrupt ()) BUG ();
......@@ -234,7 +234,7 @@ void usb_hcd_pci_remove (struct pci_dev *dev)
usb_deregister_bus (&hcd->self);
if (atomic_read (&hcd->self.refcnt) != 1) {
dev_warn (*hcd->controller,
dev_warn (hcd->controller,
"dangling refs (%d) to bus %d!\n",
atomic_read (&hcd->self.refcnt) - 1,
hcd->self.busnum);
......@@ -285,7 +285,7 @@ int usb_hcd_pci_suspend (struct pci_dev *dev, u32 state)
int retval;
hcd = pci_get_drvdata(dev);
dev_info (*hcd->controller, "suspend to state %d\n", state);
dev_info (hcd->controller, "suspend to state %d\n", state);
pci_save_state (dev, hcd->pci_state);
......@@ -314,12 +314,12 @@ int usb_hcd_pci_resume (struct pci_dev *dev)
int retval;
hcd = pci_get_drvdata(dev);
dev_info (*hcd->controller, "resume\n");
dev_info (hcd->controller, "resume\n");
/* guard against multiple resumes (APM bug?) */
atomic_inc (&hcd->resume_count);
if (atomic_read (&hcd->resume_count) != 1) {
dev_err (*hcd->controller, "concurrent PCI resumes\n");
dev_err (hcd->controller, "concurrent PCI resumes\n");
retval = 0;
goto done;
}
......
......@@ -347,7 +347,7 @@ static int rh_call_control (struct usb_hcd *hcd, struct urb *urb)
/* FALLTHROUGH */
case DeviceOutRequest | USB_REQ_CLEAR_FEATURE:
case DeviceOutRequest | USB_REQ_SET_FEATURE:
dev_dbg (*hcd->controller, "no device features yet yet\n");
dev_dbg (hcd->controller, "no device features yet yet\n");
break;
case DeviceRequest | USB_REQ_GET_CONFIGURATION:
ubuf [0] = 1;
......@@ -390,7 +390,7 @@ static int rh_call_control (struct usb_hcd *hcd, struct urb *urb)
break;
case DeviceOutRequest | USB_REQ_SET_ADDRESS:
// wValue == urb->dev->devaddr
dev_dbg (*hcd->controller, "root hub device address %d\n",
dev_dbg (hcd->controller, "root hub device address %d\n",
wValue);
break;
......@@ -405,7 +405,7 @@ static int rh_call_control (struct usb_hcd *hcd, struct urb *urb)
/* FALLTHROUGH */
case EndpointOutRequest | USB_REQ_CLEAR_FEATURE:
case EndpointOutRequest | USB_REQ_SET_FEATURE:
dev_dbg (*hcd->controller, "no endpoint features yet\n");
dev_dbg (hcd->controller, "no endpoint features yet\n");
break;
/* CLASS REQUESTS (and errors) */
......@@ -419,12 +419,12 @@ static int rh_call_control (struct usb_hcd *hcd, struct urb *urb)
error:
/* "protocol stall" on error */
urb->status = -EPIPE;
dev_dbg (*hcd->controller, "unsupported hub control message (maxchild %d)\n",
dev_dbg (hcd->controller, "unsupported hub control message (maxchild %d)\n",
urb->dev->maxchild);
}
if (urb->status) {
urb->actual_length = 0;
dev_dbg (*hcd->controller, "CTRL: TypeReq=0x%x val=0x%x idx=0x%x len=%d ==> %d\n",
dev_dbg (hcd->controller, "CTRL: TypeReq=0x%x val=0x%x idx=0x%x len=%d ==> %d\n",
typeReq, wValue, wIndex, wLength, urb->status);
}
if (bufp) {
......@@ -457,7 +457,7 @@ static int rh_status_urb (struct usb_hcd *hcd, struct urb *urb)
if (timer_pending (&hcd->rh_timer)
|| urb->status != -EINPROGRESS
|| urb->transfer_buffer_length < len) {
dev_dbg (*hcd->controller, "not queuing status urb, stat %d\n", urb->status);
dev_dbg (hcd->controller, "not queuing status urb, stat %d\n", urb->status);
return -EINVAL;
}
......@@ -668,7 +668,7 @@ void usb_register_bus(struct usb_bus *bus)
usbfs_add_bus (bus);
dev_info (*bus->controller, "new USB bus registered, assigned bus number %d\n", bus->busnum);
dev_info (bus->controller, "new USB bus registered, assigned bus number %d\n", bus->busnum);
}
EXPORT_SYMBOL (usb_register_bus);
......@@ -682,7 +682,7 @@ EXPORT_SYMBOL (usb_register_bus);
*/
void usb_deregister_bus (struct usb_bus *bus)
{
dev_info (*bus->controller, "USB bus %d deregistered\n", bus->busnum);
dev_info (bus->controller, "USB bus %d deregistered\n", bus->busnum);
/*
* NOTE: make sure that all the devices are removed by the
......@@ -718,7 +718,7 @@ int usb_register_root_hub (struct usb_device *usb_dev, struct device *parent_dev
sprintf (&usb_dev->dev.bus_id[0], "usb%d", usb_dev->bus->busnum);
retval = usb_new_device (usb_dev, parent_dev);
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);
return retval;
}
......@@ -825,7 +825,7 @@ int usb_check_bandwidth (struct usb_device *dev, struct urb *urb)
#else
"would have ";
#endif
dev_dbg (dev->dev, "usb_check_bandwidth %sFAILED: %d + %ld = %d usec\n",
dev_dbg (&dev->dev, "usb_check_bandwidth %sFAILED: %d + %ld = %d usec\n",
mode, old_alloc, bustime, new_alloc);
#endif
#ifdef CONFIG_USB_BANDWIDTH
......@@ -864,7 +864,7 @@ void usb_claim_bandwidth (struct usb_device *dev, struct urb *urb, int bustime,
urb->bandwidth = bustime;
#ifdef USB_BANDWIDTH_MESSAGES
dev_dbg (dev->dev, "bandwidth alloc increased by %d (%s) to %d for %d requesters\n",
dev_dbg (&dev->dev, "bandwidth alloc increased by %d (%s) to %d for %d requesters\n",
bustime,
isoc ? "ISOC" : "INTR",
dev->bus->bandwidth_allocated,
......@@ -893,7 +893,7 @@ void usb_release_bandwidth (struct usb_device *dev, struct urb *urb, int isoc)
dev->bus->bandwidth_int_reqs--;
#ifdef USB_BANDWIDTH_MESSAGES
dev_dbg (dev->dev, "bandwidth alloc reduced by %d (%s) to %d for %d requesters\n",
dev_dbg (&dev->dev, "bandwidth alloc reduced by %d (%s) to %d for %d requesters\n",
urb->bandwidth,
isoc ? "ISOC" : "INTR",
dev->bus->bandwidth_allocated,
......@@ -1154,7 +1154,7 @@ static int hcd_unlink_urb (struct urb *urb)
*/
if (!(urb->transfer_flags & URB_ASYNC_UNLINK)) {
if (in_interrupt ()) {
dev_dbg (*hcd->controller, "non-async unlink in_interrupt");
dev_dbg (hcd->controller, "non-async unlink in_interrupt");
retval = -EWOULDBLOCK;
goto done;
}
......@@ -1180,7 +1180,7 @@ static int hcd_unlink_urb (struct urb *urb)
/* hcds shouldn't really fail these calls, but... */
if (retval) {
dev_dbg (*sys, "dequeue %p --> %d\n", urb, retval);
dev_dbg (sys, "dequeue %p --> %d\n", urb, retval);
if (!(urb->transfer_flags & URB_ASYNC_UNLINK)) {
spin_lock_irqsave (&urb->lock, flags);
urb->complete = splice.complete;
......@@ -1203,7 +1203,7 @@ static int hcd_unlink_urb (struct urb *urb)
spin_unlock_irqrestore (&urb->lock, flags);
bye:
if (retval && sys)
dev_dbg (*sys, "hcd_unlink_urb %p fail %d\n", urb, retval);
dev_dbg (sys, "hcd_unlink_urb %p fail %d\n", urb, retval);
return retval;
}
......@@ -1234,7 +1234,7 @@ static int hcd_free_dev (struct usb_device *udev)
/* device driver problem with refcounts? */
if (!list_empty (&dev->urb_list)) {
dev_dbg (*hcd->controller, "free busy dev, %s devnum %d (bug!)\n",
dev_dbg (hcd->controller, "free busy dev, %s devnum %d (bug!)\n",
hcd->self.bus_name, udev->devnum);
return -EINVAL;
}
......@@ -1367,7 +1367,7 @@ void usb_hc_died (struct usb_hcd *hcd)
dev = list_entry (devlist, struct hcd_dev, dev_list);
list_for_each (urblist, &dev->urb_list) {
urb = list_entry (urblist, struct urb, urb_list);
dev_dbg (*hcd->controller, "shutdown %s urb %p pipe %x, current status %d\n",
dev_dbg (hcd->controller, "shutdown %s urb %p pipe %x, current status %d\n",
hcd->self.bus_name, urb, urb->pipe, urb->status);
if (urb->status == -EINPROGRESS)
urb->status = -ESHUTDOWN;
......
......@@ -263,7 +263,7 @@ static void usb_hub_power_on(struct usb_hub *hub)
int i;
/* Enable power to the ports */
dev_dbg(*hubdev(interface_to_usbdev(hub->intf)),
dev_dbg(hubdev(interface_to_usbdev(hub->intf)),
"enabling power on all ports\n");
dev = interface_to_usbdev(hub->intf);
for (i = 0; i < hub->descriptor->bNbrPorts; i++)
......@@ -307,7 +307,7 @@ static int usb_hub_configure(struct usb_hub *hub,
hub_dev = hubdev(dev);
dev->maxchild = hub->descriptor->bNbrPorts;
dev_info (*hub_dev, "%d port%s detected\n", dev->maxchild,
dev_info (hub_dev, "%d port%s detected\n", dev->maxchild,
(dev->maxchild == 1) ? "" : "s");
le16_to_cpus(&hub->descriptor->wHubCharacteristics);
......@@ -321,33 +321,33 @@ static int usb_hub_configure(struct usb_hub *hub,
[((i + 1) / 8)] & (1 << ((i + 1) % 8))
? 'F' : 'R';
portstr[dev->maxchild] = 0;
dev_dbg(*hub_dev, "compound device; port removable status: %s\n", portstr);
dev_dbg(hub_dev, "compound device; port removable status: %s\n", portstr);
} else
dev_dbg(*hub_dev, "standalone hub\n");
dev_dbg(hub_dev, "standalone hub\n");
switch (hub->descriptor->wHubCharacteristics & HUB_CHAR_LPSM) {
case 0x00:
dev_dbg(*hub_dev, "ganged power switching\n");
dev_dbg(hub_dev, "ganged power switching\n");
break;
case 0x01:
dev_dbg(*hub_dev, "individual port power switching\n");
dev_dbg(hub_dev, "individual port power switching\n");
break;
case 0x02:
case 0x03:
dev_dbg(*hub_dev, "unknown reserved power switching mode\n");
dev_dbg(hub_dev, "unknown reserved power switching mode\n");
break;
}
switch (hub->descriptor->wHubCharacteristics & HUB_CHAR_OCPM) {
case 0x00:
dev_dbg(*hub_dev, "global over-current protection\n");
dev_dbg(hub_dev, "global over-current protection\n");
break;
case 0x08:
dev_dbg(*hub_dev, "individual port over-current protection\n");
dev_dbg(hub_dev, "individual port over-current protection\n");
break;
case 0x10:
case 0x18:
dev_dbg(*hub_dev, "no over-current protection\n");
dev_dbg(hub_dev, "no over-current protection\n");
break;
}
......@@ -358,16 +358,16 @@ static int usb_hub_configure(struct usb_hub *hub,
case 0:
break;
case 1:
dev_dbg(*hub_dev, "Single TT\n");
dev_dbg(hub_dev, "Single TT\n");
hub->tt.hub = dev;
break;
case 2:
dev_dbg(*hub_dev, "TT per port\n");
dev_dbg(hub_dev, "TT per port\n");
hub->tt.hub = dev;
hub->tt.multi = 1;
break;
default:
dev_dbg(*hub_dev, "Unrecognized hub protocol %d\n",
dev_dbg(hub_dev, "Unrecognized hub protocol %d\n",
dev->descriptor.bDeviceProtocol);
break;
}
......@@ -375,26 +375,26 @@ static int usb_hub_configure(struct usb_hub *hub,
switch (hub->descriptor->wHubCharacteristics & HUB_CHAR_TTTT) {
case 0x00:
if (dev->descriptor.bDeviceProtocol != 0)
dev_dbg(*hub_dev, "TT requires at most 8 FS bit times\n");
dev_dbg(hub_dev, "TT requires at most 8 FS bit times\n");
break;
case 0x20:
dev_dbg(*hub_dev, "TT requires at most 16 FS bit times\n");
dev_dbg(hub_dev, "TT requires at most 16 FS bit times\n");
break;
case 0x40:
dev_dbg(*hub_dev, "TT requires at most 24 FS bit times\n");
dev_dbg(hub_dev, "TT requires at most 24 FS bit times\n");
break;
case 0x60:
dev_dbg(*hub_dev, "TT requires at most 32 FS bit times\n");
dev_dbg(hub_dev, "TT requires at most 32 FS bit times\n");
break;
}
dev_dbg(*hub_dev, "Port indicators are %s supported\n",
dev_dbg(hub_dev, "Port indicators are %s supported\n",
(hub->descriptor->wHubCharacteristics & HUB_CHAR_PORTIND)
? "" : "not");
dev_dbg(*hub_dev, "power on to power good time: %dms\n",
dev_dbg(hub_dev, "power on to power good time: %dms\n",
hub->descriptor->bPwrOn2PwrGood * 2);
dev_dbg(*hub_dev, "hub controller current requirement: %dmA\n",
dev_dbg(hub_dev, "hub controller current requirement: %dmA\n",
hub->descriptor->bHubContrCurrent);
ret = usb_get_hub_status(dev, &hubstatus);
......@@ -405,11 +405,11 @@ static int usb_hub_configure(struct usb_hub *hub,
le16_to_cpus(&hubstatus.wHubStatus);
dev_dbg(*hub_dev, "local power source is %s\n",
dev_dbg(hub_dev, "local power source is %s\n",
(hubstatus.wHubStatus & HUB_STATUS_LOCAL_POWER)
? "lost (inactive)" : "good");
dev_dbg(*hub_dev, "%sover-current condition exists\n",
dev_dbg(hub_dev, "%sover-current condition exists\n",
(hubstatus.wHubStatus & HUB_STATUS_OVERCURRENT) ? "" : "no ");
/* Start the interrupt endpoint */
......@@ -442,7 +442,7 @@ static int usb_hub_configure(struct usb_hub *hub,
return 0;
fail:
dev_err (hub->intf->dev, "config failed, %s (err %d)\n",
dev_err (&hub->intf->dev, "config failed, %s (err %d)\n",
message, ret);
/* hub_disconnect() frees urb and descriptor */
return ret;
......@@ -505,7 +505,7 @@ static int hub_probe(struct usb_interface *intf, const struct usb_device_id *id)
if ((desc->desc.bInterfaceSubClass != 0) &&
(desc->desc.bInterfaceSubClass != 1)) {
descriptor_error:
dev_err (intf->dev, "bad descriptor, ignoring hub\n");
dev_err (&intf->dev, "bad descriptor, ignoring hub\n");
return -EIO;
}
......@@ -529,7 +529,7 @@ static int hub_probe(struct usb_interface *intf, const struct usb_device_id *id)
}
/* We found a hub */
dev_info (*hubdev (dev), "USB hub found\n");
dev_info (hubdev (dev), "USB hub found\n");
hub = kmalloc(sizeof(*hub), GFP_KERNEL);
if (!hub) {
......@@ -714,7 +714,7 @@ static int usb_hub_port_wait_reset(struct usb_device *hub, int port,
if (delay_time >= 2 * HUB_SHORT_RESET_TIME)
delay = HUB_LONG_RESET_TIME;
dev_dbg (*hubdev (hub),
dev_dbg (hubdev (hub),
"port %d not reset yet, waiting %dms\n",
port + 1, delay);
}
......@@ -740,13 +740,13 @@ static int usb_hub_port_reset(struct usb_device *hub, int port,
return status;
}
dev_dbg (*hubdev (hub),
dev_dbg (hubdev (hub),
"port %d not enabled, trying reset again...\n",
port + 1);
delay = HUB_LONG_RESET_TIME;
}
dev_err (*hubdev (hub),
dev_err (hubdev (hub),
"Cannot enable port %i. Maybe the USB cable is bad?\n",
port + 1);
......@@ -814,7 +814,7 @@ static int usb_hub_port_debounce(struct usb_device *hub, int port)
}
/* XXX Replace this with dbg() when 2.6 is about to ship. */
dev_info (*hubdev (hub),
dev_info (hubdev (hub),
"debounce: port %d: delay %dms stable %d status 0x%x\n",
port + 1, delay_time, stable_count, portstatus);
......@@ -829,7 +829,7 @@ static void usb_hub_port_connect_change(struct usb_hub *hubstate, int port,
unsigned int delay = HUB_SHORT_RESET_TIME;
int i;
dev_dbg (hubstate->intf->dev,
dev_dbg (&hubstate->intf->dev,
"port %d, status %x, change %x, %s\n",
port + 1, portstatus, portchange, portspeed (portstatus));
......@@ -849,7 +849,7 @@ static void usb_hub_port_connect_change(struct usb_hub *hubstate, int port,
}
if (usb_hub_port_debounce(hub, port)) {
dev_err (hubstate->intf->dev,
dev_err (&hubstate->intf->dev,
"connect-debounce failed, port %d disabled\n",
port+1);
usb_hub_port_disable(hub, port);
......@@ -870,7 +870,7 @@ static void usb_hub_port_connect_change(struct usb_hub *hubstate, int port,
/* Allocate a new device struct */
dev = usb_alloc_dev(hub, hub->bus);
if (!dev) {
dev_err (hubstate->intf->dev,
dev_err (&hubstate->intf->dev,
"couldn't allocate usb_device\n");
break;
}
......@@ -914,10 +914,10 @@ static void usb_hub_port_connect_change(struct usb_hub *hubstate, int port,
len = snprintf (dev->devpath, sizeof dev->devpath,
"%d", port + 1);
if (len == sizeof dev->devpath)
dev_err (hubstate->intf->dev,
dev_err (&hubstate->intf->dev,
"devpath size! usb/%03d/%03d path %s\n",
dev->bus->busnum, dev->devnum, dev->devpath);
dev_info (hubstate->intf->dev,
dev_info (&hubstate->intf->dev,
"new USB device on port %d, assigned address %d\n",
port + 1, dev->devnum);
......@@ -1006,7 +1006,7 @@ static void usb_hub_events(void)
if (portchange & USB_PORT_STAT_C_CONNECTION) {
usb_hub_port_connect_change(hub, i, portstatus, portchange);
} else if (portchange & USB_PORT_STAT_C_ENABLE) {
dev_dbg (*hubdev (dev),
dev_dbg (hubdev (dev),
"port %d enable change, status %x\n",
i + 1, portstatus);
usb_clear_port_feature(dev,
......
......@@ -177,7 +177,7 @@ void usb_show_string(struct usb_device *dev, char *id, int index)
if (!(buf = kmalloc(256, GFP_KERNEL)))
return;
if (usb_string(dev, index, buf, 256) > 0)
dev_printk(KERN_INFO, dev->dev, "%s: %s\n", id, buf);
dev_printk(KERN_INFO, &dev->dev, "%s: %s\n", id, buf);
kfree(buf);
}
......
......@@ -84,19 +84,19 @@ int usb_device_probe(struct device *dev)
const struct usb_device_id *id;
int error = -ENODEV;
dev_dbg(*dev, "%s\n", __FUNCTION__);
dev_dbg(dev, "%s\n", __FUNCTION__);
if (!driver->probe)
return error;
if (!try_module_get(driver->owner)) {
dev_err (*dev, "Can't get a module reference for %s\n", driver->name);
dev_err (dev, "Can't get a module reference for %s\n", driver->name);
return error;
}
id = usb_match_id (intf, driver->id_table);
if (id) {
dev_dbg (*dev, "%s - got id\n", __FUNCTION__);
dev_dbg (dev, "%s - got id\n", __FUNCTION__);
down (&driver->serialize);
error = driver->probe (intf, id);
up (&driver->serialize);
......@@ -118,7 +118,7 @@ int usb_device_remove(struct device *dev)
driver = to_usb_driver(dev->driver);
if (!driver) {
dev_err(*dev, "%s does not have a valid driver to work with!",
dev_err(dev, "%s does not have a valid driver to work with!",
__FUNCTION__);
return -ENODEV;
}
......@@ -126,7 +126,7 @@ int usb_device_remove(struct device *dev)
if (!try_module_get(driver->owner)) {
// FIXME this happens even when we just rmmod
// drivers that aren't in active use...
dev_err(*dev, "Dieing driver still bound to device.\n");
dev_err(dev, "Dieing driver still bound to device.\n");
return -EIO;
}
......@@ -827,7 +827,7 @@ void usb_disconnect(struct usb_device **pdev)
*pdev = NULL;
dev_info (dev->dev, "USB disconnect, address %d\n", dev->devnum);
dev_info (&dev->dev, "USB disconnect, address %d\n", dev->devnum);
/* Free up all the children before we remove this device */
for (i = 0; i < USB_MAXCHILDREN; i++) {
......@@ -836,7 +836,7 @@ void usb_disconnect(struct usb_device **pdev)
usb_disconnect(child);
}
dev_dbg (dev->dev, "unregistering interfaces\n");
dev_dbg (&dev->dev, "unregistering interfaces\n");
if (dev->actconfig) {
for (i = 0; i < dev->actconfig->desc.bNumInterfaces; i++) {
struct usb_interface *interface = &dev->actconfig->interface[i];
......@@ -846,7 +846,7 @@ void usb_disconnect(struct usb_device **pdev)
}
}
dev_dbg (dev->dev, "unregistering device\n");
dev_dbg (&dev->dev, "unregistering device\n");
/* Free the device number and remove the /proc/bus/usb entry */
if (dev->devnum > 0) {
clear_bit(dev->devnum, dev->bus->devmap.devicemap);
......@@ -931,7 +931,7 @@ static void set_device_description (struct usb_device *dev)
if (prod && usb_string (dev, prod, prod_str, 256) > 0) {
#ifdef DEBUG
dev_printk (KERN_INFO, dev->dev, "Product: %s\n", prod_str);
dev_printk (KERN_INFO, &dev->dev, "Product: %s\n", prod_str);
#endif
} else {
prod_str = 0;
......@@ -939,7 +939,7 @@ static void set_device_description (struct usb_device *dev)
if (mfgr && usb_string (dev, mfgr, mfgr_str, 256) > 0) {
#ifdef DEBUG
dev_printk (KERN_INFO, dev->dev, "Manufacturer: %s\n", mfgr_str);
dev_printk (KERN_INFO, &dev->dev, "Manufacturer: %s\n", mfgr_str);
#endif
} else {
mfgr_str = 0;
......@@ -1042,7 +1042,7 @@ int usb_new_device(struct usb_device *dev, struct device *parent)
wait_ms(200);
}
if (err < 0) {
dev_err(dev->dev, "USB device not accepting new address=%d (error=%d)\n",
dev_err(&dev->dev, "USB device not accepting new address=%d (error=%d)\n",
dev->devnum, err);
clear_bit(dev->devnum, dev->bus->devmap.devicemap);
dev->devnum = -1;
......@@ -1060,9 +1060,9 @@ int usb_new_device(struct usb_device *dev, struct device *parent)
if (err < 8) {
if (err < 0)
dev_err(dev->dev, "USB device not responding, giving up (error=%d)\n", err);
dev_err(&dev->dev, "USB device not responding, giving up (error=%d)\n", err);
else
dev_err(dev->dev, "USB device descriptor short read (expected %i, got %i)\n", 8, err);
dev_err(&dev->dev, "USB device descriptor short read (expected %i, got %i)\n", 8, err);
clear_bit(dev->devnum, dev->bus->devmap.devicemap);
dev->devnum = -1;
return 1;
......@@ -1077,9 +1077,9 @@ int usb_new_device(struct usb_device *dev, struct device *parent)
err = usb_get_device_descriptor(dev);
if (err < (signed)sizeof(dev->descriptor)) {
if (err < 0)
dev_err(dev->dev, "unable to get device descriptor (error=%d)\n", err);
dev_err(&dev->dev, "unable to get device descriptor (error=%d)\n", err);
else
dev_err(dev->dev, "USB device descriptor short read (expected %Zi, got %i)\n",
dev_err(&dev->dev, "USB device descriptor short read (expected %Zi, got %i)\n",
sizeof(dev->descriptor), err);
clear_bit(dev->devnum, dev->bus->devmap.devicemap);
......@@ -1089,7 +1089,7 @@ int usb_new_device(struct usb_device *dev, struct device *parent)
err = usb_get_configuration(dev);
if (err < 0) {
dev_err(dev->dev, "unable to get device %d configuration (error=%d)\n",
dev_err(&dev->dev, "unable to get device %d configuration (error=%d)\n",
dev->devnum, err);
clear_bit(dev->devnum, dev->bus->devmap.devicemap);
dev->devnum = -1;
......@@ -1099,7 +1099,7 @@ int usb_new_device(struct usb_device *dev, struct device *parent)
/* we set the default configuration here */
err = usb_set_configuration(dev, dev->config[0].desc.bConfigurationValue);
if (err) {
dev_err(dev->dev, "failed to set device %d default configuration (error=%d)\n",
dev_err(&dev->dev, "failed to set device %d default configuration (error=%d)\n",
dev->devnum, err);
clear_bit(dev->devnum, dev->bus->devmap.devicemap);
dev->devnum = -1;
......@@ -1108,7 +1108,7 @@ int usb_new_device(struct usb_device *dev, struct device *parent)
/* USB device state == configured ... tell the world! */
dev_dbg(dev->dev, "new device strings: Mfr=%d, Product=%d, SerialNumber=%d\n",
dev_dbg(&dev->dev, "new device strings: Mfr=%d, Product=%d, SerialNumber=%d\n",
dev->descriptor.iManufacturer, dev->descriptor.iProduct, dev->descriptor.iSerialNumber);
set_device_description (dev);
......@@ -1151,7 +1151,7 @@ int usb_new_device(struct usb_device *dev, struct device *parent)
dev->bus->bus_name, dev->devpath,
desc->bInterfaceNumber);
}
dev_dbg (dev->dev, "%s - registering interface %s\n", __FUNCTION__, interface->dev.bus_id);
dev_dbg (&dev->dev, "%s - registering interface %s\n", __FUNCTION__, interface->dev.bus_id);
device_add (&interface->dev);
usb_create_driverfs_intf_files (interface);
}
......
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