提交 1dcf57ce 编写于 作者: P Prarit Bhargava 提交者: Grant Likely

Documentation/spi/* compile warning fix

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: NPrarit Bhargava <prarit@redhat.com>
Signed-off-by: NGrant Likely <grant.likely@secretlab.ca>
上级 99f1a43f
......@@ -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);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册