[OPW,kernel,1/2] staging/drivers/media/go7007:Remove unneeded calls to GO7007_USB_DEBUG
diff mbox

Message ID ba2a517946df21878a7f7be01bb652f4522403be.1380998245.git.dulshani.gunawardhana89@gmail.com
State Superseded
Headers show

Commit Message

Dulshani Gunawardhana Oct. 5, 2013, 7:09 p.m. UTC
Remove unneeded calls to GO7007_USB_DEBUG in go7007-usb.c

Signed-off-by: Dulshani Gunawardhana <dulshani.gunawardhana89@gmail.com>
---
 drivers/staging/media/go7007/go7007-usb.c | 16 ----------------
 1 file changed, 16 deletions(-)

Comments

Josh Triplett Oct. 5, 2013, 7:44 p.m. UTC | #1
On Sun, Oct 06, 2013 at 12:39:00AM +0530, Dulshani Gunawardhana wrote:
> Remove unneeded calls to GO7007_USB_DEBUG in go7007-usb.c

Minor nits: these aren't "calls", and you also removed the I2C flag as
well.  You could generalize to "Remove driver-specific debugging defines
in favor of pr_debug".

Also, in your subject, you don't need the full path; "staging:
go7007: " will work as a prefix.

The actual patch content looks perfect.

- Josh Triplett

