diff options
author | Ebru Akagunduz <ebru.akagunduz@gmail.com> | 2014-03-05 19:15:30 +0200 |
---|---|---|
committer | Chanho Park <chanho61.park@samsung.com> | 2014-11-18 11:54:52 +0900 |
commit | 0ff1e13d5670fbd0d6e019e7053594830ea1c613 (patch) | |
tree | c1e88182839e7494979c12f8600021f8e3c840df /drivers/staging | |
parent | 89298c782b8214d18016d82da9170f2b1c864977 (diff) | |
download | linux-3.10-0ff1e13d5670fbd0d6e019e7053594830ea1c613.tar.gz linux-3.10-0ff1e13d5670fbd0d6e019e7053594830ea1c613.tar.bz2 linux-3.10-0ff1e13d5670fbd0d6e019e7053594830ea1c613.zip |
upstream: Staging:media: Fix Sparse warnings incorrect type in lirc_sasem.c
This patch fixes following sparse warning in dgap.c
drivers/staging/media/lirc/lirc_sasem.c:392:32: warning: incorrect type in argument 1 (different address spaces)
drivers/staging/media/lirc/lirc_sasem.c:392:32: expected void const [noderef] <asn:1>*<noident>
drivers/staging/media/lirc/lirc_sasem.c:392:32: got char const *buf
drivers/staging/media/lirc/lirc_sasem.c:123:28: warning: incorrect type in initializer (incompatible argument 2 (different address spaces))
drivers/staging/media/lirc/lirc_sasem.c:123:28: expected int ( *write )( ... )
drivers/staging/media/lirc/lirc_sasem.c:123:28: got int ( static [toplevel] *<noident> )( ... )
Signed-off-by: Ebru Akagunduz <ebru.akagunduz@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging')
-rw-r--r-- | drivers/staging/media/lirc/lirc_sasem.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/staging/media/lirc/lirc_sasem.c b/drivers/staging/media/lirc/lirc_sasem.c index 68acca74ddb..ff88055995f 100644 --- a/drivers/staging/media/lirc/lirc_sasem.c +++ b/drivers/staging/media/lirc/lirc_sasem.c @@ -75,7 +75,7 @@ static void usb_tx_callback(struct urb *urb); static int vfd_open(struct inode *inode, struct file *file); static long vfd_ioctl(struct file *file, unsigned cmd, unsigned long arg); static int vfd_close(struct inode *inode, struct file *file); -static ssize_t vfd_write(struct file *file, const char *buf, +static ssize_t vfd_write(struct file *file, const char __user *buf, size_t n_bytes, loff_t *pos); /* LIRC driver function prototypes */ @@ -121,7 +121,7 @@ struct sasem_context { static const struct file_operations vfd_fops = { .owner = THIS_MODULE, .open = &vfd_open, - .write = &vfd_write, + .write = vfd_write, .unlocked_ioctl = &vfd_ioctl, .release = &vfd_close, .llseek = noop_llseek, @@ -361,7 +361,7 @@ static int send_packet(struct sasem_context *context) * and requires data in 9 consecutive USB interrupt packets, * each packet carrying 8 bytes. */ -static ssize_t vfd_write(struct file *file, const char *buf, +static ssize_t vfd_write(struct file *file, const char __user *buf, size_t n_bytes, loff_t *pos) { int i; @@ -390,7 +390,7 @@ static ssize_t vfd_write(struct file *file, const char *buf, goto exit; } - data_buf = memdup_user(buf, n_bytes); + data_buf = memdup_user((void const __user *)buf, n_bytes); if (IS_ERR(data_buf)) { retval = PTR_ERR(data_buf); goto exit; |