aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMark Brown <broonie@linaro.org>2014-08-01 12:43:03 -0400
committerMark Brown <broonie@linaro.org>2014-08-01 13:22:42 -0400
commit67f08d690aa90e47a0e793fc63e2ecbe95d29839 (patch)
tree7926d4c8eab1ee848145d64d089390e0a260698a
parentef40eb39e0128b42d64bbbf5a6635548f6f68a01 (diff)
spi/atmel: Fix pointer to int conversion warnings on 64 bit builds
On 64 bit systems integers are generally still 32 bit but long values and pointers are usually 64 bit. GCC warns when casting a 64 bit pointer into a 32 bit integer so cast to a long instead in order to avoid warnings. Signed-off-by: Mark Brown <broonie@linaro.org>
-rw-r--r--drivers/spi/spi-atmel.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/spi/spi-atmel.c b/drivers/spi/spi-atmel.c
index 1fb90dda299b..113c83f44b5c 100644
--- a/drivers/spi/spi-atmel.c
+++ b/drivers/spi/spi-atmel.c
@@ -1012,7 +1012,7 @@ static int atmel_spi_setup(struct spi_device *spi)
1012 csr |= SPI_BF(DLYBCT, 0); 1012 csr |= SPI_BF(DLYBCT, 0);
1013 1013
1014 /* chipselect must have been muxed as GPIO (e.g. in board setup) */ 1014 /* chipselect must have been muxed as GPIO (e.g. in board setup) */
1015 npcs_pin = (unsigned int)spi->controller_data; 1015 npcs_pin = (unsigned long)spi->controller_data;
1016 1016
1017 if (gpio_is_valid(spi->cs_gpio)) 1017 if (gpio_is_valid(spi->cs_gpio))
1018 npcs_pin = spi->cs_gpio; 1018 npcs_pin = spi->cs_gpio;
@@ -1247,7 +1247,7 @@ msg_done:
1247static void atmel_spi_cleanup(struct spi_device *spi) 1247static void atmel_spi_cleanup(struct spi_device *spi)
1248{ 1248{
1249 struct atmel_spi_device *asd = spi->controller_state; 1249 struct atmel_spi_device *asd = spi->controller_state;
1250 unsigned gpio = (unsigned) spi->controller_data; 1250 unsigned gpio = (unsigned long) spi->controller_data;
1251 1251
1252 if (!asd) 1252 if (!asd)
1253 return; 1253 return;