Skip to content

Commit

Permalink
spi/omap2: mark omap2_mcspi_master_setup as __devinit
Browse files Browse the repository at this point in the history
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.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Shubhrajyoti D <shubhrajyoti@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
  • Loading branch information
Arnd Bergmann authored and Mark Brown committed Jul 22, 2012
1 parent a3ce9a8 commit 24ab327
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/spi/spi-omap2-mcspi.c
Original file line number Diff line number Diff line change
Expand Up @@ -1034,7 +1034,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;
Expand Down

0 comments on commit 24ab327

Please sign in to comment.