aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/misc
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>2012-05-02 00:34:07 -0400
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2012-05-02 00:34:07 -0400
commit7a2d281060fad7ef9220b8c051da38eae6c5f366 (patch)
tree34750ff2cf6b51606b4fb1d1fdbdc637d6770cc8 /drivers/usb/misc
parentd8ec7a7c1c2139ace5b8da79600bcef756e0b349 (diff)
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>
Diffstat (limited to 'drivers/usb/misc')
-rw-r--r--drivers/usb/misc/uss720.c34
1 files changed, 19 insertions, 15 deletions
diff --git a/drivers/usb/misc/uss720.c b/drivers/usb/misc/uss720.c
index 7f64147ea229..29cad9e0a7a9 100644
--- a/drivers/usb/misc/uss720.c
+++ b/drivers/usb/misc/uss720.c
@@ -85,9 +85,9 @@ static void destroy_priv(struct kref *kref)
85{ 85{
86 struct parport_uss720_private *priv = container_of(kref, struct parport_uss720_private, ref_count); 86 struct parport_uss720_private *priv = container_of(kref, struct parport_uss720_private, ref_count);
87 87
88 dev_dbg(&priv->usbdev->dev, "destroying priv datastructure\n");
88 usb_put_dev(priv->usbdev); 89 usb_put_dev(priv->usbdev);
89 kfree(priv); 90 kfree(priv);
90 dbg("destroying priv datastructure");
91} 91}
92 92
93static void destroy_async(struct kref *kref) 93static void destroy_async(struct kref *kref)
@@ -123,10 +123,12 @@ static void async_complete(struct urb *urb)
123 } else if (rq->dr.bRequest == 3) { 123 } else if (rq->dr.bRequest == 3) {
124 memcpy(priv->reg, rq->reg, sizeof(priv->reg)); 124 memcpy(priv->reg, rq->reg, sizeof(priv->reg));
125#if 0 125#if 0
126 dbg("async_complete regs %02x %02x %02x %02x %02x %02x %02x", 126 dev_dbg(&priv->usbdev->dev,
127 (unsigned int)priv->reg[0], (unsigned int)priv->reg[1], (unsigned int)priv->reg[2], 127 "async_complete regs %02x %02x %02x %02x %02x %02x %02x\n",
128 (unsigned int)priv->reg[3], (unsigned int)priv->reg[4], (unsigned int)priv->reg[5], 128 (unsigned int)priv->reg[0], (unsigned int)priv->reg[1],
129 (unsigned int)priv->reg[6]); 129 (unsigned int)priv->reg[2], (unsigned int)priv->reg[3],
130 (unsigned int)priv->reg[4], (unsigned int)priv->reg[5],
131 (unsigned int)priv->reg[6]);
130#endif 132#endif
131 /* if nAck interrupts are enabled and we have an interrupt, call the interrupt procedure */ 133 /* if nAck interrupts are enabled and we have an interrupt, call the interrupt procedure */
132 if (rq->reg[2] & rq->reg[1] & 0x10 && pp) 134 if (rq->reg[2] & rq->reg[1] & 0x10 && pp)
@@ -693,9 +695,9 @@ static int uss720_probe(struct usb_interface *intf,
693 unsigned char reg; 695 unsigned char reg;
694 int i; 696 int i;
695 697
696 dbg("probe: vendor id 0x%x, device id 0x%x\n", 698 dev_dbg(&intf->dev, "probe: vendor id 0x%x, device id 0x%x\n",
697 le16_to_cpu(usbdev->descriptor.idVendor), 699 le16_to_cpu(usbdev->descriptor.idVendor),
698 le16_to_cpu(usbdev->descriptor.idProduct)); 700 le16_to_cpu(usbdev->descriptor.idProduct));
699 701
700 /* our known interfaces have 3 alternate settings */ 702 /* our known interfaces have 3 alternate settings */
701 if (intf->num_altsetting != 3) { 703 if (intf->num_altsetting != 3) {
@@ -703,7 +705,7 @@ static int uss720_probe(struct usb_interface *intf,
703 return -ENODEV; 705 return -ENODEV;
704 } 706 }
705 i = usb_set_interface(usbdev, intf->altsetting->desc.bInterfaceNumber, 2); 707 i = usb_set_interface(usbdev, intf->altsetting->desc.bInterfaceNumber, 2);
706 dbg("set inteface result %d", i); 708 dev_dbg(&intf->dev, "set inteface result %d\n", i);
707 709
708 interface = intf->cur_altsetting; 710 interface = intf->cur_altsetting;
709 711
@@ -734,11 +736,13 @@ static int uss720_probe(struct usb_interface *intf,
734 set_1284_register(pp, 2, 0x0c, GFP_KERNEL); 736 set_1284_register(pp, 2, 0x0c, GFP_KERNEL);
735 /* debugging */ 737 /* debugging */
736 get_1284_register(pp, 0, &reg, GFP_KERNEL); 738 get_1284_register(pp, 0, &reg, GFP_KERNEL);
737 dbg("reg: %02x %02x %02x %02x %02x %02x %02x", 739 dev_dbg(&intf->dev, "reg: %02x %02x %02x %02x %02x %02x %02x\n",
738 priv->reg[0], priv->reg[1], priv->reg[2], priv->reg[3], priv->reg[4], priv->reg[5], priv->reg[6]); 740 priv->reg[0], priv->reg[1], priv->reg[2], priv->reg[3],
741 priv->reg[4], priv->reg[5], priv->reg[6]);
739 742
740 endpoint = &interface->endpoint[2]; 743 endpoint = &interface->endpoint[2];
741 dbg("epaddr %d interval %d", endpoint->desc.bEndpointAddress, endpoint->desc.bInterval); 744 dev_dbg(&intf->dev, "epaddr %d interval %d\n",
745 endpoint->desc.bEndpointAddress, endpoint->desc.bInterval);
742 parport_announce_port(pp); 746 parport_announce_port(pp);
743 747
744 usb_set_intfdata(intf, pp); 748 usb_set_intfdata(intf, pp);
@@ -756,20 +760,20 @@ static void uss720_disconnect(struct usb_interface *intf)
756 struct parport_uss720_private *priv; 760 struct parport_uss720_private *priv;
757 struct usb_device *usbdev; 761 struct usb_device *usbdev;
758 762
759 dbg("disconnect"); 763 dev_dbg(&intf->dev, "disconnect\n");
760 usb_set_intfdata(intf, NULL); 764 usb_set_intfdata(intf, NULL);
761 if (pp) { 765 if (pp) {
762 priv = pp->private_data; 766 priv = pp->private_data;
763 usbdev = priv->usbdev; 767 usbdev = priv->usbdev;
764 priv->usbdev = NULL; 768 priv->usbdev = NULL;
765 priv->pp = NULL; 769 priv->pp = NULL;
766 dbg("parport_remove_port"); 770 dev_dbg(&intf->dev, "parport_remove_port\n");
767 parport_remove_port(pp); 771 parport_remove_port(pp);
768 parport_put_port(pp); 772 parport_put_port(pp);
769 kill_all_async_requests_priv(priv); 773 kill_all_async_requests_priv(priv);
770 kref_put(&priv->ref_count, destroy_priv); 774 kref_put(&priv->ref_count, destroy_priv);
771 } 775 }
772 dbg("disconnect done"); 776 dev_dbg(&intf->dev, "disconnect done\n");
773} 777}
774 778
775/* table of cables that work through this driver */ 779/* table of cables that work through this driver */