dect
/
linux-2.6
Archived
13
0
Fork 0

USB: uss720.c: remove dbg() usage

dbg() was a very old USB-specific macro that should no longer
be used. This patch removes it from being used in the driver
and uses dev_dbg() instead.

Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
Greg Kroah-Hartman 2012-05-01 21:34:07 -07:00
parent d8ec7a7c1c
commit 7a2d281060
1 changed files with 19 additions and 15 deletions

View File

@ -85,9 +85,9 @@ static void destroy_priv(struct kref *kref)
{ {
struct parport_uss720_private *priv = container_of(kref, struct parport_uss720_private, ref_count); struct parport_uss720_private *priv = container_of(kref, struct parport_uss720_private, ref_count);
dev_dbg(&priv->usbdev->dev, "destroying priv datastructure\n");
usb_put_dev(priv->usbdev); usb_put_dev(priv->usbdev);
kfree(priv); kfree(priv);
dbg("destroying priv datastructure");
} }
static void destroy_async(struct kref *kref) static void destroy_async(struct kref *kref)
@ -123,10 +123,12 @@ static void async_complete(struct urb *urb)
} else if (rq->dr.bRequest == 3) { } else if (rq->dr.bRequest == 3) {
memcpy(priv->reg, rq->reg, sizeof(priv->reg)); memcpy(priv->reg, rq->reg, sizeof(priv->reg));
#if 0 #if 0
dbg("async_complete regs %02x %02x %02x %02x %02x %02x %02x", dev_dbg(&priv->usbdev->dev,
(unsigned int)priv->reg[0], (unsigned int)priv->reg[1], (unsigned int)priv->reg[2], "async_complete regs %02x %02x %02x %02x %02x %02x %02x\n",
(unsigned int)priv->reg[3], (unsigned int)priv->reg[4], (unsigned int)priv->reg[5], (unsigned int)priv->reg[0], (unsigned int)priv->reg[1],
(unsigned int)priv->reg[6]); (unsigned int)priv->reg[2], (unsigned int)priv->reg[3],
(unsigned int)priv->reg[4], (unsigned int)priv->reg[5],
(unsigned int)priv->reg[6]);
#endif #endif
/* if nAck interrupts are enabled and we have an interrupt, call the interrupt procedure */ /* if nAck interrupts are enabled and we have an interrupt, call the interrupt procedure */
if (rq->reg[2] & rq->reg[1] & 0x10 && pp) if (rq->reg[2] & rq->reg[1] & 0x10 && pp)
@ -693,9 +695,9 @@ static int uss720_probe(struct usb_interface *intf,
unsigned char reg; unsigned char reg;
int i; int i;
dbg("probe: vendor id 0x%x, device id 0x%x\n", dev_dbg(&intf->dev, "probe: vendor id 0x%x, device id 0x%x\n",
le16_to_cpu(usbdev->descriptor.idVendor), le16_to_cpu(usbdev->descriptor.idVendor),
le16_to_cpu(usbdev->descriptor.idProduct)); le16_to_cpu(usbdev->descriptor.idProduct));
/* our known interfaces have 3 alternate settings */ /* our known interfaces have 3 alternate settings */
if (intf->num_altsetting != 3) { if (intf->num_altsetting != 3) {
@ -703,7 +705,7 @@ static int uss720_probe(struct usb_interface *intf,
return -ENODEV; return -ENODEV;
} }
i = usb_set_interface(usbdev, intf->altsetting->desc.bInterfaceNumber, 2); i = usb_set_interface(usbdev, intf->altsetting->desc.bInterfaceNumber, 2);
dbg("set inteface result %d", i); dev_dbg(&intf->dev, "set inteface result %d\n", i);
interface = intf->cur_altsetting; interface = intf->cur_altsetting;
@ -734,11 +736,13 @@ static int uss720_probe(struct usb_interface *intf,
set_1284_register(pp, 2, 0x0c, GFP_KERNEL); set_1284_register(pp, 2, 0x0c, GFP_KERNEL);
/* debugging */ /* debugging */
get_1284_register(pp, 0, &reg, GFP_KERNEL); get_1284_register(pp, 0, &reg, GFP_KERNEL);
dbg("reg: %02x %02x %02x %02x %02x %02x %02x", dev_dbg(&intf->dev, "reg: %02x %02x %02x %02x %02x %02x %02x\n",
priv->reg[0], priv->reg[1], priv->reg[2], priv->reg[3], priv->reg[4], priv->reg[5], priv->reg[6]); priv->reg[0], priv->reg[1], priv->reg[2], priv->reg[3],
priv->reg[4], priv->reg[5], priv->reg[6]);
endpoint = &interface->endpoint[2]; endpoint = &interface->endpoint[2];
dbg("epaddr %d interval %d", endpoint->desc.bEndpointAddress, endpoint->desc.bInterval); dev_dbg(&intf->dev, "epaddr %d interval %d\n",
endpoint->desc.bEndpointAddress, endpoint->desc.bInterval);
parport_announce_port(pp); parport_announce_port(pp);
usb_set_intfdata(intf, pp); usb_set_intfdata(intf, pp);
@ -756,20 +760,20 @@ static void uss720_disconnect(struct usb_interface *intf)
struct parport_uss720_private *priv; struct parport_uss720_private *priv;
struct usb_device *usbdev; struct usb_device *usbdev;
dbg("disconnect"); dev_dbg(&intf->dev, "disconnect\n");
usb_set_intfdata(intf, NULL); usb_set_intfdata(intf, NULL);
if (pp) { if (pp) {
priv = pp->private_data; priv = pp->private_data;
usbdev = priv->usbdev; usbdev = priv->usbdev;
priv->usbdev = NULL; priv->usbdev = NULL;
priv->pp = NULL; priv->pp = NULL;
dbg("parport_remove_port"); dev_dbg(&intf->dev, "parport_remove_port\n");
parport_remove_port(pp); parport_remove_port(pp);
parport_put_port(pp); parport_put_port(pp);
kill_all_async_requests_priv(priv); kill_all_async_requests_priv(priv);
kref_put(&priv->ref_count, destroy_priv); kref_put(&priv->ref_count, destroy_priv);
} }
dbg("disconnect done"); dev_dbg(&intf->dev, "disconnect done\n");
} }
/* table of cables that work through this driver */ /* table of cables that work through this driver */