summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Brownell <david-b@pacbell.net>2007-08-10 22:01:09 +0200
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-08-12 00:47:42 +0200
commit96ddbf504a05502800e7cbeb4d08abbcc206c51c (patch)
tree8b33c0a5805fbdccff638a95492106c6430d8c52
parentcris: drivers/cdrom/Kconfig no longer exists (diff)
downloadlinux-96ddbf504a05502800e7cbeb4d08abbcc206c51c.tar.xz
linux-96ddbf504a05502800e7cbeb4d08abbcc206c51c.zip
spidev warning fix
Git rid of "warning: passing arg 2 of `access_ok' makes pointer from integer without a cast" reported on SH ... most architectures use macros in that test, SH uses inlined functions. Signed-off-by: David Brownell <dbrownell@users.sourceforge.net> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
-rw-r--r--drivers/spi/spidev.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/spi/spidev.c b/drivers/spi/spidev.c
index 630f781aeb19..c55459c592b8 100644
--- a/drivers/spi/spidev.c
+++ b/drivers/spi/spidev.c
@@ -183,7 +183,9 @@ static int spidev_message(struct spidev_data *spidev,
if (u_tmp->rx_buf) {
k_tmp->rx_buf = buf;
- if (!access_ok(VERIFY_WRITE, u_tmp->rx_buf, u_tmp->len))
+ if (!access_ok(VERIFY_WRITE, (u8 __user *)
+ (ptrdiff_t) u_tmp->rx_buf,
+ u_tmp->len))
goto done;
}
if (u_tmp->tx_buf) {