[PATCH 11/27] mtd: nand: sh_flctl: show device structure in sysfs

From: Alexander Holler
Date: Mon May 26 2014 - 18:15:18 EST


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@xxxxxxxxxxxxx>
---
drivers/mtd/nand/sh_flctl.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/mtd/nand/sh_flctl.c b/drivers/mtd/nand/sh_flctl.c
index c067023..9c3f2e5 100644
--- a/drivers/mtd/nand/sh_flctl.c
+++ b/drivers/mtd/nand/sh_flctl.c
@@ -1124,7 +1124,7 @@ static int flctl_probe(struct platform_device *pdev)
platform_set_drvdata(pdev, flctl);
flctl_mtd = &flctl->mtd;
nand = &flctl->chip;
- flctl_mtd->priv = nand;
+ mtd_setup_common_members(flctl_mtd, nand, pdev);
flctl->pdev = pdev;
flctl->hwecc = pdata->has_hwecc;
flctl->holden = pdata->use_holden;
--
1.8.3.2

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/