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

mtd: fix section mismatch on sst25l

Building the kernel with 'make CONFIG_DEBUG_SECTION_MISMATCH=y´

resulted in:

WARNING: vmlinux.o(.data+0x15938): Section mismatch in reference from
the variable sst25l_driver to the function .init.text:sst25l_probe()
The variable sst25l_driver references
the function __init sst25l_probe()
If the reference is valid then annotate the
variable with __init* or __refdata (see linux/init.h) or name the variable:
*_template, *_timer, *_sht, *_ops, *_probe, *_probe_one, *_console,

Fix the section mismatch.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>

authored by

Fabio Estevam and committed by
David Woodhouse
6b2995b6 2ebf0622

+2 -2
+2 -2
drivers/mtd/devices/sst25l.c
··· 335 335 return ret; 336 336 } 337 337 338 - static struct flash_info *__init sst25l_match_device(struct spi_device *spi) 338 + static struct flash_info *__devinit sst25l_match_device(struct spi_device *spi) 339 339 { 340 340 struct flash_info *flash_info = NULL; 341 341 struct spi_message m; ··· 375 375 return flash_info; 376 376 } 377 377 378 - static int __init sst25l_probe(struct spi_device *spi) 378 + static int __devinit sst25l_probe(struct spi_device *spi) 379 379 { 380 380 struct flash_info *flash_info; 381 381 struct sst25l_flash *flash;