diff mbox

[5/5] media: davinci: vpbe: Replace printk with dev_*

Message ID 1373705431-11500-6-git-send-email-prabhakar.csengg@gmail.com (mailing list archive)
State New, archived
Headers show

Commit Message

Prabhakar July 13, 2013, 8:50 a.m. UTC
From: "Lad, Prabhakar" <prabhakar.csengg@gmail.com>

Use the dev_* message logging API instead of raw printk.

Signed-off-by: Lad, Prabhakar <prabhakar.csengg@gmail.com>
---
 drivers/media/platform/davinci/vpbe.c |    6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

Comments

Joe Perches July 13, 2013, 1:07 p.m. UTC | #1
On Sat, 2013-07-13 at 14:20 +0530, Prabhakar Lad wrote:
> Use the dev_* message logging API instead of raw printk.
[]
> diff --git a/drivers/media/platform/davinci/vpbe.c b/drivers/media/platform/davinci/vpbe.c
[]
> @@ -735,7 +735,7 @@ static int vpbe_initialize(struct device *dev, struct vpbe_device *vpbe_dev)
>  
>  	mutex_unlock(&vpbe_dev->lock);
>  
> -	printk(KERN_NOTICE "Setting default output to %s\n", def_output);
> +	dev_info(dev, "Setting default output to %s\n", def_output);

You are changing logging levels too.
You should mention that in the changelog.

> @@ -743,7 +743,7 @@ static int vpbe_initialize(struct device *dev, struct vpbe_device *vpbe_dev)
>  		return ret;
>  	}
>  
> -	printk(KERN_NOTICE "Setting default mode to %s\n", def_mode);
> +	dev_info(dev, "Setting default mode to %s\n", def_mode);
>  	ret = vpbe_set_default_mode(vpbe_dev);
>  	if (ret) {
>  		v4l2_err(&vpbe_dev->v4l2_dev, "Failed to set default mode %s",

Maybe these should be v4l2_notice() which could
be added to include/media/v4l2-common.h
diff mbox

Patch

diff --git a/drivers/media/platform/davinci/vpbe.c b/drivers/media/platform/davinci/vpbe.c
index 33b9660..3f32184 100644
--- a/drivers/media/platform/davinci/vpbe.c
+++ b/drivers/media/platform/davinci/vpbe.c
@@ -595,7 +595,7 @@  static int vpbe_initialize(struct device *dev, struct vpbe_device *vpbe_dev)
 	 * matching with device name
 	 */
 	if (NULL == vpbe_dev || NULL == dev) {
-		printk(KERN_ERR "Null device pointers.\n");
+		dev_err(dev, "Null device pointers.\n");
 		return -ENODEV;
 	}
 
@@ -735,7 +735,7 @@  static int vpbe_initialize(struct device *dev, struct vpbe_device *vpbe_dev)
 
 	mutex_unlock(&vpbe_dev->lock);
 
-	printk(KERN_NOTICE "Setting default output to %s\n", def_output);
+	dev_info(dev, "Setting default output to %s\n", def_output);
 	ret = vpbe_set_default_output(vpbe_dev);
 	if (ret) {
 		v4l2_err(&vpbe_dev->v4l2_dev, "Failed to set default output %s",
@@ -743,7 +743,7 @@  static int vpbe_initialize(struct device *dev, struct vpbe_device *vpbe_dev)
 		return ret;
 	}
 
-	printk(KERN_NOTICE "Setting default mode to %s\n", def_mode);
+	dev_info(dev, "Setting default mode to %s\n", def_mode);
 	ret = vpbe_set_default_mode(vpbe_dev);
 	if (ret) {
 		v4l2_err(&vpbe_dev->v4l2_dev, "Failed to set default mode %s",