spi/omap2: mark omap2_mcspi_master_setup as __devinit
This warning recently appeared with omap2plus_defconfig:
WARNING: drivers/spi/built-in.o(.devinit.text+0x3c4): Section mismatch in reference from the function omap2_mcspi_probe() to the function .init.text:omap2_mcspi_master_setup() The function __devinit omap2_mcspi_probe() references
a function __init omap2_mcspi_master_setup().
If omap2_mcspi_master_setup is only used by omap2_mcspi_probe then
annotate omap2_mcspi_master_setup with a matching annotation.
The fix is obviously to mark the omap2_mcspi_master_setup function as __devinit, rather than __init.
drivers/spi/spi-omap2-mcspi.c +1 -1
@@ -1032,7 +1032,7 @@ static int omap2_mcspi_transfer_one_message(struct spi_master *master,return 0 ; } -static int __init omap2_mcspi_master_setup (struct omap2_mcspi *mcspi) +static int __devinit omap2_mcspi_master_setup (struct omap2_mcspi *mcspi) {struct spi_master *master = mcspi->master;struct omap2_mcspi_regs *ctx = &mcspi->ctx;
------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
Shubhrajyoti
Acked-by Shubhrajyoti D+Mark
Since Grant is moving to a new house.
Quoted 10 lines · Arnd Bergmann
This warning recently appeared with
omap2plus_defconfig:WARNING: drivers/spi/built-in.o(.devinit.text+0x3c4): Section mismatch in reference from the function
omap2_mcspi_probe()to the function .init.text:omap2_mcspi_master_setup() The function__devinitomap2_mcspi_probe()references
a function__initomap2_mcspi_master_setup().
Ifomap2_mcspi_master_setupis only used byomap2_mcspi_probethen
annotateomap2_mcspi_master_setupwith a matching annotation.The fix is obviously to mark the
omap2_mcspi_master_setupfunction as__devinit, rather than__init.
Thanks for the patch.
Apologies for breaking in one my patch series.
Quoted 8 lines
Signed-off-by Arnd Bergmann <[email protected]>drivers/spi/spi-omap2-mcspi.c +0
-0
drivers/spi/spi-omap2-mcspi.c static int omap2_mcspi_transfer_one_message(struct spi_master *master, · line 1038
Quoted 8 lines
drivers/spi/spi-omap2-mcspi.c +1
-1@@ -1032,7 +1032,7 @@ static int omap2_mcspi_transfer_one_message(struct spi_master *master,return 0 ; } -static int __init omap2_mcspi_master_setup (struct omap2_mcspi *mcspi) +static int __devinit omap2_mcspi_master_setup (struct omap2_mcspi *mcspi) {struct spi_master *master = mcspi->master;struct omap2_mcspi_regs *ctx = &mcspi->ctx;
------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/