kernel: bump 4.14 to 4.14.53
[openwrt/openwrt.git] / target / linux / ipq40xx / patches-4.14 / 400-mtd-ubi-add-quirk-to-autoload-ubi-on-rt-ac58u.patch
1 From b8f3a7ccbeca5bdbd1b6210b94b38d3fef2dd0bd Mon Sep 17 00:00:00 2001
2 From: Christian Lamparter <chunkeey@googlemail.com>
3 Date: Thu, 19 Jan 2017 01:57:22 +0100
4 Subject: [PATCH 16/38] mtd: ubi: add auto_attach HACK for the ASUS RT-AC58U
5
6 This patch adds a hack that allows UBI's autoattach feature
7 to work with the custom ASUS UBI_DEV partition name.
8
9 This is necessary because the vendor's u-boot doesn't leave
10 the bootargs / cmdline alone, so the it can't be overwritten
11 easily otherwise.
12
13 Signed-off-by: Christian Lamparter <chunkeey@googlemail.com>
14 ---
15 drivers/mtd/ubi/build.c | 3 +++
16 1 file changed, 3 insertions(+)
17
18 --- a/drivers/mtd/ubi/build.c
19 +++ b/drivers/mtd/ubi/build.c
20 @@ -1184,6 +1184,9 @@ static void __init ubi_auto_attach(void)
21 mtd = open_mtd_device("ubi");
22 if (IS_ERR(mtd))
23 mtd = open_mtd_device("data");
24 + /* Hack for the Asus RT-AC58U */
25 + if (IS_ERR(mtd))
26 + mtd = open_mtd_device("UBI_DEV");
27
28 if (!IS_ERR(mtd)) {
29 size_t len;