lkml.org 
[lkml]   [2012]   [Jul]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH] spi/omap2: mark omap2_mcspi_master_setup as __devinit
Date
From: Arnd Bergmann <arnd@arndb.de>

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>
---
drivers/spi/spi-omap2-mcspi.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/spi/spi-omap2-mcspi.c b/drivers/spi/spi-omap2-mcspi.c
index 37ccdb7..7d46b15 100644
--- a/drivers/spi/spi-omap2-mcspi.c
+++ b/drivers/spi/spi-omap2-mcspi.c
@@ -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;
--
1.7.5.4


\
 
 \ /
  Last update: 2012-07-20 13:21    [W:0.023 / U:0.264 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site