Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

mtd: onenand: generic: show parent device in sysfs

Fix a bug where mtd parent device symlinks aren't shown in sysfs.

While at it, take advantage of the default owner and name values set by
mtdcore.

Signed-off-by: Frans Klaver <fransklaver@gmail.com>
Signed-off-by: Brian Norris <computersforpeace@gmail.com>

authored by

Frans Klaver and committed by
Brian Norris
fe003bc8 7b679053

+1 -2
+1 -2
drivers/mtd/onenand/generic.c
··· 60 60 info->onenand.mmcontrol = pdata ? pdata->mmcontrol : NULL; 61 61 info->onenand.irq = platform_get_irq(pdev, 0); 62 62 63 - info->mtd.name = dev_name(&pdev->dev); 63 + info->mtd.dev.parent = &pdev->dev; 64 64 info->mtd.priv = &info->onenand; 65 - info->mtd.owner = THIS_MODULE; 66 65 67 66 if (onenand_scan(&info->mtd, 1)) { 68 67 err = -ENXIO;