Skip to content

Commit

Permalink
Documentation/spi/* compile warning fix
Browse files Browse the repository at this point in the history
Fix this warning:

Documentation/spi/spidev_fdx.c: In function `do_msg':
Documentation/spi/spidev_fdx.c:61: warning: cast from pointer to integer of different size
Documentation/spi/spidev_fdx.c:64: warning: cast from pointer to integer of different size

buf should be unsigned long to match native arch on 32-bit x86 compile.

Signed-off-by: Prarit Bhargava <[email protected]>
Signed-off-by: Grant Likely <[email protected]>
  • Loading branch information
prarit authored and glikely committed May 25, 2010
1 parent 99f1a43 commit 1dcf57c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Documentation/spi/spidev_fdx.c
Original file line number Diff line number Diff line change
Expand Up @@ -58,10 +58,10 @@ static void do_msg(int fd, int len)
len = sizeof buf;

buf[0] = 0xaa;
xfer[0].tx_buf = (__u64) buf;
xfer[0].tx_buf = (unsigned long)buf;
xfer[0].len = 1;

xfer[1].rx_buf = (__u64) buf;
xfer[1].rx_buf = (unsigned long) buf;
xfer[1].len = len;

status = ioctl(fd, SPI_IOC_MESSAGE(2), xfer);
Expand Down

0 comments on commit 1dcf57c

Please sign in to comment.