public inbox for linux-mtd@lists.infradead.org
 help / color / mirror / Atom feed
From: Jingoo Han <jg1.han@samsung.com>
To: 'Brian Norris' <computersforpeace@gmail.com>
Cc: linux-mtd@lists.infradead.org, 'Jingoo Han' <jg1.han@samsung.com>,
	'David Woodhouse' <dwmw2@infradead.org>
Subject: [PATCH 4/4] mtd: sharpsl: use dev_err() instead of printk()
Date: Fri, 20 Dec 2013 17:22:21 +0900	[thread overview]
Message-ID: <001a01cefd5c$9ae80ac0$d0b82040$%han@samsung.com> (raw)
In-Reply-To: <001701cefd5b$de189f90$9a49deb0$%han@samsung.com>

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 --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;
 	}
-- 
1.7.10.4

      parent reply	other threads:[~2013-12-20  8:22 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-12-20  8:17 [PATCH 1/4] mtd: atmel_nand: use dev_err() instead of printk() Jingoo Han
2013-12-20  8:18 ` [PATCH 2/4] mtd: fsmc_nand: use dev_warn() " Jingoo Han
2013-12-20  8:59   ` Linus Walleij
2013-12-20  8:20 ` [PATCH 3/4] mtd: orion_nand: use dev_err() " Jingoo Han
2013-12-21 14:22   ` Ezequiel Garcia
2013-12-26  1:50     ` Jingoo Han
2013-12-20  8:22 ` Jingoo Han [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='001a01cefd5c$9ae80ac0$d0b82040$%han@samsung.com' \
    --to=jg1.han@samsung.com \
    --cc=computersforpeace@gmail.com \
    --cc=dwmw2@infradead.org \
    --cc=linux-mtd@lists.infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox