]> git.baikalelectronics.ru Git - kernel.git/commit
mtd: core: tone down suggestion that dev.parent should be set
authorFrans Klaver <fransklaver@gmail.com>
Wed, 10 Jun 2015 20:38:15 +0000 (22:38 +0200)
committerBrian Norris <computersforpeace@gmail.com>
Tue, 13 Oct 2015 16:21:12 +0000 (09:21 -0700)
commit49b6a16787a5540777715071d1ae10c12553c0f0
tree23be8fd1399ab90111e185714a03c5fb54ab45ea
parentd35a84a422a8a0670b20ba7e32f1c2082548c2b1
mtd: core: tone down suggestion that dev.parent should be set

add_mtd_device() has a comment suggesting that the caller should have
set dev.parent. This is required to have the parent device symlink show
up in sysfs, but not for proper operation of the mtd device itself.
Currently we have five drivers registering mtd devices during module
initialization, so they don't actually provide a parent device to link
to. That means we cannot WARN_ON() here, as it would trigger false
positives.

Make the comment a bit less firm in its assertion that dev.parent should
be set.

Signed-off-by: Frans Klaver <fransklaver@gmail.com>
Signed-off-by: Brian Norris <computersforpeace@gmail.com>
drivers/mtd/mtdcore.c