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 <[email protected]>
---
 drivers/mtd/nand/txx9ndfmc.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/mtd/nand/txx9ndfmc.c b/drivers/mtd/nand/txx9ndfmc.c
index c1622a5..88b8d34 100644
--- a/drivers/mtd/nand/txx9ndfmc.c
+++ b/drivers/mtd/nand/txx9ndfmc.c
@@ -323,9 +323,7 @@ static int __init txx9ndfmc_probe(struct platform_device 
*dev)
                        continue;
                chip = &txx9_priv->chip;
                mtd = &txx9_priv->mtd;
-               mtd->owner = THIS_MODULE;
-
-               mtd->priv = chip;
+               mtd_setup_common_members(mtd, chip, dev);
 
                chip->read_byte = txx9ndfmc_read_byte;
                chip->read_buf = txx9ndfmc_read_buf;
-- 
1.8.3.2

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

Reply via email to