[OPW,kernel] Staging: iio: fix printk(KERN_ERR ..
diff mbox

Message ID 1381157862-3419-1-git-send-email-ebru.akagunduz@gmail.com
State Changes Requested
Headers show

Commit Message

Ebru Akagündüz Oct. 7, 2013, 2:57 p.m. UTC
Fix checkpatch.pl issues with prefer netdev_err(netdev, .. then
dev_err(dev, .. then pr_err(.. to printk(KERN_ERR
in lis3l02dq_core.c

Signed-off-by: Ebru Akagunduz <ebru.akagunduz@gmail.com>
---
 drivers/staging/iio/accel/lis3l02dq_core.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Josh Triplett Oct. 7, 2013, 7:26 p.m. UTC | #1
On Mon, Oct 07, 2013 at 05:57:42PM +0300, Ebru Akagunduz wrote:
> Fix checkpatch.pl issues with prefer netdev_err(netdev, .. then
> dev_err(dev, .. then pr_err(.. to printk(KERN_ERR
> in lis3l02dq_core.c
> 
> Signed-off-by: Ebru Akagunduz <ebru.akagunduz@gmail.com>
> ---

Always compile-test your code.  dev_err needs a device, which you can
find inside the struct spi_device.

- Josh Triplett

>  drivers/staging/iio/accel/lis3l02dq_core.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/staging/iio/accel/lis3l02dq_core.c b/drivers/staging/iio/accel/lis3l02dq_core.c
> index bb852dc..6e3a0a0 100644
> --- a/drivers/staging/iio/accel/lis3l02dq_core.c
> +++ b/drivers/staging/iio/accel/lis3l02dq_core.c
> @@ -694,7 +694,7 @@ static int lis3l02dq_probe(struct spi_device *spi)
>  				  lis3l02dq_channels,
>  				  ARRAY_SIZE(lis3l02dq_channels));
>  	if (ret) {
> -		printk(KERN_ERR "failed to initialize the buffer\n");
> +		dev_err("failed to initialize the buffer\n");
>  		goto error_unreg_buffer_funcs;
>  	}
>  
> -- 
> 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/iio/accel/lis3l02dq_core.c b/drivers/staging/iio/accel/lis3l02dq_core.c
index bb852dc..6e3a0a0 100644
--- a/drivers/staging/iio/accel/lis3l02dq_core.c
+++ b/drivers/staging/iio/accel/lis3l02dq_core.c
@@ -694,7 +694,7 @@  static int lis3l02dq_probe(struct spi_device *spi)
 				  lis3l02dq_channels,
 				  ARRAY_SIZE(lis3l02dq_channels));
 	if (ret) {
-		printk(KERN_ERR "failed to initialize the buffer\n");
+		dev_err("failed to initialize the buffer\n");
 		goto error_unreg_buffer_funcs;
 	}