[PATCH] mtd: Makefile fix (was Re: [PATCH] mtdsuper: licensce = GPL)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,


On Thu, 2 Aug 2007, Rafał Bilski wrote:

> [...]
>  CC      drivers/mtd/chips/chipreg.mod.o
>  LD [M]  drivers/mtd/chips/chipreg.ko
>  CC      drivers/mtd/devices/block2mtd.mod.o
>  LD [M]  drivers/mtd/devices/block2mtd.ko
>  CC      drivers/mtd/mtd_blkdevs.mod.o
>  LD [M]  drivers/mtd/mtd_blkdevs.ko
>  CC      drivers/mtd/mtdblock.mod.o
>  LD [M]  drivers/mtd/mtdblock.ko
>  CC      drivers/mtd/mtdchar.mod.o
>  LD [M]  drivers/mtd/mtdchar.ko
>  CC      drivers/mtd/mtdcore.mod.o
>  LD [M]  drivers/mtd/mtdcore.ko
>  CC      drivers/mtd/mtdsuper.mod.o
>  LD [M]  drivers/mtd/mtdsuper.ko
> 
> % ls *.ko
> mtd_blkdevs.ko  mtdblock.ko  mtdchar.ko  mtdcore.ko  mtdsuper.ko

Yup, I end up with the above situation myself. Please try the patch
below.

David, are mtdcore, mtdsuper, mtdpart (and I also noticed mtdbdi.c
in -mm kernel) supposed to be linked into the same module or are they
supposed to be built as separate modules?

If separate, we need to apply Rafal's patch and ensure MODULE_LICENSE
(at least) in all the above files.

If the same module, then please consider applying the patch below.


[PATCH] mtd: Makefile fix

We want drivers/mtd/{mtdcore, mtdsuper, mtdpart}.c to be built and linked
into the same mtd.ko module. Fix the Makefile to ensure this, and remove
duplicate MODULE_ declarations in mtdpart.c, as mtdcore.c already has them.

Signed-off-by: Satyam Sharma <[email protected]>

---

 drivers/mtd/Makefile  |    2 +-
 drivers/mtd/mtdpart.c |    4 ----
 2 files changed, 1 insertions(+), 5 deletions(-)

diff --git a/drivers/mtd/Makefile b/drivers/mtd/Makefile
index 451adcc..6d958a4 100644
--- a/drivers/mtd/Makefile
+++ b/drivers/mtd/Makefile
@@ -3,9 +3,9 @@
 #
 
 # Core functionality.
+obj-$(CONFIG_MTD)		+= mtd.o
 mtd-y				:= mtdcore.o mtdsuper.o
 mtd-$(CONFIG_MTD_PARTITIONS)	+= mtdpart.o
-obj-$(CONFIG_MTD)		+= $(mtd-y)
 
 obj-$(CONFIG_MTD_CONCAT)	+= mtdconcat.o
 obj-$(CONFIG_MTD_REDBOOT_PARTS) += redboot.o
diff --git a/drivers/mtd/mtdpart.c b/drivers/mtd/mtdpart.c
index 9c62368..6174a97 100644
--- a/drivers/mtd/mtdpart.c
+++ b/drivers/mtd/mtdpart.c
@@ -560,7 +560,3 @@ int parse_mtd_partitions(struct mtd_info *master, const char **types,
 EXPORT_SYMBOL_GPL(parse_mtd_partitions);
 EXPORT_SYMBOL_GPL(register_mtd_parser);
 EXPORT_SYMBOL_GPL(deregister_mtd_parser);
-
-MODULE_LICENSE("GPL");
-MODULE_AUTHOR("Nicolas Pitre <[email protected]>");
-MODULE_DESCRIPTION("Generic support for partitioning of MTD devices");

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux