| From | Alexander Holler <> | Subject | [PATCH 23/27] mtd: nand: jz4740: show device structure in sysfs | Date | Tue, 27 May 2014 00:12:48 +0200 |
| |
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@ahsoftware.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
|