[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1401142372-14148-24-git-send-email-holler@ahsoftware.de>
Date: Tue, 27 May 2014 00:12:48 +0200
From: Alexander Holler <holler@...oftware.de>
To: linux-kernel@...r.kernel.org
Cc: linux-mtd@...ts.infradead.org,
David Woodhouse <dwmw2@...radead.org>,
Brian Norris <computersforpeace@...il.com>,
Alexander Holler <holler@...oftware.de>
Subject: [PATCH 23/27] mtd: nand: jz4740: show device structure in sysfs
Fix a common error in nand-drivers which do not set up a parent device for
the mtd-device by using a new inline function.
Signed-off-by: Alexander Holler <holler@...oftware.de>
---
drivers/mtd/nand/jz4740_nand.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/drivers/mtd/nand/jz4740_nand.c b/drivers/mtd/nand/jz4740_nand.c
index a2c804d..a30a8e5 100644
--- a/drivers/mtd/nand/jz4740_nand.c
+++ b/drivers/mtd/nand/jz4740_nand.c
@@ -435,9 +435,7 @@ static int jz_nand_probe(struct platform_device *pdev)
mtd = &nand->mtd;
chip = &nand->chip;
- mtd->priv = chip;
- mtd->owner = THIS_MODULE;
- mtd->name = "jz4740-nand";
+ mtd_setup_common_members(mtd, chip, pdev);
chip->ecc.hwctl = jz_nand_hwctl;
chip->ecc.calculate = jz_nand_calculate_ecc_rs;
--
1.8.3.2
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists