Patchwork spi/mpc52xx: replace printk with dev_err

login
register
mail settings
Submitter Wolfram Sang
Date Nov. 4, 2009, 9:49 a.m.
Message ID <1257328160-24955-1-git-send-email-w.sang@pengutronix.de>
Download mbox | patch
Permalink /patch/37547/
State Accepted, archived
Commit 5cc17d7e01abd77eda1267a75748cfc84c92a523
Delegated to: Grant Likely
Headers show

Comments

Wolfram Sang - Nov. 4, 2009, 9:49 a.m.
To easily identify which device has problems.

Signed-off-by: Wolfram Sang <w.sang@pengutronix.de>
Cc: Grant Likely <grant.likely@secretlab.ca>
---
 drivers/spi/mpc52xx_psc_spi.c |    5 ++---
 1 files changed, 2 insertions(+), 3 deletions(-)
Grant Likely - Nov. 9, 2009, 7:12 p.m.
On Wed, Nov 4, 2009 at 2:49 AM, Wolfram Sang <w.sang@pengutronix.de> wrote:
> To easily identify which device has problems.
>
> Signed-off-by: Wolfram Sang <w.sang@pengutronix.de>
> Cc: Grant Likely <grant.likely@secretlab.ca>
> ---
>  drivers/spi/mpc52xx_psc_spi.c |    5 ++---
>  1 files changed, 2 insertions(+), 3 deletions(-)

picked up.  Thanks

g.

Patch

diff --git a/drivers/spi/mpc52xx_psc_spi.c b/drivers/spi/mpc52xx_psc_spi.c
index e268437..6fb6b3b 100644
--- a/drivers/spi/mpc52xx_psc_spi.c
+++ b/drivers/spi/mpc52xx_psc_spi.c
@@ -471,7 +471,7 @@  static int __init mpc52xx_psc_spi_of_probe(struct of_device *op,
 
 	regaddr_p = of_get_address(op->node, 0, &size64, NULL);
 	if (!regaddr_p) {
-		printk(KERN_ERR "Invalid PSC address\n");
+		dev_err(&op->dev, "Invalid PSC address\n");
 		return -EINVAL;
 	}
 	regaddr64 = of_translate_address(op->node, regaddr_p);
@@ -482,8 +482,7 @@  static int __init mpc52xx_psc_spi_of_probe(struct of_device *op,
 
 		psc_nump = of_get_property(op->node, "cell-index", NULL);
 		if (!psc_nump || *psc_nump > 5) {
-			printk(KERN_ERR "mpc52xx_psc_spi: Device node %s has invalid "
-					"cell-index property\n", op->node->full_name);
+			dev_err(&op->dev, "Invalid cell-index property\n");
 			return -EINVAL;
 		}
 		id = *psc_nump + 1;