> Signed-off-by: Dulshani Gunawardhana <dulshani.gunawardhana89@gmail.com>
> ---
>  drivers/staging/media/go7007/go7007-usb.c | 16 ----------------
>  1 file changed, 16 deletions(-)
> 
> diff --git a/drivers/staging/media/go7007/go7007-usb.c b/drivers/staging/media/go7007/go7007-usb.c
> index 1aa659c..58033b7 100644
> --- a/drivers/staging/media/go7007/go7007-usb.c
> +++ b/drivers/staging/media/go7007/go7007-usb.c
> @@ -664,9 +664,7 @@ static int go7007_usb_interface_reset(struct go7007 *go)
>  
>  	if (usb->board->flags & GO7007_USB_EZUSB) {
>  		/* Reset buffer in EZ-USB */
> -#ifdef GO7007_USB_DEBUG
>  		pr_debug("resetting EZ-USB buffers\n");
> -#endif
>  		if (go7007_usb_vendor_request(go, 0x10, 0, 0, NULL, 0, 0) < 0 ||
>  		    go7007_usb_vendor_request(go, 0x10, 0, 0, NULL, 0, 0) < 0)
>  			return -1;
> @@ -695,9 +693,7 @@ static int go7007_usb_ezusb_write_interrupt(struct go7007 *go,
>  	u16 status_reg = 0;
>  	int timeout = 500;
>  
> -#ifdef GO7007_USB_DEBUG
>  	pr_debug("WriteInterrupt: %04x %04x\n", addr, data);
> -#endif
>  
>  	for (i = 0; i < 100; ++i) {
>  		r = usb_control_msg(usb->usbdev,
> @@ -744,9 +740,7 @@ static int go7007_usb_onboard_write_interrupt(struct go7007 *go,
>  	int r;
>  	int timeout = 500;
>  
> -#ifdef GO7007_USB_DEBUG
>  	pr_debug("WriteInterrupt: %04x %04x\n", addr, data);
> -#endif
>  
>  	go->usb_buf[0] = data & 0xff;
>  	go->usb_buf[1] = data >> 8;
> @@ -785,10 +779,8 @@ static void go7007_usb_readinterrupt_complete(struct urb *urb)
>  		go->interrupt_available = 1;
>  		go->interrupt_data = __le16_to_cpu(regs[0]);
>  		go->interrupt_value = __le16_to_cpu(regs[1]);
> -#ifdef GO7007_USB_DEBUG
>  		pr_debug("ReadInterrupt: %04x %04x\n",
>  				go->interrupt_value, go->interrupt_data);
> -#endif
>  	}
>  
>  	wake_up(&go->interrupt_waitq);
> @@ -911,9 +903,7 @@ static int go7007_usb_send_firmware(struct go7007 *go, u8 *data, int len)
>  	int transferred, pipe;
>  	int timeout = 500;
>  
> -#ifdef GO7007_USB_DEBUG
>  	pr_debug("DownloadBuffer sending %d bytes\n", len);
> -#endif
>  
>  	if (usb->board->flags & GO7007_USB_EZUSB)
>  		pipe = usb_sndbulkpipe(usb->usbdev, 2);
> @@ -998,11 +988,9 @@ static int go7007_usb_i2c_master_xfer(struct i2c_adapter *adapter,
>  		if (i + 1 < num && msgs[i].addr == msgs[i + 1].addr &&
>  				!(msgs[i].flags & I2C_M_RD) &&
>  				(msgs[i + 1].flags & I2C_M_RD)) {
> -#ifdef GO7007_I2C_DEBUG
>  			pr_debug("i2c write/read %d/%d "
>  					"bytes on %02x\n", msgs[i].len,
>  					msgs[i + 1].len, msgs[i].addr);
> -#endif
>  			buf[0] = 0x01;
>  			buf[1] = msgs[i].len + 1;
>  			buf[2] = msgs[i].addr << 1;
> @@ -1010,22 +998,18 @@ static int go7007_usb_i2c_master_xfer(struct i2c_adapter *adapter,
>  			buf_len = msgs[i].len + 3;
>  			buf[buf_len++] = msgs[++i].len;
>  		} else if (msgs[i].flags & I2C_M_RD) {
> -#ifdef GO7007_I2C_DEBUG
>  			pr_debug("i2c read %d "
>  					"bytes on %02x\n", msgs[i].len,
>  					msgs[i].addr);
> -#endif
>  			buf[0] = 0x01;
>  			buf[1] = 1;
>  			buf[2] = msgs[i].addr << 1;
>  			buf[3] = msgs[i].len;
>  			buf_len = 4;
>  		} else {
> -#ifdef GO7007_I2C_DEBUG
>  			pr_debug("i2c write %d "
>  					"bytes on %02x\n", msgs[i].len,
>  					msgs[i].addr);
> -#endif
>  			buf[0] = 0x00;
>  			buf[1] = msgs[i].len + 1;
>  			buf[2] = msgs[i].addr << 1;
> -- 
> 1.8.1.2
> 
> -- 
> You received this message because you are subscribed to the Google Groups "opw-kernel" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to opw-kernel+unsubscribe@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.

Patch
diff mbox

diff --git a/drivers/staging/media/go7007/go7007-usb.c b/drivers/staging/media/go7007/go7007-usb.c
index 1aa659c..58033b7 100644
--- a/drivers/staging/media/go7007/go7007-usb.c
+++ b/drivers/staging/media/go7007/go7007-usb.c
@@ -664,9 +664,7 @@  static int go7007_usb_interface_reset(struct go7007 *go)
 
 	if (usb->board->flags & GO7007_USB_EZUSB) {
 		/* Reset buffer in EZ-USB */
-#ifdef GO7007_USB_DEBUG
 		pr_debug("resetting EZ-USB buffers\n");
-#endif
 		if (go7007_usb_vendor_request(go, 0x10, 0, 0, NULL, 0, 0) < 0 ||
 		    go7007_usb_vendor_request(go, 0x10, 0, 0, NULL, 0, 0) < 0)
 			return -1;
@@ -695,9 +693,7 @@  static int go7007_usb_ezusb_write_interrupt(struct go7007 *go,
 	u16 status_reg = 0;
 	int timeout = 500;
 
-#ifdef GO7007_USB_DEBUG
 	pr_debug("WriteInterrupt: %04x %04x\n", addr, data);
-#endif
 
 	for (i = 0; i < 100; ++i) {
 		r = usb_control_msg(usb->usbdev,
@@ -744,9 +740,7 @@  static int go7007_usb_onboard_write_interrupt(struct go7007 *go,
 	int r;
 	int timeout = 500;
 
-#ifdef GO7007_USB_DEBUG
 	pr_debug("WriteInterrupt: %04x %04x\n", addr, data);
-#endif
 
 	go->usb_buf[0] = data & 0xff;
 	go->usb_buf[1] = data >> 8;
@@ -785,10 +779,8 @@  static void go7007_usb_readinterrupt_complete(struct urb *urb)
 		go->interrupt_available = 1;
 		go->interrupt_data = __le16_to_cpu(regs[0]);
 		go->interrupt_value = __le16_to_cpu(regs[1]);
-#ifdef GO7007_USB_DEBUG
 		pr_debug("ReadInterrupt: %04x %04x\n",
 				go->interrupt_value, go->interrupt_data);
-#endif
 	}
 
 	wake_up(&go->interrupt_waitq);
@@ -911,9 +903,7 @@  static int go7007_usb_send_firmware(struct go7007 *go, u8 *data, int len)
 	int transferred, pipe;
 	int timeout = 500;
 
-#ifdef GO7007_USB_DEBUG
 	pr_debug("DownloadBuffer sending %d bytes\n", len);
-#endif
 
 	if (usb->board->flags & GO7007_USB_EZUSB)
 		pipe = usb_sndbulkpipe(usb->usbdev, 2);
@@ -998,11 +988,9 @@  static int go7007_usb_i2c_master_xfer(struct i2c_adapter *adapter,
 		if (i + 1 < num && msgs[i].addr == msgs[i + 1].addr &&
 				!(msgs[i].flags & I2C_M_RD) &&
 				(msgs[i + 1].flags & I2C_M_RD)) {
-#ifdef GO7007_I2C_DEBUG
 			pr_debug("i2c write/read %d/%d "
 					"bytes on %02x\n", msgs[i].len,
 					msgs[i + 1].len, msgs[i].addr);
-#endif
 			buf[0] = 0x01;
 			buf[1] = msgs[i].len + 1;
 			buf[2] = msgs[i].addr << 1;
@@ -1010,22 +998,18 @@  static int go7007_usb_i2c_master_xfer(struct i2c_adapter *adapter,
 			buf_len = msgs[i].len + 3;
 			buf[buf_len++] = msgs[++i].len;
 		} else if (msgs[i].flags & I2C_M_RD) {
-#ifdef GO7007_I2C_DEBUG
 			pr_debug("i2c read %d "
 					"bytes on %02x\n", msgs[i].len,
 					msgs[i].addr);
-#endif
 			buf[0] = 0x01;
 			buf[1] = 1;
 			buf[2] = msgs[i].addr << 1;
 			buf[3] = msgs[i].len;
 			buf_len = 4;
 		} else {
-#ifdef GO7007_I2C_DEBUG
 			pr_debug("i2c write %d "
 					"bytes on %02x\n", msgs[i].len,
 					msgs[i].addr);
-#endif
 			buf[0] = 0x00;
 			buf[1] = msgs[i].len + 1;
 			buf[2] = msgs[i].addr << 1;