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>,
'Andrew Lunn' <andrew@lunn.ch>
Subject: [PATCH 3/4] mtd: orion_nand: use dev_err() instead of printk()
Date: Fri, 20 Dec 2013 17:20:50 +0900 [thread overview]
Message-ID: <001901cefd5c$644dec50$2ce9c4f0$%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/orion_nand.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/mtd/nand/orion_nand.c b/drivers/mtd/nand/orion_nand.c
index a393a5b..7cd9aed 100644
--- a/drivers/mtd/nand/orion_nand.c
+++ b/drivers/mtd/nand/orion_nand.c
@@ -87,7 +87,7 @@ static int __init orion_nand_probe(struct platform_device *pdev)
nc = kzalloc(sizeof(struct nand_chip) + sizeof(struct mtd_info), GFP_KERNEL);
if (!nc) {
- printk(KERN_ERR "orion_nand: failed to allocate device structure.\n");
+ dev_err(&pdev->dev, "orion_nand: failed to allocate device structure.\n");
ret = -ENOMEM;
goto no_res;
}
@@ -101,7 +101,7 @@ static int __init orion_nand_probe(struct platform_device *pdev)
io_base = ioremap(res->start, resource_size(res));
if (!io_base) {
- printk(KERN_ERR "orion_nand: ioremap failed\n");
+ dev_err(&pdev->dev, "orion_nand: ioremap failed\n");
ret = -EIO;
goto no_res;
}
@@ -110,7 +110,7 @@ static int __init orion_nand_probe(struct platform_device *pdev)
board = devm_kzalloc(&pdev->dev, sizeof(struct orion_nand_data),
GFP_KERNEL);
if (!board) {
- printk(KERN_ERR "orion_nand: failed to allocate board structure.\n");
+ dev_err(&pdev->dev, "orion_nand: failed to allocate board structure.\n");
ret = -ENOMEM;
goto no_res;
}
--
1.7.10.4
next prev parent reply other threads:[~2013-12-20 8:21 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 ` Jingoo Han [this message]
2013-12-21 14:22 ` [PATCH 3/4] mtd: orion_nand: use dev_err() " Ezequiel Garcia
2013-12-26 1:50 ` Jingoo Han
2013-12-20 8:22 ` [PATCH 4/4] mtd: sharpsl: " Jingoo Han
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='001901cefd5c$644dec50$2ce9c4f0$%han@samsung.com' \
--to=jg1.han@samsung.com \
--cc=andrew@lunn.ch \
--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