Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

mtd: physmap_of: really fix the physmap add-ons

The current way of building the of_physmap add-ons result in just
the add-on being in the object code, and not the actual core
implementation and regress the Gemini and Versatile.

Bake the physmap_of.o object by baking physmap_of_core.o and
adding the Versatile and/or Gemini add-ons to the final object.
Rename the source file physmap_of_core.c to get the desired
build components.

Suggested-by: Boris Brezillon <boris.brezillon@free-electrons.com>
Fixes: 4f04f68e1598 ("mtd: physmap_of: fixup gemini/versatile dependencies")
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Acked-by: Boris Brezillon <boris.brezillon@free-electrons.com>
Signed-off-by: Brian Norris <computersforpeace@gmail.com>

authored by

Linus Walleij and committed by
Brian Norris
8c925b26 4a67c9fd

+4 -6
+4 -6
drivers/mtd/maps/Makefile
··· 17 17 obj-$(CONFIG_MTD_TSUNAMI) += tsunami_flash.o 18 18 obj-$(CONFIG_MTD_PXA2XX) += pxa2xx-flash.o 19 19 obj-$(CONFIG_MTD_PHYSMAP) += physmap.o 20 - ifdef CONFIG_MTD_PHYSMAP_OF_VERSATILE 21 - physmap_of-objs += physmap_of_versatile.o 22 - endif 23 - ifdef CONFIG_MTD_PHYSMAP_OF_GEMINI 24 - physmap_of-objs += physmap_of_gemini.o 25 - endif 20 + physmap_of-objs-y += physmap_of_core.o 21 + physmap_of-objs-$(CONFIG_MTD_PHYSMAP_OF_VERSATILE) += physmap_of_versatile.o 22 + physmap_of-objs-$(CONFIG_MTD_PHYSMAP_OF_GEMINI) += physmap_of_gemini.o 23 + physmap_of-objs := $(physmap_of-objs-y) 26 24 obj-$(CONFIG_MTD_PHYSMAP_OF) += physmap_of.o 27 25 obj-$(CONFIG_MTD_PISMO) += pismo.o 28 26 obj-$(CONFIG_MTD_PMC_MSP_EVM) += pmcmsp-flash.o
drivers/mtd/maps/physmap_of.c drivers/mtd/maps/physmap_of_core.c