ChangeSet 1.879.9.15, 2003/01/07 14:51:54-08:00, greg@kroah.com

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


diff -Nru a/drivers/usb/core/hcd-pci.c b/drivers/usb/core/hcd-pci.c
--- a/drivers/usb/core/hcd-pci.c	Wed Jan  8 11:59:00 2003
+++ b/drivers/usb/core/hcd-pci.c	Wed Jan  8 11:59:00 2003
@@ -147,7 +147,7 @@
 		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 @@
 #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 @@
 
 	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 @@
 	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 @@
 
 	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			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			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;
 	}
diff -Nru a/drivers/usb/core/hcd.c b/drivers/usb/core/hcd.c
--- a/drivers/usb/core/hcd.c	Wed Jan  8 11:59:00 2003
+++ b/drivers/usb/core/hcd.c	Wed Jan  8 11:59:00 2003
@@ -347,7 +347,7 @@
 			/* 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 @@
 		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 @@
 			/* 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 @@
 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 @@
 	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 @@
 
 	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 @@
  */
 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 @@
 	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 @@
 #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 @@
 	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 @@
 		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 @@
 	 */
 	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 @@
 
 		/* 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 @@
 	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 @@
 
 	/* 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 @@
 		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;
diff -Nru a/drivers/usb/core/hub.c b/drivers/usb/core/hub.c
--- a/drivers/usb/core/hub.c	Wed Jan  8 11:59:00 2003
+++ b/drivers/usb/core/hub.c	Wed Jan  8 11:59:00 2003
@@ -263,7 +263,7 @@
 	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 @@
 
 	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 @@
 				    [((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 @@
 		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 @@
 	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 @@
 
 	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 @@
 	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 @@
 	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 @@
 	}
 
 	/* 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 @@
 		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 @@
 			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 @@
 	}
 
 	/* 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 @@
 	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 @@
 	}
 
 	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 @@
 		/* 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 @@
 			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 @@
 			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,
diff -Nru a/drivers/usb/core/usb-debug.c b/drivers/usb/core/usb-debug.c
--- a/drivers/usb/core/usb-debug.c	Wed Jan  8 11:59:00 2003
+++ b/drivers/usb/core/usb-debug.c	Wed Jan  8 11:59:00 2003
@@ -177,7 +177,7 @@
 	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);
 }
 
diff -Nru a/drivers/usb/core/usb.c b/drivers/usb/core/usb.c
--- a/drivers/usb/core/usb.c	Wed Jan  8 11:59:00 2003
+++ b/drivers/usb/core/usb.c	Wed Jan  8 11:59:00 2003
@@ -84,19 +84,19 @@
 	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 @@
 	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 @@
 	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 @@
 
 	*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 @@
 			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 @@
 		}
 	}
 
-	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 @@
 
 	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 @@
 
 	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 @@
 			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 @@
 
 	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 @@
 	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 @@
 
 	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 @@
 	/* 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 @@
 
 	/* 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 @@
 				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);
 	}
