47223098ec53d2f027269c937f89de3f40ee152f
[openwrt/staging/wigyori.git] / target / linux / generic / backport-5.4 / 402-v5.12-0004-mtd-parsers-ofpart-fix-building-as-module.patch
1 From bc6dcf44da2bea215ae3edbdac5d350e96de3996 Mon Sep 17 00:00:00 2001
2 From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= <rafal@milecki.pl>
3 Date: Mon, 15 Feb 2021 08:28:44 +0100
4 Subject: [PATCH] mtd: parsers: ofpart: fix building as module
5 MIME-Version: 1.0
6 Content-Type: text/plain; charset=UTF-8
7 Content-Transfer-Encoding: 8bit
8
9 This fixes:
10 ERROR: modpost: missing MODULE_LICENSE() in drivers/mtd/parsers/bcm4908-partitions.o
11 ERROR: modpost: "bcm4908_partitions_post_parse" [drivers/mtd/parsers/ofpart.ko] undefined!
12
13 Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
14 Fixes: 09cf6ee6d21c ("mtd: parsers: ofpart: support BCM4908 fixed partitions")
15 Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
16 Signed-off-by: Richard Weinberger <richard@nod.at>
17 ---
18 drivers/mtd/parsers/Makefile | 2 +-
19 drivers/mtd/parsers/bcm4908-partitions.c | 2 ++
20 2 files changed, 3 insertions(+), 1 deletion(-)
21
22 --- a/drivers/mtd/parsers/Makefile
23 +++ b/drivers/mtd/parsers/Makefile
24 @@ -4,7 +4,7 @@ obj-$(CONFIG_MTD_BCM47XX_PARTS) += bcm4
25 obj-$(CONFIG_MTD_BCM63XX_PARTS) += bcm63xxpart.o
26 obj-$(CONFIG_MTD_CMDLINE_PARTS) += cmdlinepart.o
27 obj-$(CONFIG_MTD_OF_PARTS) += ofpart.o
28 -obj-$(CONFIG_MTD_OF_PARTS) += bcm4908-partitions.o
29 +ofpart-objs := bcm4908-partitions.o
30 obj-$(CONFIG_MTD_PARSER_IMAGETAG) += parser_imagetag.o
31 obj-$(CONFIG_MTD_AFS_PARTS) += afs.o
32 obj-$(CONFIG_MTD_PARSER_TRX) += parser_trx.o
33 --- a/drivers/mtd/parsers/bcm4908-partitions.c
34 +++ b/drivers/mtd/parsers/bcm4908-partitions.c
35 @@ -62,3 +62,5 @@ int bcm4908_partitions_post_parse(struct
36
37 return 0;
38 }
39 +
40 +MODULE_LICENSE("GPL");