lists.openwall.net | lists / announce owl-users owl-dev john-users john-dev passwdqc-users yescrypt popa3d-users / oss-security kernel-hardening musl sabotage tlsify passwords / crypt-dev xvendor / Bugtraq Full-Disclosure linux-kernel linux-netdev linux-ext4 linux-hardening linux-cve-announce PHC | |
Open Source and information security mailing list archives
| ||
|
Date: Tue, 27 May 2014 00:12:50 +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 25/27] mtd: nand: ndfc: 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/ndfc.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/mtd/nand/ndfc.c b/drivers/mtd/nand/ndfc.c index 69eaba6..66366e0 100644 --- a/drivers/mtd/nand/ndfc.c +++ b/drivers/mtd/nand/ndfc.c @@ -170,9 +170,6 @@ static int ndfc_chip_init(struct ndfc_controller *ndfc, chip->ecc.strength = 1; chip->priv = ndfc; - ndfc->mtd.priv = chip; - ndfc->mtd.owner = THIS_MODULE; - flash_np = of_get_next_child(node, NULL); if (!flash_np) return -ENODEV; @@ -248,6 +245,7 @@ static int ndfc_probe(struct platform_device *ofdev) out_be32(ndfc->ndfcbase + offset, be32_to_cpup(reg)); } + mtd_setup_common_members(&ndfc->mtd, &ndfc->chip, ofdev); err = ndfc_chip_init(ndfc, ofdev->dev.of_node); if (err) { iounmap(ndfc->ndfcbase); -- 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