diff mbox

[4/4] mtd: sharpsl: use dev_err() instead of printk()

Message ID 001a01cefd5c$9ae80ac0$d0b82040$%han@samsung.com
State New, archived
Headers show

Commit Message

Jingoo Han Dec. 20, 2013, 8:22 a.m. UTC
Use dev_err() instead of printk() to provide a better message
to userspace.

Signed-off-by: Jingoo Han <jg1.han@samsung.com>
---
 drivers/mtd/nand/sharpsl.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
diff mbox

Patch

diff --git a/drivers/mtd/nand/sharpsl.c b/drivers/mtd/nand/sharpsl.c
index 87908d7..8522f33 100644
--- a/drivers/mtd/nand/sharpsl.c
+++ b/drivers/mtd/nand/sharpsl.c
@@ -122,7 +122,7 @@  static int sharpsl_nand_probe(struct platform_device *pdev)
 	/* Allocate memory for MTD device structure and private data */
 	sharpsl = kzalloc(sizeof(struct sharpsl_nand), GFP_KERNEL);
 	if (!sharpsl) {
-		printk("Unable to allocate SharpSL NAND MTD device structure.\n");
+		dev_err(&pdev->dev, "Unable to allocate SharpSL NAND MTD device structure.\n");
 		return -ENOMEM;
 	}
 
@@ -136,7 +136,7 @@  static int sharpsl_nand_probe(struct platform_device *pdev)
 	/* map physical address */
 	sharpsl->io = ioremap(r->start, resource_size(r));
 	if (!sharpsl->io) {
-		printk("ioremap to access Sharp SL NAND chip failed\n");
+		dev_err(&pdev->dev, "ioremap to access Sharp SL NAND chip failed\n");
 		err = -EIO;
 		goto err_ioremap;
 	}