[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1401142372-14148-23-git-send-email-holler@ahsoftware.de>
Date: Tue, 27 May 2014 00:12:47 +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 22/27] mtd: nand: fsl_ifc: 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/fsl_ifc_nand.c | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/drivers/mtd/nand/fsl_ifc_nand.c b/drivers/mtd/nand/fsl_ifc_nand.c
index cb45d2f..c1aaccb 100644
--- a/drivers/mtd/nand/fsl_ifc_nand.c
+++ b/drivers/mtd/nand/fsl_ifc_nand.c
@@ -874,10 +874,6 @@ static int fsl_ifc_chip_init(struct fsl_ifc_mtd *priv)
struct nand_ecclayout *layout;
u32 csor, ver;
- /* Fill in fsl_ifc_mtd structure */
- priv->mtd.priv = chip;
- priv->mtd.owner = THIS_MODULE;
-
/* fill in nand_chip structure */
/* set up function call table */
if ((ioread32be(&ifc->cspr_cs[priv->bank].cspr)) & CSPR_PORT_SIZE_16)
@@ -1099,6 +1095,7 @@ static int fsl_ifc_nand_probe(struct platform_device *dev)
IFC_NAND_EVTER_INTR_FTOERIR_EN |
IFC_NAND_EVTER_INTR_WPERIR_EN,
&ifc->ifc_nand.nand_evter_intr_en);
+ mtd_setup_common_members(&priv->mtd, &priv->chip, dev);
priv->mtd.name = kasprintf(GFP_KERNEL, "%llx.flash", (u64)res.start);
if (!priv->mtd.name) {
ret = -ENOMEM;
--
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