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

login
register
mail settings
Submitter Jingoo Han
Date Dec. 26, 2013, 3:32 a.m.
Message ID <009f01cf01eb$1af59c40$50e0d4c0$%han@samsung.com>
Download mbox | patch
Permalink /patch/305188/
State Accepted
Commit bb13bec74efd279942f8cf53fc86fb671acc5d9d
Headers show

Comments

Jingoo Han - Dec. 26, 2013, 3:32 a.m.
Use dev_err() instead of printk() to provide a better message
to userspace.

Signed-off-by: Jingoo Han <jg1.han@samsung.com>
---
Change since v1
- Remove the site-specific OOM messages.

 drivers/mtd/nand/sharpsl.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Patch

diff --git a/drivers/mtd/nand/sharpsl.c b/drivers/mtd/nand/sharpsl.c
index 61a85ab..e81059b 100644
--- a/drivers/mtd/nand/sharpsl.c
+++ b/drivers/mtd/nand/sharpsl.c
@@ -134,7 +134,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;
 	}