Browse Source

USB: c67x00: remove CONFIG_USB_DEBUG dependancy

This removes the usage of CONFIG_USB_DEBUG in the c67x00 driver.  There
was only one place, where the TD was dumped to the kernel log, and that
was using the dynamic debug infrastructure already, with the exception
of the call to print_hex_dump().  So move everything to the dynamic
debug infrastructure, including one odd printk(KERN_DEBUG...) line that
looks like it was forgotten about a long time ago.

Acked-by: Peter Korsgaard <jacmet@sunsite.dk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Greg Kroah-Hartman 11 years ago
parent
commit
bee53637e5
2 changed files with 3 additions and 14 deletions
  1. 0 2
      drivers/usb/c67x00/Makefile
  2. 3 12
      drivers/usb/c67x00/c67x00-sched.c

+ 0 - 2
drivers/usb/c67x00/Makefile

@@ -2,8 +2,6 @@
 # Makefile for Cypress C67X00 USB Controller
 # Makefile for Cypress C67X00 USB Controller
 #
 #
 
 
-ccflags-$(CONFIG_USB_DEBUG) := -DDEBUG
-
 obj-$(CONFIG_USB_C67X00_HCD)	+= c67x00.o
 obj-$(CONFIG_USB_C67X00_HCD)	+= c67x00.o
 
 
 c67x00-y := c67x00-drv.o c67x00-ll-hpi.o c67x00-hcd.o c67x00-sched.o
 c67x00-y := c67x00-drv.o c67x00-ll-hpi.o c67x00-hcd.o c67x00-sched.o

+ 3 - 12
drivers/usb/c67x00/c67x00-sched.c

@@ -144,8 +144,6 @@ struct c67x00_urb_priv {
 
 
 /* -------------------------------------------------------------------------- */
 /* -------------------------------------------------------------------------- */
 
 
-#ifdef DEBUG
-
 /**
 /**
  * dbg_td - Dump the contents of the TD
  * dbg_td - Dump the contents of the TD
  */
  */
@@ -166,16 +164,8 @@ static void dbg_td(struct c67x00_hcd *c67x00, struct c67x00_td *td, char *msg)
 	dev_dbg(dev, "retry_cnt:      0x%02x\n", td->retry_cnt);
 	dev_dbg(dev, "retry_cnt:      0x%02x\n", td->retry_cnt);
 	dev_dbg(dev, "residue:        0x%02x\n", td->residue);
 	dev_dbg(dev, "residue:        0x%02x\n", td->residue);
 	dev_dbg(dev, "next_td_addr: 0x%04x\n", td_next_td_addr(td));
 	dev_dbg(dev, "next_td_addr: 0x%04x\n", td_next_td_addr(td));
-	dev_dbg(dev, "data:");
-	print_hex_dump(KERN_DEBUG, "", DUMP_PREFIX_OFFSET, 16, 1,
-		       td->data, td_length(td), 1);
+	dev_dbg(dev, "data: %*ph\n", td_length(td), td->data);
 }
 }
-#else				/* DEBUG */
-
-static inline void
-dbg_td(struct c67x00_hcd *c67x00, struct c67x00_td *td, char *msg) { }
-
-#endif				/* DEBUG */
 
 
 /* -------------------------------------------------------------------------- */
 /* -------------------------------------------------------------------------- */
 /* Helper functions */
 /* Helper functions */
@@ -780,7 +770,8 @@ static int c67x00_add_iso_urb(struct c67x00_hcd *c67x00, struct urb *urb)
 		ret = c67x00_create_td(c67x00, urb, td_buf, len, pid, 0,
 		ret = c67x00_create_td(c67x00, urb, td_buf, len, pid, 0,
 				       urbp->cnt);
 				       urbp->cnt);
 		if (ret) {
 		if (ret) {
-			printk(KERN_DEBUG "create failed: %d\n", ret);
+			dev_dbg(c67x00_hcd_dev(c67x00), "create failed: %d\n",
+				ret);
 			urb->iso_frame_desc[urbp->cnt].actual_length = 0;
 			urb->iso_frame_desc[urbp->cnt].actual_length = 0;
 			urb->iso_frame_desc[urbp->cnt].status = ret;
 			urb->iso_frame_desc[urbp->cnt].status = ret;
 			if (urbp->cnt + 1 == urb->number_of_packets)
 			if (urbp->cnt + 1 == urb->number_of_packets)