Message ID | 20211230090449.11808-1-zajec5@gmail.com |
---|---|
State | New |
Headers | show |
Series | [V2,1/3] mtd: core: call devm_of_platform_populate() for MTD devices | expand |
diff --git a/drivers/mtd/mtdcore.c b/drivers/mtd/mtdcore.c index 70f492dce158..07b75e6ca111 100644 --- a/drivers/mtd/mtdcore.c +++ b/drivers/mtd/mtdcore.c @@ -19,6 +19,7 @@ #include <linux/ioctl.h> #include <linux/init.h> #include <linux/of.h> +#include <linux/of_platform.h> #include <linux/proc_fs.h> #include <linux/idr.h> #include <linux/backing-dev.h> @@ -690,6 +691,9 @@ int add_mtd_device(struct mtd_info *mtd) not->add(mtd); mutex_unlock(&mtd_table_mutex); + + devm_of_platform_populate(&mtd->dev); + /* We _know_ we aren't being removed, because our caller is still holding us here. So none of this try_ nonsense, and no bitching about it