Skip to content
Permalink
Browse files

kernel: Remove deprecated generic linux,part-probe patch

This is now replaced by some other mtd partition parsing which was
merged into upstream.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
  • Loading branch information...
hauke committed Dec 7, 2018
1 parent 9261e74 commit e30ea44f687f22ee9285d09d43b1593d3f85bb47

This file was deleted.

@@ -37,12 +37,11 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
depends on m
--- a/drivers/mtd/mtdpart.c
+++ b/drivers/mtd/mtdpart.c
@@ -29,11 +29,13 @@
@@ -29,10 +29,12 @@
#include <linux/kmod.h>
#include <linux/mtd/mtd.h>
#include <linux/mtd/partitions.h>
+#include <linux/magic.h>
#include <linux/of.h>
#include <linux/err.h>
#include <linux/of.h>

@@ -51,7 +50,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>

/* Our partition linked list */
static LIST_HEAD(mtd_partitions);
@@ -53,6 +55,8 @@ struct mtd_part {
@@ -52,6 +54,8 @@ struct mtd_part {
struct list_head list;
};

@@ -60,15 +59,15 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
/*
* Given a pointer to the MTD object in the mtd_part structure, we can retrieve
* the pointer to that structure.
@@ -620,6 +624,7 @@ int mtd_add_partition(struct mtd_info *p
@@ -619,6 +623,7 @@ int mtd_add_partition(struct mtd_info *p
mutex_unlock(&mtd_partitions_mutex);

add_mtd_device(&new->mtd);
+ mtd_partition_split(parent, new);

mtd_add_partition_attrs(new);

@@ -698,6 +703,29 @@ int mtd_del_partition(struct mtd_info *m
@@ -697,6 +702,29 @@ int mtd_del_partition(struct mtd_info *m
}
EXPORT_SYMBOL_GPL(mtd_del_partition);

@@ -98,7 +97,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
/*
* This function, given a master MTD object and a partition table, creates
* and registers slave MTD objects which are bound to the master according to
@@ -729,6 +757,7 @@ int add_mtd_partitions(struct mtd_info *
@@ -728,6 +756,7 @@ int add_mtd_partitions(struct mtd_info *
mutex_unlock(&mtd_partitions_mutex);

add_mtd_device(&slave->mtd);
@@ -9,7 +9,7 @@ Signed-off-by: Gabor Juhos <juhosg@openwrt.org>

--- a/drivers/mtd/mtdpart.c
+++ b/drivers/mtd/mtdpart.c
@@ -56,6 +56,10 @@ struct mtd_part {
@@ -55,6 +55,10 @@ struct mtd_part {
};

static void mtd_partition_split(struct mtd_info *master, struct mtd_part *part);
@@ -20,7 +20,7 @@ Signed-off-by: Gabor Juhos <juhosg@openwrt.org>

/*
* Given a pointer to the MTD object in the mtd_part structure, we can retrieve
@@ -703,6 +707,36 @@ int mtd_del_partition(struct mtd_info *m
@@ -702,6 +706,36 @@ int mtd_del_partition(struct mtd_info *m
}
EXPORT_SYMBOL_GPL(mtd_del_partition);

@@ -57,7 +57,7 @@ Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
#ifdef CONFIG_MTD_SPLIT_FIRMWARE_NAME
#define SPLIT_FIRMWARE_NAME CONFIG_MTD_SPLIT_FIRMWARE_NAME
#else
@@ -1077,6 +1111,61 @@ void mtd_part_parser_cleanup(struct mtd_
@@ -1037,6 +1071,61 @@ void mtd_part_parser_cleanup(struct mtd_
}
}

@@ -10,15 +10,15 @@ Signed-off-by: Gabor Juhos <juhosg@openwrt.org>

--- a/drivers/mtd/mtdpart.c
+++ b/drivers/mtd/mtdpart.c
@@ -745,6 +745,7 @@ run_parsers_by_type(struct mtd_part *sla
@@ -744,6 +744,7 @@ run_parsers_by_type(struct mtd_part *sla

static void split_firmware(struct mtd_info *master, struct mtd_part *part)
{
+ run_parsers_by_type(part, MTD_PARSER_TYPE_FIRMWARE);
}

static void mtd_partition_split(struct mtd_info *master, struct mtd_part *part)
@@ -754,6 +755,12 @@ static void mtd_partition_split(struct m
@@ -753,6 +754,12 @@ static void mtd_partition_split(struct m
if (rootfs_found)
return;

@@ -11,7 +11,7 @@ Signed-off-by: Gabor Juhos <juhosg@openwrt.org>

--- a/drivers/mtd/mtdpart.c
+++ b/drivers/mtd/mtdpart.c
@@ -1190,6 +1190,24 @@ int mtd_is_partition(const struct mtd_in
@@ -1150,6 +1150,24 @@ int mtd_is_partition(const struct mtd_in
}
EXPORT_SYMBOL_GPL(mtd_is_partition);

@@ -10,7 +10,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>

--- a/drivers/mtd/mtdpart.c
+++ b/drivers/mtd/mtdpart.c
@@ -37,6 +37,8 @@
@@ -36,6 +36,8 @@
#include "mtdcore.h"
#include "mtdsplit/mtdsplit.h"

@@ -19,7 +19,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
/* Our partition linked list */
static LIST_HEAD(mtd_partitions);
static DEFINE_MUTEX(mtd_partitions_mutex);
@@ -221,6 +223,53 @@ static int part_erase(struct mtd_info *m
@@ -220,6 +222,53 @@ static int part_erase(struct mtd_info *m
{
struct mtd_part *part = mtd_to_part(mtd);
int ret;
@@ -73,7 +73,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>

instr->addr += part->offset;
ret = part->parent->_erase(part->parent, instr);
@@ -228,6 +277,24 @@ static int part_erase(struct mtd_info *m
@@ -227,6 +276,24 @@ static int part_erase(struct mtd_info *m
instr->fail_addr -= part->offset;
instr->addr -= part->offset;

@@ -98,7 +98,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
return ret;
}

@@ -536,19 +603,22 @@ static struct mtd_part *allocate_partiti
@@ -535,19 +602,22 @@ static struct mtd_part *allocate_partiti
remainder = do_div(tmp, wr_alignment);
if ((slave->mtd.flags & MTD_WRITEABLE) && remainder) {
/* Doesn't start on a boundary of major erase size */
@@ -20,7 +20,7 @@ Signed-off-by: Tim Harvey <tharvey@gateworks.com>

--- a/drivers/mtd/mtdpart.c
+++ b/drivers/mtd/mtdpart.c
@@ -307,7 +307,16 @@ static int part_lock(struct mtd_info *mt
@@ -306,7 +306,16 @@ static int part_lock(struct mtd_info *mt
static int part_unlock(struct mtd_info *mtd, loff_t ofs, uint64_t len)
{
struct mtd_part *part = mtd_to_part(mtd);

0 comments on commit e30ea44

Please sign in to comment.
You can’t perform that action at this time.