spi/mpc52xx: replace printk with dev_err
authorWolfram Sang <w.sang@pengutronix.de>
Tue, 3 Nov 2009 23:49:20 +0000 (23:49 +0000)
committerGrant Likely <grant.likely@secretlab.ca>
Wed, 4 Nov 2009 23:42:47 +0000 (16:42 -0700)
To easily identify which device has problems.

Signed-off-by: Wolfram Sang <w.sang@pengutronix.de>
Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
drivers/spi/mpc52xx_psc_spi.c

index 2193d908cad60c895bcabfe9acc270ea1562f3c7..f50c81df336a7831a76cdc85f92a1f3c2a7b7527 100644 (file)
@@ -473,7 +473,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);
@@ -484,8 +484,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;