Commit ee3a6366 authored by Ebru Akagunduz's avatar Ebru Akagunduz Committed by Greg Kroah-Hartman

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: default avatarEbru Akagunduz <ebru.akagunduz@gmail.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 04ad3a64
...@@ -74,7 +74,7 @@ static void usb_tx_callback(struct urb *urb); ...@@ -74,7 +74,7 @@ static void usb_tx_callback(struct urb *urb);
static int vfd_open(struct inode *inode, struct file *file); static int vfd_open(struct inode *inode, struct file *file);
static long vfd_ioctl(struct file *file, unsigned cmd, unsigned long arg); static long vfd_ioctl(struct file *file, unsigned cmd, unsigned long arg);
static int vfd_close(struct inode *inode, struct file *file); 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); size_t n_bytes, loff_t *pos);
/* LIRC driver function prototypes */ /* LIRC driver function prototypes */
...@@ -120,7 +120,7 @@ struct sasem_context { ...@@ -120,7 +120,7 @@ struct sasem_context {
static const struct file_operations vfd_fops = { static const struct file_operations vfd_fops = {
.owner = THIS_MODULE, .owner = THIS_MODULE,
.open = &vfd_open, .open = &vfd_open,
.write = &vfd_write, .write = vfd_write,
.unlocked_ioctl = &vfd_ioctl, .unlocked_ioctl = &vfd_ioctl,
.release = &vfd_close, .release = &vfd_close,
.llseek = noop_llseek, .llseek = noop_llseek,
...@@ -360,7 +360,7 @@ static int send_packet(struct sasem_context *context) ...@@ -360,7 +360,7 @@ static int send_packet(struct sasem_context *context)
* and requires data in 9 consecutive USB interrupt packets, * and requires data in 9 consecutive USB interrupt packets,
* each packet carrying 8 bytes. * 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) size_t n_bytes, loff_t *pos)
{ {
int i; int i;
...@@ -389,7 +389,7 @@ static ssize_t vfd_write(struct file *file, const char *buf, ...@@ -389,7 +389,7 @@ static ssize_t vfd_write(struct file *file, const char *buf,
goto exit; goto exit;
} }
data_buf = memdup_user(buf, n_bytes); data_buf = memdup_user((void const __user *)buf, n_bytes);
if (IS_ERR(data_buf)) { if (IS_ERR(data_buf)) {
retval = PTR_ERR(data_buf); retval = PTR_ERR(data_buf);
goto exit; goto exit;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment