kernel: mtd: backport extended dynamic partitions support

This gets rid of "nvmem-cells" limitation. Dynamic partitions can be
defined for any (sub)partitions layout.

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
This commit is contained in:
Rafał Miłecki
2022-10-18 22:12:27 +02:00
parent 76a470d5df
commit 4eda414b09
8 changed files with 302 additions and 4 deletions

View File

@@ -77,7 +77,7 @@ Signed-off-by: Daniel Golle <daniel@makrotopia.org>
#include "mtdcore.h"
@@ -924,6 +925,8 @@ int mtd_device_parse_register(struct mtd
@@ -916,6 +917,8 @@ int mtd_device_parse_register(struct mtd
register_reboot_notifier(&mtd->reboot_notifier);
}

View File

@@ -20,7 +20,7 @@ Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
#include <linux/nvmem-provider.h>
#include <linux/mtd/mtd.h>
@@ -767,6 +768,19 @@ int add_mtd_device(struct mtd_info *mtd)
@@ -759,6 +760,19 @@ int add_mtd_device(struct mtd_info *mtd)
of this try_ nonsense, and no bitching about it
either. :) */
__module_get(THIS_MODULE);