mtd: nand: plat_nand: show parent device in sysfs

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

While at it, make use of the default owner and name set by mtdcore.

Signed-off-by: Frans Klaver <fransklaver@gmail.com>
Signed-off-by: Brian Norris <computersforpeace@gmail.com>
This commit is contained in:
Frans Klaver 2015-06-10 22:39:00 +02:00 коммит произвёл Brian Norris
Родитель 84630994fa
Коммит f0aa200ceb
1 изменённых файлов: 1 добавлений и 2 удалений

Просмотреть файл

@ -59,8 +59,7 @@ static int plat_nand_probe(struct platform_device *pdev)
data->chip.priv = &data; data->chip.priv = &data;
data->mtd.priv = &data->chip; data->mtd.priv = &data->chip;
data->mtd.owner = THIS_MODULE; data->mtd.dev.parent = &pdev->dev;
data->mtd.name = dev_name(&pdev->dev);
data->chip.IO_ADDR_R = data->io_base; data->chip.IO_ADDR_R = data->io_base;
data->chip.IO_ADDR_W = data->io_base; data->chip.IO_ADDR_W = data->io_base;