linux/drivers/memory
Uwe Kleine-König (The Capable Hub) f97bdc8ec1 mtd: nand-omap2: Move omap_nand_ids[] to raw nand driver
Defining a static array in a header results in each .c file that
includes the header (here: drivers/memory/omap-gpmc.c and
drivers/mtd/nand/raw/omap2.c) to contain a copy of that array when
compiled to an object file.

With sizeof(struct of_device_id[3]) ≥ 588 having omap_nand_ids[] twice
just to do two string comparisons is quite some bloat. So move
omap_nand_ids[] to the nand driver which actually needs that array for
its module meta data and do the compatible check by hand.

bloat-o-meter reports for drivers/memory/omap-gpmc.o (ARCH=arm):

	add/remove: 1/2 grow/shrink: 1/0 up/down: 28/-588 (-560)
	Function                                     old     new   delta
	gpmc_probe_generic_child                    2108    2136     +28
	omap_nand_ids                                588       -    -588
	Total: Before=18114, After=17554, chg -3.09%

(drivers/mtd/nand/raw/omap2.o doesn't change).

This allows to drop <linux/mod_devicetable.h> from
include/linux/platform_data/mtd-nand-omap2.h (which is my original
motivation for this change). Note that this header isn't needed in the
two drivers because omap-gpmc.c doesn't use any device id struct and for
the nand driver omap2.c of_device_id is already provided via
<linux/platform_device.h>.

Signed-off-by: Uwe Kleine-König (The Capable Hub) <u.kleine-koenig@baylibre.com>
Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
2026-07-17 17:48:25 +02:00
..
samsung Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
tegra soc: drivers for 7.2 2026-06-17 11:21:40 -07:00
.gitignore .gitignore: prefix local generated files with a slash 2021-05-02 00:43:35 +09:00
atmel-ebi.c memory: atmel-ebi: Allow deferred probing 2026-05-04 19:15:59 +02:00
brcmstb_dpfe.c Get rid of 'remove_new' relic from platform driver struct 2024-12-01 15:12:43 -08:00
brcmstb_memc.c memory: brcmstb_memc: Expand LPDDR4 check to cover for LPDDR5 2026-02-26 09:43:04 +01:00
da8xx-ddrctl.c memory: Explicitly include correct DT includes 2023-07-25 22:09:37 +02:00
dfl-emif.c memory: dfl-emif: Update the dfl emif driver support revision 1 2022-08-16 12:12:04 +03:00
emif-asm-offsets.c memory: emif-asm-offsets: Add GPLv2 SPDX license header 2020-07-24 16:18:32 +02:00
emif.c memory: emif: Add missing kerneldoc for lpmode 2025-06-10 09:54:45 +02:00
emif.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00
fsl_ifc.c Get rid of 'remove_new' relic from platform driver struct 2024-12-01 15:12:43 -08:00
fsl-corenet-cf.c Get rid of 'remove_new' relic from platform driver struct 2024-12-01 15:12:43 -08:00
jedec_ddr_data.c memory: Add LPDDR2-info helpers 2021-10-15 09:52:47 +02:00
jedec_ddr.h memory: Add LPDDR2-info helpers 2021-10-15 09:52:47 +02:00
jz4780-nemc.c Get rid of 'remove_new' relic from platform driver struct 2024-12-01 15:12:43 -08:00
Kconfig memory: bt1-l2-ctl: Remove not-going-to-be-supported code for Baikal SoC 2026-02-26 08:28:15 +01:00
Makefile memory: bt1-l2-ctl: Remove not-going-to-be-supported code for Baikal SoC 2026-02-26 08:28:15 +01:00
mtk-smi.c memory: mtk-smi: clean up device link creation 2025-12-16 08:21:11 +01:00
mvebu-devbus.c memory: remove MODULE_LICENSE in non-modules 2023-03-09 15:20:50 +01:00
of_memory.c memory: of: Fix refcount leak bug in of_lpddr3_get_ddr_timings() 2022-08-16 12:12:06 +03:00
of_memory.h memory: Add LPDDR2-info helpers 2021-10-15 09:52:47 +02:00
omap-gpmc.c mtd: nand-omap2: Move omap_nand_ids[] to raw nand driver 2026-07-17 17:48:25 +02:00
pl172.c memory: pl172: simplify releasing AMBA regions with devm 2024-08-31 07:44:23 +02:00
pl353-smc.c memory: pl353-smc: simplify with scoped for each OF child loop 2024-08-31 07:44:24 +02:00
renesas-rpc-if-regs.h memory: renesas-rpc-if: Move rpc-if reg definitions 2025-05-01 12:21:52 +02:00
renesas-rpc-if.c memory: renesas-rpc-if: Fix duplicate device name on multi-instance platforms 2026-05-24 21:05:15 +02:00
renesas-xspi-if-regs.h memory: renesas-rpc-if: Add RZ/G3E xSPI support 2025-05-01 12:22:25 +02:00
stm32_omm.c memory: stm32_omm: Fix req2ack update test 2025-08-11 14:53:13 +02:00
stm32-fmc2-ebi.c Get rid of 'remove_new' relic from platform driver struct 2024-12-01 15:12:43 -08:00
ti-aemif.c memory: ti-aemif: Export aemif_*_cs_timings() 2024-12-09 20:38:27 +01:00
ti-emif-pm.c Get rid of 'remove_new' relic from platform driver struct 2024-12-01 15:12:43 -08:00
ti-emif-sram-pm.S ARM: mm: Make virt_to_pfn() a static inline 2023-05-29 11:27:08 +02:00