diff options
author | David Brownell <david-b@pacbell.net> | 2007-02-20 16:58:19 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-02-20 20:10:16 -0500 |
commit | bb2d1c36c7f3a78d482622289c8de0c1a5fe790f (patch) | |
tree | 1bb4dc9b173f500b4a130c05eae8ad080699597a /drivers | |
parent | 0bb92e6cd313cf209ea0c164952d1f65c5b3ea46 (diff) |
[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>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/spi/atmel_spi.c | 6 | ||||
-rw-r--r-- | drivers/spi/omap_uwire.c | 2 | ||||
-rw-r--r-- | drivers/spi/spi_imx.c | 5 |
3 files changed, 8 insertions, 5 deletions
diff --git a/drivers/spi/atmel_spi.c b/drivers/spi/atmel_spi.c index c2a9fef58edc..6fa260d1a9be 100644 --- a/drivers/spi/atmel_spi.c +++ b/drivers/spi/atmel_spi.c | |||
@@ -23,6 +23,10 @@ | |||
23 | #include <asm/arch/board.h> | 23 | #include <asm/arch/board.h> |
24 | #include <asm/arch/gpio.h> | 24 | #include <asm/arch/gpio.h> |
25 | 25 | ||
26 | #ifdef CONFIG_ARCH_AT91 | ||
27 | #include <asm/arch/cpu.h> | ||
28 | #endif | ||
29 | |||
26 | #include "atmel_spi.h" | 30 | #include "atmel_spi.h" |
27 | 31 | ||
28 | /* | 32 | /* |
@@ -491,7 +495,7 @@ static int atmel_spi_transfer(struct spi_device *spi, struct spi_message *msg) | |||
491 | return 0; | 495 | return 0; |
492 | } | 496 | } |
493 | 497 | ||
494 | static void atmel_spi_cleanup(const struct spi_device *spi) | 498 | static void atmel_spi_cleanup(struct spi_device *spi) |
495 | { | 499 | { |
496 | if (spi->controller_state) | 500 | if (spi->controller_state) |
497 | gpio_free((unsigned int)spi->controller_data); | 501 | gpio_free((unsigned int)spi->controller_data); |
diff --git a/drivers/spi/omap_uwire.c b/drivers/spi/omap_uwire.c index 366af4959a0f..96f62b2df300 100644 --- a/drivers/spi/omap_uwire.c +++ b/drivers/spi/omap_uwire.c | |||
@@ -459,7 +459,7 @@ static int uwire_setup(struct spi_device *spi) | |||
459 | return uwire_setup_transfer(spi, NULL); | 459 | return uwire_setup_transfer(spi, NULL); |
460 | } | 460 | } |
461 | 461 | ||
462 | static void uwire_cleanup(const struct spi_device *spi) | 462 | static void uwire_cleanup(struct spi_device *spi) |
463 | { | 463 | { |
464 | kfree(spi->controller_state); | 464 | kfree(spi->controller_state); |
465 | } | 465 | } |
diff --git a/drivers/spi/spi_imx.c b/drivers/spi/spi_imx.c index 6ccf8a12a21d..51daa212c6b7 100644 --- a/drivers/spi/spi_imx.c +++ b/drivers/spi/spi_imx.c | |||
@@ -1361,10 +1361,9 @@ err_first_setup: | |||
1361 | return status; | 1361 | return status; |
1362 | } | 1362 | } |
1363 | 1363 | ||
1364 | static void cleanup(const struct spi_device *spi) | 1364 | static void cleanup(struct spi_device *spi) |
1365 | { | 1365 | { |
1366 | struct chip_data *chip = spi_get_ctldata((struct spi_device *)spi); | 1366 | kfree(spi_get_ctldata(spi)); |
1367 | kfree(chip); | ||
1368 | } | 1367 | } |
1369 | 1368 | ||
1370 | static int init_queue(struct driver_data *drv_data) | 1369 | static int init_queue(struct driver_data *drv_data) |