MLK-11848-2 dma: imx-sdma: add __init for probe()
authorRobin Gong <b38343@freescale.com>
Tue, 10 Nov 2015 10:29:01 +0000 (18:29 +0800)
committerNitin Garg <nitin.garg@nxp.com>
Mon, 19 Mar 2018 19:49:13 +0000 (14:49 -0500)
Fix buiding error with GCC 4.6.2:

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

Signed-off-by: Robin Gong <b38343@freescale.com>
drivers/dma/imx-sdma.c

index 2d3098e..2caf992 100644 (file)
@@ -1953,7 +1953,7 @@ static struct dma_chan *sdma_xlate(struct of_phandle_args *dma_spec,
        return dma_request_channel(mask, sdma_filter_fn, &data);
 }
 
-static int sdma_probe(struct platform_device *pdev)
+static int __init sdma_probe(struct platform_device *pdev)
 {
        const struct of_device_id *of_id =
                        of_match_device(sdma_dt_ids, &pdev->dev);