Skip to content

Commit

Permalink
spi: fix pointer-integer size mismatch warning
Browse files Browse the repository at this point in the history
Fix the pointer-integer size mismatch warning below:
	drivers/spi/spi-gpio.c: In function ‘spi_gpio_setup’:
	drivers/spi/spi-gpio.c:252:8: warning: cast from pointer to integer of
			different size [-Wpointer-to-int-cast]
	   cs = (unsigned int) spi->controller_data;
	        ^

Signed-off-by: SeongJae Park <sj38.park@gmail.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
  • Loading branch information
SeongJae Park authored and Mark Brown committed Feb 4, 2014
1 parent 38dbfb5 commit e1bde3b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/spi/spi-gpio.c
Original file line number Diff line number Diff line change
Expand Up @@ -250,7 +250,7 @@ static int spi_gpio_setup(struct spi_device *spi)
/*
* ... otherwise, take it from spi->controller_data
*/
cs = (unsigned int) spi->controller_data;
cs = (unsigned int)(uintptr_t) spi->controller_data;
}

if (!spi->controller_state) {
Expand Down

0 comments on commit e1bde3b

Please sign in to comment.