Skip to content

Commit

Permalink
[media] lirc_dev: add some __user annotations
Browse files Browse the repository at this point in the history
Sparse complains because there are no __user annotations.

drivers/media/rc/lirc_dev.c:156:27: warning:
	incorrect type in initializer (incompatible argument 2 (different address spaces))
drivers/media/rc/lirc_dev.c:156:27:    expected int ( *read )( ... )
drivers/media/rc/lirc_dev.c:156:27:    got int ( extern [toplevel] *<noident> )( ... )

Signed-off-by: Dan Carpenter <error27@gmail.com>
Acked-by: Jarod Wilson <jarod@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
  • Loading branch information
Dan Carpenter authored and Mauro Carvalho Chehab committed Dec 29, 2010
1 parent 829ba9f commit 0e83508
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions drivers/media/rc/lirc_dev.c
Original file line number Diff line number Diff line change
Expand Up @@ -627,7 +627,7 @@ long lirc_dev_fop_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
EXPORT_SYMBOL(lirc_dev_fop_ioctl);

ssize_t lirc_dev_fop_read(struct file *file,
char *buffer,
char __user *buffer,
size_t length,
loff_t *ppos)
{
Expand Down Expand Up @@ -747,7 +747,7 @@ void *lirc_get_pdata(struct file *file)
EXPORT_SYMBOL(lirc_get_pdata);


ssize_t lirc_dev_fop_write(struct file *file, const char *buffer,
ssize_t lirc_dev_fop_write(struct file *file, const char __user *buffer,
size_t length, loff_t *ppos)
{
struct irctl *ir = irctls[iminor(file->f_dentry->d_inode)];
Expand Down
6 changes: 3 additions & 3 deletions include/media/lirc_dev.h
Original file line number Diff line number Diff line change
Expand Up @@ -217,9 +217,9 @@ int lirc_dev_fop_open(struct inode *inode, struct file *file);
int lirc_dev_fop_close(struct inode *inode, struct file *file);
unsigned int lirc_dev_fop_poll(struct file *file, poll_table *wait);
long lirc_dev_fop_ioctl(struct file *file, unsigned int cmd, unsigned long arg);
ssize_t lirc_dev_fop_read(struct file *file, char *buffer, size_t length,
ssize_t lirc_dev_fop_read(struct file *file, char __user *buffer, size_t length,
loff_t *ppos);
ssize_t lirc_dev_fop_write(struct file *file, const char *buffer, size_t length,
loff_t *ppos);
ssize_t lirc_dev_fop_write(struct file *file, const char __user *buffer,
size_t length, loff_t *ppos);

#endif

0 comments on commit 0e83508

Please sign in to comment.