summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorFrans Klaver <fransklaver@gmail.com>2015-06-10 20:38:15 (GMT)
committerBrian Norris <computersforpeace@gmail.com>2015-10-13 16:21:12 (GMT)
commit260e89a6e0d6dcaccd484cf13a69285c3d22268f (patch)
tree23be8fd1399ab90111e185714a03c5fb54ab45ea /drivers
parentf9bcb6dc8013d4da6660556ddf2383e4fbcbe3d7 (diff)
downloadlinux-260e89a6e0d6dcaccd484cf13a69285c3d22268f.tar.xz
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>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/mtd/mtdcore.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/mtd/mtdcore.c b/drivers/mtd/mtdcore.c
index 8598e3b..ac280ee 100644
--- a/drivers/mtd/mtdcore.c
+++ b/drivers/mtd/mtdcore.c
@@ -430,7 +430,7 @@ int add_mtd_device(struct mtd_info *mtd)
}
/* Caller should have set dev.parent to match the
- * physical device.
+ * physical device, if appropriate.
*/
mtd->dev.type = &mtd_devtype;
mtd->dev.class = &mtd_class;