forked from Minki/linux
[PATCH] SPI controller build/warning fixes
The signature of the per-device cleanup() routine changed to remove its const-ness. Three new SPI controller drivers now need that change, to eliminate build warnings. This also fixes a build bug with atmel_spi on AT91 systems. Signed-off-by: David Brownell <dbrownell@users.sourceforge.net> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This commit is contained in:
parent
0bb92e6cd3
commit
bb2d1c36c7
@ -23,6 +23,10 @@
|
|||||||
#include <asm/arch/board.h>
|
#include <asm/arch/board.h>
|
||||||
#include <asm/arch/gpio.h>
|
#include <asm/arch/gpio.h>
|
||||||
|
|
||||||
|
#ifdef CONFIG_ARCH_AT91
|
||||||
|
#include <asm/arch/cpu.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
#include "atmel_spi.h"
|
#include "atmel_spi.h"
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -491,7 +495,7 @@ static int atmel_spi_transfer(struct spi_device *spi, struct spi_message *msg)
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void atmel_spi_cleanup(const struct spi_device *spi)
|
static void atmel_spi_cleanup(struct spi_device *spi)
|
||||||
{
|
{
|
||||||
if (spi->controller_state)
|
if (spi->controller_state)
|
||||||
gpio_free((unsigned int)spi->controller_data);
|
gpio_free((unsigned int)spi->controller_data);
|
||||||
|
@ -459,7 +459,7 @@ static int uwire_setup(struct spi_device *spi)
|
|||||||
return uwire_setup_transfer(spi, NULL);
|
return uwire_setup_transfer(spi, NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void uwire_cleanup(const struct spi_device *spi)
|
static void uwire_cleanup(struct spi_device *spi)
|
||||||
{
|
{
|
||||||
kfree(spi->controller_state);
|
kfree(spi->controller_state);
|
||||||
}
|
}
|
||||||
|
@ -1361,10 +1361,9 @@ err_first_setup:
|
|||||||
return status;
|
return status;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void cleanup(const struct spi_device *spi)
|
static void cleanup(struct spi_device *spi)
|
||||||
{
|
{
|
||||||
struct chip_data *chip = spi_get_ctldata((struct spi_device *)spi);
|
kfree(spi_get_ctldata(spi));
|
||||||
kfree(chip);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static int init_queue(struct driver_data *drv_data)
|
static int init_queue(struct driver_data *drv_data)
|
||||||
|
Loading…
Reference in New Issue
Block a user