aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/brcm47xx/patches-4.0/030-09-MIPS-BCM47XX-Don-t-try-guessing-NVRAM-size-on-MTD-pa.patch
diff options
context:
space:
mode:
authorJonas Gorski <jogo@openwrt.org>2015-06-19 11:12:43 +0000
committerJonas Gorski <jogo@openwrt.org>2015-06-19 11:12:43 +0000
commit03110a1254dc8ec2564cacb1e8e236412b7822bd (patch)
tree6917622e0e5f695fd1ef9ea5cd3f811047f9ea27 /target/linux/brcm47xx/patches-4.0/030-09-MIPS-BCM47XX-Don-t-try-guessing-NVRAM-size-on-MTD-pa.patch
parent657b75acce863c2efbd0ba334473b4c575999448 (diff)
downloadmaster-187ad058-03110a1254dc8ec2564cacb1e8e236412b7822bd.tar.gz
master-187ad058-03110a1254dc8ec2564cacb1e8e236412b7822bd.tar.bz2
master-187ad058-03110a1254dc8ec2564cacb1e8e236412b7822bd.zip
kernel: update 4.0 to 4.0.5
Changelog: * https://www.kernel.org/pub/linux/kernel/v4.x/ChangeLog-4.0.5 Signed-off-by: Jonas Gorski <jogo@openwrt.org> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@46063 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'target/linux/brcm47xx/patches-4.0/030-09-MIPS-BCM47XX-Don-t-try-guessing-NVRAM-size-on-MTD-pa.patch')
-rw-r--r--target/linux/brcm47xx/patches-4.0/030-09-MIPS-BCM47XX-Don-t-try-guessing-NVRAM-size-on-MTD-pa.patch30
1 files changed, 13 insertions, 17 deletions
diff --git a/target/linux/brcm47xx/patches-4.0/030-09-MIPS-BCM47XX-Don-t-try-guessing-NVRAM-size-on-MTD-pa.patch b/target/linux/brcm47xx/patches-4.0/030-09-MIPS-BCM47XX-Don-t-try-guessing-NVRAM-size-on-MTD-pa.patch
index 50b9f2daca..c40c8b7f89 100644
--- a/target/linux/brcm47xx/patches-4.0/030-09-MIPS-BCM47XX-Don-t-try-guessing-NVRAM-size-on-MTD-pa.patch
+++ b/target/linux/brcm47xx/patches-4.0/030-09-MIPS-BCM47XX-Don-t-try-guessing-NVRAM-size-on-MTD-pa.patch
@@ -19,8 +19,6 @@ Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
arch/mips/bcm47xx/nvram.c | 36 ++++++++++++++----------------------
1 file changed, 14 insertions(+), 22 deletions(-)
-diff --git a/arch/mips/bcm47xx/nvram.c b/arch/mips/bcm47xx/nvram.c
-index 2ac7482..ba632ff 100644
--- a/arch/mips/bcm47xx/nvram.c
+++ b/arch/mips/bcm47xx/nvram.c
@@ -139,36 +139,28 @@ static int nvram_init(void)
@@ -39,28 +37,29 @@ index 2ac7482..ba632ff 100644
-
- if (from < 0)
- continue;
--
-- err = mtd_read(mtd, from, sizeof(header), &bytes_read,
-- (uint8_t *)&header);
-- if (!err && header.magic == NVRAM_MAGIC) {
-- u8 *dst = (uint8_t *)nvram_buf;
-- size_t len = header.len;
+ err = mtd_read(mtd, 0, sizeof(header), &bytes_read, (uint8_t *)&header);
+ if (!err && header.magic == NVRAM_MAGIC) {
+ u8 *dst = (uint8_t *)nvram_buf;
+ size_t len = header.len;
-
-- if (header.len > NVRAM_SPACE) {
-- pr_err("nvram on flash (%i bytes) is bigger than the reserved space in memory, will just copy the first %i bytes\n",
-- header.len, NVRAM_SPACE);
-- len = NVRAM_SPACE;
-- }
++
+ if (header.len > NVRAM_SPACE) {
+ pr_err("nvram on flash (%i bytes) is bigger than the reserved space in memory, will just copy the first %i bytes\n",
+ header.len, NVRAM_SPACE);
+ len = NVRAM_SPACE;
+ }
+- err = mtd_read(mtd, from, sizeof(header), &bytes_read,
+- (uint8_t *)&header);
+- if (!err && header.magic == NVRAM_MAGIC) {
+- u8 *dst = (uint8_t *)nvram_buf;
+- size_t len = header.len;
+-
+- if (header.len > NVRAM_SPACE) {
+- pr_err("nvram on flash (%i bytes) is bigger than the reserved space in memory, will just copy the first %i bytes\n",
+- header.len, NVRAM_SPACE);
+- len = NVRAM_SPACE;
+- }
+-
- err = mtd_read(mtd, from, len, &bytes_read, dst);
- if (err)
- return err;
@@ -74,6 +73,3 @@ index 2ac7482..ba632ff 100644
}
#endif
---
-1.8.4.5
-