Patchwork [V2,2/4] mtd: fsmc_nand: use dev_warn() instead of printk()

login
register
mail settings
Submitter Jingoo Han
Date Dec. 26, 2013, 3:31 a.m.
Message ID <009d01cf01ea$f4ef4410$decdcc30$%han@samsung.com>
Download mbox | patch
Permalink /patch/305186/
State New
Headers show

Comments

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

Signed-off-by: Jingoo Han <jg1.han@samsung.com>
---
No changes since v1.

 drivers/mtd/nand/fsmc_nand.c |    8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
Linus Walleij - Jan. 7, 2014, 5:56 p.m.
On Thu, Dec 26, 2013 at 4:31 AM, Jingoo Han <jg1.han@samsung.com> wrote:

> Use dev_warn() instead of printk() to provide a better message
> to userspace.
>
> Signed-off-by: Jingoo Han <jg1.han@samsung.com>

Acked-by: Linus Walleij <linus.walleij@linaro.org>

Yours,
Linus Walleij

Patch

diff --git a/drivers/mtd/nand/fsmc_nand.c b/drivers/mtd/nand/fsmc_nand.c
index a5915f1..1550692 100644
--- a/drivers/mtd/nand/fsmc_nand.c
+++ b/drivers/mtd/nand/fsmc_nand.c
@@ -1104,8 +1104,8 @@  static int __init fsmc_nand_probe(struct platform_device *pdev)
 			host->ecc_place = &fsmc_ecc4_lp_place;
 			break;
 		default:
-			printk(KERN_WARNING "No oob scheme defined for "
-			       "oobsize %d\n", mtd->oobsize);
+			dev_warn(&pdev->dev, "No oob scheme defined for oobsize %d\n",
+				 mtd->oobsize);
 			BUG();
 		}
 	} else {
@@ -1120,8 +1120,8 @@  static int __init fsmc_nand_probe(struct platform_device *pdev)
 			nand->ecc.layout = &fsmc_ecc1_128_layout;
 			break;
 		default:
-			printk(KERN_WARNING "No oob scheme defined for "
-			       "oobsize %d\n", mtd->oobsize);
+			dev_warn(&pdev->dev, "No oob scheme defined for oobsize %d\n",
+				 mtd->oobsize);
 			BUG();
 		}
 	}