Skip to content

Commit

Permalink
mfd: Fix section mismatch warning for da9052-spi
Browse files Browse the repository at this point in the history
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>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
  • Loading branch information
Axel Lin authored and Samuel Ortiz committed Mar 6, 2012
1 parent 1039d76 commit e536b62
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/mfd/da9052-spi.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -63,7 +63,7 @@ static int da9052_spi_probe(struct spi_device *spi)
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);

Expand Down

0 comments on commit e536b62

Please sign in to comment.