[OPW,kernel,2/2] staging/media/go7007:Replace kern_debug with pr_debug
diff mbox

Message ID 09d2f1273a82a86068a31cbec338c47175e3e839.1380998245.git.dulshani.gunawardhana89@gmail.com
State Changes Requested
Headers show

Commit Message

Dulshani Gunawardhana Oct. 5, 2013, 7:09 p.m. UTC
Replace kern_err with pr_err in go7007-usb.c

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

Comments

Josh Triplett Oct. 5, 2013, 7:47 p.m. UTC | #1
On Sun, Oct 06, 2013 at 12:39:25AM +0530, Dulshani Gunawardhana wrote:
> Replace kern_err with pr_err in go7007-usb.c

You need to fix your subject to match the patch; it's still talking
about debug, not err.  Also, KERN_ERR (and KERN_DEBUG) are all-caps.

And as with the previous patch, you can shorten "staging/media/go7007"
to just "staging: g07007: ".

The patch content looks perfect.

- Josh Triplett

> Signed-off-by: Dulshani Gunawardhana <dulshani.gunawardhana89@gmail.com>
> ---
>  drivers/staging/media/go7007/go7007-usb.c | 51 +++++++++++++------------------
>  1 file changed, 21 insertions(+), 30 deletions(-)
> 
> diff --git a/drivers/staging/media/go7007/go7007-usb.c b/drivers/staging/media/go7007/go7007-usb.c
> index 58033b7..2383f12 100644
> --- a/drivers/staging/media/go7007/go7007-usb.c
> +++ b/drivers/staging/media/go7007/go7007-usb.c
> @@ -678,8 +678,7 @@ static int go7007_usb_interface_reset(struct go7007 *go)
>  	/* Wait for an interrupt to indicate successful hardware reset */
>  	if (go7007_read_interrupt(go, &intr_val, &intr_data) < 0 ||
>  			(intr_val & ~0x1) != 0x55aa) {
> -		printk(KERN_ERR
> -			"go7007-usb: unable to reset the USB interface\n");
> +		pr_err("unable to reset the USB interface\n");
>  		return -1;
>  	}
>  	return 0;
> @@ -711,9 +710,7 @@ static int go7007_usb_ezusb_write_interrupt(struct go7007 *go,
>  	if (r < 0)
>  		goto write_int_error;
>  	if (i == 100) {
> -		printk(KERN_ERR
> -			"go7007-usb: device is hung, status reg = 0x%04x\n",
> -			status_reg);
> +		pr_err("device is hung, status reg = 0x%04x\n", status_reg);
>  		return -1;
>  	}
>  	r = usb_control_msg(usb->usbdev, usb_sndctrlpipe(usb->usbdev, 0), 0x12,
> @@ -729,7 +726,7 @@ static int go7007_usb_ezusb_write_interrupt(struct go7007 *go,
>  	return 0;
>  
>  write_int_error:
> -	printk(KERN_ERR "go7007-usb: error in WriteInterrupt: %d\n", r);
> +	pr_err("error in WriteInterrupt: %d\n", r);
>  	return r;
>  }
>  
> @@ -751,7 +748,7 @@ static int go7007_usb_onboard_write_interrupt(struct go7007 *go,
>  			USB_TYPE_VENDOR | USB_RECIP_ENDPOINT, 0x55aa,
>  			0xf0f0, go->usb_buf, 8, timeout);
>  	if (r < 0) {
> -		printk(KERN_ERR "go7007-usb: error in WriteInterrupt: %d\n", r);
> +		pr_err("error in WriteInterrupt: %d\n", r);
>  		return r;
>  	}
>  	return 0;
> @@ -766,15 +763,13 @@ static void go7007_usb_readinterrupt_complete(struct urb *urb)
>  	if (status) {
>  		if (status != -ESHUTDOWN &&
>  				go->status != STATUS_SHUTDOWN) {
> -			printk(KERN_ERR
> -				"go7007-usb: error in read interrupt: %d\n",
> -				urb->status);
> +			pr_err("error in read interrupt: %d\n",	urb->status);
>  		} else {
>  			wake_up(&go->interrupt_waitq);
>  			return;
>  		}
>  	} else if (urb->actual_length != urb->transfer_buffer_length) {
> -		printk(KERN_ERR "go7007-usb: short read in interrupt pipe!\n");
> +		pr_err("short read in interrupt pipe!\n");
>  	} else {
>  		go->interrupt_available = 1;
>  		go->interrupt_data = __le16_to_cpu(regs[0]);
> @@ -793,8 +788,7 @@ static int go7007_usb_read_interrupt(struct go7007 *go)
>  
>  	r = usb_submit_urb(usb->intr_urb, GFP_KERNEL);
>  	if (r < 0) {
> -		printk(KERN_ERR
> -			"go7007-usb: unable to submit interrupt urb: %d\n", r);
> +		pr_err("unable to submit interrupt urb: %d\n", r);
>  		return r;
>  	}
>  	return 0;
> @@ -810,18 +804,17 @@ static void go7007_usb_read_video_pipe_complete(struct urb *urb)
>  		return;
>  	}
>  	if (status) {
> -		printk(KERN_ERR "go7007-usb: error in video pipe: %d\n",
> -			status);
> +		pr_err("error in video pipe: %d\n", status);
>  		return;
>  	}
>  	if (urb->actual_length != urb->transfer_buffer_length) {
> -		printk(KERN_ERR "go7007-usb: short read in video pipe!\n");
> +		pr_err("short read in video pipe!\n");
>  		return;
>  	}
>  	go7007_parse_video_stream(go, urb->transfer_buffer, urb->actual_length);
>  	r = usb_submit_urb(urb, GFP_ATOMIC);
>  	if (r < 0)
> -		printk(KERN_ERR "go7007-usb: error in video pipe: %d\n", r);
> +		pr_err("error in video pipe: %d\n", r);
>  }
>  
>  static void go7007_usb_read_audio_pipe_complete(struct urb *urb)
> @@ -832,19 +825,18 @@ static void go7007_usb_read_audio_pipe_complete(struct urb *urb)
>  	if (!vb2_is_streaming(&go->vidq))
>  		return;
>  	if (status) {
> -		printk(KERN_ERR "go7007-usb: error in audio pipe: %d\n",
> -			status);
> +		pr_err("error in audio pipe: %d\n", status);
>  		return;
>  	}
>  	if (urb->actual_length != urb->transfer_buffer_length) {
> -		printk(KERN_ERR "go7007-usb: short read in audio pipe!\n");
> +		pr_err("short read in audio pipe!\n");
>  		return;
>  	}
>  	if (go->audio_deliver != NULL)
>  		go->audio_deliver(go, urb->transfer_buffer, urb->actual_length);
>  	r = usb_submit_urb(urb, GFP_ATOMIC);
>  	if (r < 0)
> -		printk(KERN_ERR "go7007-usb: error in audio pipe: %d\n", r);
> +		pr_err("error in audio pipe: %d\n", r);
>  }
>  
>  static int go7007_usb_stream_start(struct go7007 *go)
> @@ -855,7 +847,7 @@ static int go7007_usb_stream_start(struct go7007 *go)
>  	for (i = 0; i < 8; ++i) {
>  		r = usb_submit_urb(usb->video_urbs[i], GFP_KERNEL);
>  		if (r < 0) {
> -			printk(KERN_ERR "go7007-usb: error submitting video "
> +			pr_err("error submitting video "
>  					"urb %d: %d\n", i, r);
>  			goto video_submit_failed;
>  		}
> @@ -866,7 +858,7 @@ static int go7007_usb_stream_start(struct go7007 *go)
>  	for (i = 0; i < 8; ++i) {
>  		r = usb_submit_urb(usb->audio_urbs[i], GFP_KERNEL);
>  		if (r < 0) {
> -			printk(KERN_ERR "go7007-usb: error submitting audio "
> +			pr_err("error submitting audio "
>  					"urb %d: %d\n", i, r);
>  			goto audio_submit_failed;
>  		}
> @@ -1106,7 +1098,7 @@ static int go7007_usb_probe(struct usb_interface *intf,
>  		board = &board_px_tv402u;
>  		break;
>  	case GO7007_BOARDID_LIFEVIEW_LR192:
> -		printk(KERN_ERR "go7007-usb: The Lifeview TV Walker Ultra "
> +		pr_err("The Lifeview TV Walker Ultra "
>  				"is not supported.  Sorry!\n");
>  		return -ENODEV;
>  		name = "Lifeview TV Walker Ultra";
> @@ -1122,7 +1114,7 @@ static int go7007_usb_probe(struct usb_interface *intf,
>  		board = &board_ads_usbav_709;
>  		break;
>  	default:
> -		printk(KERN_ERR "go7007-usb: unknown board ID %d!\n",
> +		pr_err("unknown board ID %d!\n",
>  				(unsigned int)id->driver_info);
>  		return -ENODEV;
>  	}
> @@ -1181,8 +1173,7 @@ static int go7007_usb_probe(struct usb_interface *intf,
>  		go->i2c_adapter.dev.parent = go->dev;
>  		i2c_set_adapdata(&go->i2c_adapter, go);
>  		if (i2c_add_adapter(&go->i2c_adapter) < 0) {
> -			printk(KERN_ERR
> -				"go7007-usb: error: i2c_add_adapter failed\n");
> +			pr_err("error: i2c_add_adapter failed\n");
>  			goto allocfail;
>  		}
>  		go->i2c_adapter_online = 1;
> @@ -1233,7 +1224,7 @@ static int go7007_usb_probe(struct usb_interface *intf,
>  	if (go->board_id == GO7007_BOARDID_PX_TV402U) {
>  		/* Board strapping indicates tuner model */
>  		if (go7007_usb_vendor_request(go, 0x41, 0, 0, go->usb_buf, 3, 1) < 0) {
> -			printk(KERN_ERR "go7007-usb: GPIO read failed!\n");
> +			pr_err("GPIO read failed!\n");
>  			goto allocfail;
>  		}
>  		switch (go->usb_buf[0] >> 6) {
> @@ -1265,7 +1256,7 @@ static int go7007_usb_probe(struct usb_interface *intf,
>  		 * to the EZ-USB GPIO output pins */
>  		if (go7007_usb_vendor_request(go, 0x40, 0x7f02, 0,
>  					NULL, 0, 0) < 0) {
> -			printk(KERN_ERR "go7007-usb: GPIO write failed!\n");
> +			pr_err("GPIO write failed!\n");
>  			goto allocfail;
>  		}
>  	}
> @@ -1274,7 +1265,7 @@ static int go7007_usb_probe(struct usb_interface *intf,
>  	 * a USB1.1 port.  There will be silent corruption of the stream. */
>  	if ((board->flags & GO7007_USB_EZUSB) &&
>  			usbdev->speed != USB_SPEED_HIGH)
> -		printk(KERN_ERR "go7007-usb: *** WARNING ***  This device "
> +		pr_err("*** WARNING ***  This device "
>  				"must be connected to a USB 2.0 port!  "
>  				"Attempting to capture video through a USB 1.1 "
>  				"port will result in stream corruption, even "
> -- 
> 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 58033b7..2383f12 100644
--- a/drivers/staging/media/go7007/go7007-usb.c
+++ b/drivers/staging/media/go7007/go7007-usb.c
@@ -678,8 +678,7 @@  static int go7007_usb_interface_reset(struct go7007 *go)
 	/* Wait for an interrupt to indicate successful hardware reset */
 	if (go7007_read_interrupt(go, &intr_val, &intr_data) < 0 ||
 			(intr_val & ~0x1) != 0x55aa) {
-		printk(KERN_ERR
-			"go7007-usb: unable to reset the USB interface\n");
+		pr_err("unable to reset the USB interface\n");
 		return -1;
 	}
 	return 0;
@@ -711,9 +710,7 @@  static int go7007_usb_ezusb_write_interrupt(struct go7007 *go,
 	if (r < 0)
 		goto write_int_error;
 	if (i == 100) {
-		printk(KERN_ERR
-			"go7007-usb: device is hung, status reg = 0x%04x\n",
-			status_reg);
+		pr_err("device is hung, status reg = 0x%04x\n", status_reg);
 		return -1;
 	}
 	r = usb_control_msg(usb->usbdev, usb_sndctrlpipe(usb->usbdev, 0), 0x12,
@@ -729,7 +726,7 @@  static int go7007_usb_ezusb_write_interrupt(struct go7007 *go,
 	return 0;
 
 write_int_error:
-	printk(KERN_ERR "go7007-usb: error in WriteInterrupt: %d\n", r);
+	pr_err("error in WriteInterrupt: %d\n", r);
 	return r;
 }
 
@@ -751,7 +748,7 @@  static int go7007_usb_onboard_write_interrupt(struct go7007 *go,
 			USB_TYPE_VENDOR | USB_RECIP_ENDPOINT, 0x55aa,
 			0xf0f0, go->usb_buf, 8, timeout);
 	if (r < 0) {
-		printk(KERN_ERR "go7007-usb: error in WriteInterrupt: %d\n", r);
+		pr_err("error in WriteInterrupt: %d\n", r);
 		return r;
 	}
 	return 0;
@@ -766,15 +763,13 @@  static void go7007_usb_readinterrupt_complete(struct urb *urb)
 	if (status) {
 		if (status != -ESHUTDOWN &&
 				go->status != STATUS_SHUTDOWN) {
-			printk(KERN_ERR
-				"go7007-usb: error in read interrupt: %d\n",
-				urb->status);
+			pr_err("error in read interrupt: %d\n",	urb->status);
 		} else {
 			wake_up(&go->interrupt_waitq);
 			return;
 		}
 	} else if (urb->actual_length != urb->transfer_buffer_length) {
-		printk(KERN_ERR "go7007-usb: short read in interrupt pipe!\n");
+		pr_err("short read in interrupt pipe!\n");
 	} else {
 		go->interrupt_available = 1;
 		go->interrupt_data = __le16_to_cpu(regs[0]);
@@ -793,8 +788,7 @@  static int go7007_usb_read_interrupt(struct go7007 *go)
 
 	r = usb_submit_urb(usb->intr_urb, GFP_KERNEL);
 	if (r < 0) {
-		printk(KERN_ERR
-			"go7007-usb: unable to submit interrupt urb: %d\n", r);
+		pr_err("unable to submit interrupt urb: %d\n", r);
 		return r;
 	}
 	return 0;
@@ -810,18 +804,17 @@  static void go7007_usb_read_video_pipe_complete(struct urb *urb)
 		return;
 	}
 	if (status) {
-		printk(KERN_ERR "go7007-usb: error in video pipe: %d\n",
-			status);
+		pr_err("error in video pipe: %d\n", status);
 		return;
 	}
 	if (urb->actual_length != urb->transfer_buffer_length) {
-		printk(KERN_ERR "go7007-usb: short read in video pipe!\n");
+		pr_err("short read in video pipe!\n");
 		return;
 	}
 	go7007_parse_video_stream(go, urb->transfer_buffer, urb->actual_length);
 	r = usb_submit_urb(urb, GFP_ATOMIC);
 	if (r < 0)
-		printk(KERN_ERR "go7007-usb: error in video pipe: %d\n", r);
+		pr_err("error in video pipe: %d\n", r);
 }
 
 static void go7007_usb_read_audio_pipe_complete(struct urb *urb)
@@ -832,19 +825,18 @@  static void go7007_usb_read_audio_pipe_complete(struct urb *urb)
 	if (!vb2_is_streaming(&go->vidq))
 		return;
 	if (status) {
-		printk(KERN_ERR "go7007-usb: error in audio pipe: %d\n",
-			status);
+		pr_err("error in audio pipe: %d\n", status);
 		return;
 	}
 	if (urb->actual_length != urb->transfer_buffer_length) {
-		printk(KERN_ERR "go7007-usb: short read in audio pipe!\n");
+		pr_err("short read in audio pipe!\n");
 		return;
 	}
 	if (go->audio_deliver != NULL)
 		go->audio_deliver(go, urb->transfer_buffer, urb->actual_length);
 	r = usb_submit_urb(urb, GFP_ATOMIC);
 	if (r < 0)
-		printk(KERN_ERR "go7007-usb: error in audio pipe: %d\n", r);
+		pr_err("error in audio pipe: %d\n", r);
 }
 
 static int go7007_usb_stream_start(struct go7007 *go)
@@ -855,7 +847,7 @@  static int go7007_usb_stream_start(struct go7007 *go)
 	for (i = 0; i < 8; ++i) {
 		r = usb_submit_urb(usb->video_urbs[i], GFP_KERNEL);
 		if (r < 0) {
-			printk(KERN_ERR "go7007-usb: error submitting video "
+			pr_err("error submitting video "
 					"urb %d: %d\n", i, r);
 			goto video_submit_failed;
 		}
@@ -866,7 +858,7 @@  static int go7007_usb_stream_start(struct go7007 *go)
 	for (i = 0; i < 8; ++i) {
 		r = usb_submit_urb(usb->audio_urbs[i], GFP_KERNEL);
 		if (r < 0) {
-			printk(KERN_ERR "go7007-usb: error submitting audio "
+			pr_err("error submitting audio "
 					"urb %d: %d\n", i, r);
 			goto audio_submit_failed;
 		}
@@ -1106,7 +1098,7 @@  static int go7007_usb_probe(struct usb_interface *intf,
 		board = &board_px_tv402u;
 		break;
 	case GO7007_BOARDID_LIFEVIEW_LR192:
-		printk(KERN_ERR "go7007-usb: The Lifeview TV Walker Ultra "
+		pr_err("The Lifeview TV Walker Ultra "
 				"is not supported.  Sorry!\n");
 		return -ENODEV;
 		name = "Lifeview TV Walker Ultra";
@@ -1122,7 +1114,7 @@  static int go7007_usb_probe(struct usb_interface *intf,
 		board = &board_ads_usbav_709;
 		break;
 	default:
-		printk(KERN_ERR "go7007-usb: unknown board ID %d!\n",
+		pr_err("unknown board ID %d!\n",
 				(unsigned int)id->driver_info);
 		return -ENODEV;
 	}
@@ -1181,8 +1173,7 @@  static int go7007_usb_probe(struct usb_interface *intf,
 		go->i2c_adapter.dev.parent = go->dev;
 		i2c_set_adapdata(&go->i2c_adapter, go);
 		if (i2c_add_adapter(&go->i2c_adapter) < 0) {
-			printk(KERN_ERR
-				"go7007-usb: error: i2c_add_adapter failed\n");
+			pr_err("error: i2c_add_adapter failed\n");
 			goto allocfail;
 		}
 		go->i2c_adapter_online = 1;
@@ -1233,7 +1224,7 @@  static int go7007_usb_probe(struct usb_interface *intf,
 	if (go->board_id == GO7007_BOARDID_PX_TV402U) {
 		/* Board strapping indicates tuner model */
 		if (go7007_usb_vendor_request(go, 0x41, 0, 0, go->usb_buf, 3, 1) < 0) {
-			printk(KERN_ERR "go7007-usb: GPIO read failed!\n");
+			pr_err("GPIO read failed!\n");
 			goto allocfail;
 		}
 		switch (go->usb_buf[0] >> 6) {
@@ -1265,7 +1256,7 @@  static int go7007_usb_probe(struct usb_interface *intf,
 		 * to the EZ-USB GPIO output pins */
 		if (go7007_usb_vendor_request(go, 0x40, 0x7f02, 0,
 					NULL, 0, 0) < 0) {
-			printk(KERN_ERR "go7007-usb: GPIO write failed!\n");
+			pr_err("GPIO write failed!\n");
 			goto allocfail;
 		}
 	}
@@ -1274,7 +1265,7 @@  static int go7007_usb_probe(struct usb_interface *intf,
 	 * a USB1.1 port.  There will be silent corruption of the stream. */
 	if ((board->flags & GO7007_USB_EZUSB) &&
 			usbdev->speed != USB_SPEED_HIGH)
-		printk(KERN_ERR "go7007-usb: *** WARNING ***  This device "
+		pr_err("*** WARNING ***  This device "
 				"must be connected to a USB 2.0 port!  "
 				"Attempting to capture video through a USB 1.1 "
 				"port will result in stream corruption, even "