* [PATCH] mfd: Fix section mismatch warning for da9052-spi
@ 2012-01-11 9:27 Axel Lin
2012-02-20 11:15 ` Samuel Ortiz
0 siblings, 1 reply; 2+ messages in thread
From: Axel Lin @ 2012-01-11 9:27 UTC (permalink / raw)
To: linux-kernel; +Cc: David Dajun Chen, Ashish Jangam, Mark Brown, Samuel Ortiz
Add __devinit annotation for da9052_spi_probe to fix below build warning:
WARNING: drivers/built-in.o(.text+0x349b4): Section mismatch in reference from the function da9052_spi_probe() to the function .devinit.text:da9052_device_init()
The function da9052_spi_probe() references
the function __devinit da9052_device_init().
This is often because da9052_spi_probe lacks a __devinit
annotation or the annotation of da9052_device_init is wrong.
Also add __devexit annotation for da9052_spi_remove because we have
__devexit_p around it in the remove callback.
Signed-off-by: Axel Lin <axel.lin@gmail.com>
---
drivers/mfd/da9052-spi.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/mfd/da9052-spi.c b/drivers/mfd/da9052-spi.c
index cdbc7ca..2693c87 100644
--- a/drivers/mfd/da9052-spi.c
+++ b/drivers/mfd/da9052-spi.c
@@ -21,7 +21,7 @@
#include <linux/mfd/da9052/da9052.h>
-static int da9052_spi_probe(struct spi_device *spi)
+static int __devinit da9052_spi_probe(struct spi_device *spi)
{
int ret;
const struct spi_device_id *id = spi_get_device_id(spi);
@@ -61,7 +61,7 @@ err:
return ret;
}
-static int da9052_spi_remove(struct spi_device *spi)
+static int __devexit da9052_spi_remove(struct spi_device *spi)
{
struct da9052 *da9052 = dev_get_drvdata(&spi->dev);
--
1.7.5.4
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] mfd: Fix section mismatch warning for da9052-spi
2012-01-11 9:27 [PATCH] mfd: Fix section mismatch warning for da9052-spi Axel Lin
@ 2012-02-20 11:15 ` Samuel Ortiz
0 siblings, 0 replies; 2+ messages in thread
From: Samuel Ortiz @ 2012-02-20 11:15 UTC (permalink / raw)
To: Axel Lin; +Cc: linux-kernel, David Dajun Chen, Ashish Jangam, Mark Brown
Hi Axel,
On Wed, Jan 11, 2012 at 05:27:16PM +0800, Axel Lin wrote:
> Add __devinit annotation for da9052_spi_probe to fix below build warning:
>
> WARNING: drivers/built-in.o(.text+0x349b4): Section mismatch in reference from the function da9052_spi_probe() to the function .devinit.text:da9052_device_init()
> The function da9052_spi_probe() references
> the function __devinit da9052_device_init().
> This is often because da9052_spi_probe lacks a __devinit
> annotation or the annotation of da9052_device_init is wrong.
>
> Also add __devexit annotation for da9052_spi_remove because we have
> __devexit_p around it in the remove callback.
Applied, thanks.
Cheers,
Samuel.
--
Intel Open Source Technology Centre
http://oss.intel.com/
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2012-02-20 11:07 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-01-11 9:27 [PATCH] mfd: Fix section mismatch warning for da9052-spi Axel Lin
2012-02-20 11:15 ` Samuel Ortiz
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).