Skip to content

Commit

Permalink
spi: qup: fix 64-bit build warning
Browse files Browse the repository at this point in the history
On 64-bit systems, pointers are wider than 'int' variables,
so we get a warning about a cast between them:

drivers/spi/spi-qup.c:1060:23: error: cast from pointer to integer of different size [-Werror=pointer-to-int-cast]

This changes the code to use the correct uintptr_t cast.

Fixes: 4d02373 ("spi: qup: Fix QUP version identify method")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Mark Brown <broonie@kernel.org>
  • Loading branch information
Arnd Bergmann authored and Mark Brown committed Aug 10, 2017
1 parent 6f38f12 commit 88a1981
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/spi/spi-qup.c
Original file line number Diff line number Diff line change
Expand Up @@ -1057,7 +1057,7 @@ static int spi_qup_probe(struct platform_device *pdev)
else if (!ret)
master->can_dma = spi_qup_can_dma;

controller->qup_v1 = (int)of_device_get_match_data(dev);
controller->qup_v1 = (uintptr_t)of_device_get_match_data(dev);

if (!controller->qup_v1)
master->set_cs = spi_qup_set_cs;
Expand Down

0 comments on commit 88a1981

Please sign in to comment.