]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/commitdiff
[PATCH] SPI controller build/warning fixes
authorDavid Brownell <david-b@pacbell.net>
Tue, 20 Feb 2007 21:58:19 +0000 (13:58 -0800)
committerLinus Torvalds <torvalds@woody.linux-foundation.org>
Wed, 21 Feb 2007 01:10:16 +0000 (17:10 -0800)
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>
drivers/spi/atmel_spi.c
drivers/spi/omap_uwire.c
drivers/spi/spi_imx.c

index c2a9fef58edcc3e9d29235233aa24c7a83a63ca9..6fa260d1a9be06607be15658bcbc3b7a452b18e8 100644 (file)
 #include <asm/arch/board.h>
 #include <asm/arch/gpio.h>
 
+#ifdef CONFIG_ARCH_AT91
+#include <asm/arch/cpu.h>
+#endif
+
 #include "atmel_spi.h"
 
 /*
@@ -491,7 +495,7 @@ static int atmel_spi_transfer(struct spi_device *spi, struct spi_message *msg)
        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)
                gpio_free((unsigned int)spi->controller_data);
index 366af4959a0f27a70c4066d7d72a53da0269e7e7..96f62b2df300d26fce75823fa257e01a5e03f42b 100644 (file)
@@ -459,7 +459,7 @@ static int uwire_setup(struct spi_device *spi)
        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);
 }
index 6ccf8a12a21dd8f9e6d00e1c2c70bd8cdc6f877f..51daa212c6b799fd769ca82ef6f57bef96a933e3 100644 (file)
@@ -1361,10 +1361,9 @@ err_first_setup:
        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(chip);
+       kfree(spi_get_ctldata(spi));
 }
 
 static int init_queue(struct driver_data *drv_data)