Skip to contentSkip to conversation

mtd: use cfi-util in jedecprobe

PATCH In review Arnd Bergmann 2 participants 2 messages May 29, 2015 Memory technology devices (MTD)

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 mtd: use cfi-util in jedecprobe

A recent change to move cfi helper functions out of line is causing build errors when cfi-util is a loadable module and jedecprobe is built-in:

drivers/built-in.o: In function `jedec_reset':
(.text+0x140694): undefined reference to cfi_send_gen_cmd' drivers/built-in.o: In function jedec_probe_chip':
(.text+0x140794): undefined reference to `cfi_build_cmd_addr'

This adds a 'select' for the module containing these functions from the jedecprobe code, to ensure it is always reachable.

Fixes 4612c715a6ea6 ("mtd: cfi: deinline large functions")
drivers/mtd/chips/Kconfig +1 -0
index 6f20977f8cf6..63b6b536b044 100644
@@ -16,6 +16,7 @@ config MTD_CFI
 config MTD_JEDECPROBE
 	tristate "Detect non-CFI AMD/JEDEC-compatible flash chips"
 	select MTD_GEN_PROBE
+	select MTD_CFI_UTIL
 	help
 	  This option enables JEDEC-style probing of flash chips which are not
 	  compatible with the Common Flash Interface, but will use the common
#1 lore raw

Hi Arnd,

Quoted 9 lines · Arnd Bergmann

A recent change to move cfi helper functions out of line is causing build errors when cfi-util is a loadable module and jedecprobe is built-in:

drivers/built-in.o: In function `jedec_reset':
(.text+0x140694): undefined reference to cfi_send_gen_cmd' drivers/built-in.o: In function jedec_probe_chip':
(.text+0x140794): undefined reference to `cfi_build_cmd_addr'

Quoted 5 lines

This adds a 'select' for the module containing these functions from the jedecprobe code, to ensure it is always reachable.

Fixes 4612c715a6ea6 ("mtd: cfi: deinline large functions")

Already caught and fixed:

http://patchwork.ozlabs.org/patch/477464/

Thanks!