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

mtd: fix section mismatch for doc_probe_device

doc_probe_device() is only called from docg3_probe() which is in .init.text,
so it must be in the same section to avoid a section mismatch warning.

Signed-off-by: Ryosuke Saito <raitosyo@gmail.com>
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>

authored by

Ryosuke Saito and committed by
David Woodhouse
30053b87 2a5dbead

+2 -2
+2 -2
drivers/mtd/devices/docg3.c
··· 1847 1847 * if a memory allocation failed. If floor 0 is checked, a reset of the ASIC is 1848 1848 * launched. 1849 1849 */ 1850 - static struct mtd_info *doc_probe_device(void __iomem *base, int floor, 1851 - struct device *dev) 1850 + static struct mtd_info * __init 1851 + doc_probe_device(void __iomem *base, int floor, struct device *dev) 1852 1852 { 1853 1853 int ret, bbt_nbpages; 1854 1854 u16 chip_id, chip_id_inv;