diff mbox

dma: imx-sdma: remove incorrect __init annotation from sdma_init()

Message ID 001201cff95e$68e0f8d0$3aa2ea70$%han@samsung.com (mailing list archive)
State Accepted
Headers show

Commit Message

Jingoo Han Nov. 6, 2014, 1:10 a.m. UTC
When platform_driver_probe() is not used, sdma_probe() can be called
by bind/unbind via sysfs. In addition, sdma_init() can be called by
sdma_probe(). Thus, __init annotation should be removed from sdma_init(),
Also, this patch fixes section mismatch warning.

WARNING: drivers/dma/built-in.o(.text+0xd6e4): Section mismatch in reference from the function sdma_probe() to the function
.init.text:sdma_init()
The function sdma_probe() references
the function __init sdma_init().
This is often because sdma_probe lacks a __init
annotation or the annotation of sdma_init is wrong.

Signed-off-by: Jingoo Han <jg1.han@samsung.com>
---
 drivers/dma/imx-sdma.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Vinod Koul Nov. 6, 2014, 1:29 p.m. UTC | #1
On Thu, Nov 06, 2014 at 10:10:09AM +0900, Jingoo Han wrote:
> When platform_driver_probe() is not used, sdma_probe() can be called
> by bind/unbind via sysfs. In addition, sdma_init() can be called by
> sdma_probe(). Thus, __init annotation should be removed from sdma_init(),
> Also, this patch fixes section mismatch warning.

Applied, thanks
diff mbox

Patch

diff --git a/drivers/dma/imx-sdma.c b/drivers/dma/imx-sdma.c
index 88afc48..99d8833 100644
--- a/drivers/dma/imx-sdma.c
+++ b/drivers/dma/imx-sdma.c
@@ -1346,7 +1346,7 @@  static int sdma_get_firmware(struct sdma_engine *sdma,
 	return ret;
 }
 
-static int __init sdma_init(struct sdma_engine *sdma)
+static int sdma_init(struct sdma_engine *sdma)
 {
 	int i, ret;
 	dma_addr_t ccb_phys;