提交 c46f0a2d 编写于 作者: H Hannes Eder 提交者: David S. Miller

mISDN: timerdev: use __user for mISDN_read's buffer argument

Fix this warning:

  drivers/isdn/mISDN/timerdev.c:264:11: warning: incorrect type in initializer (incompatible argument 2 (different address spaces))
  drivers/isdn/mISDN/timerdev.c:264:11:    expected int ( *read )( ... )
  drivers/isdn/mISDN/timerdev.c:264:11:    got int ( static [toplevel] *<noident> )( ... )
Signed-off-by: NHannes Eder <hannes@hanneseder.net>
Acked-by: NKarsten Keil <kkeil@suse.de>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 047ce8f2
......@@ -86,7 +86,7 @@ mISDN_close(struct inode *ino, struct file *filep)
}
static ssize_t
mISDN_read(struct file *filep, char *buf, size_t count, loff_t *off)
mISDN_read(struct file *filep, char __user *buf, size_t count, loff_t *off)
{
struct mISDNtimerdev *dev = filep->private_data;
struct mISDNtimer *timer;
......@@ -116,7 +116,7 @@ mISDN_read(struct file *filep, char *buf, size_t count, loff_t *off)
timer = (struct mISDNtimer *)dev->expired.next;
list_del(&timer->list);
spin_unlock_irqrestore(&dev->lock, flags);
if (put_user(timer->id, (int *)buf))
if (put_user(timer->id, (int __user *)buf))
ret = -EFAULT;
else
ret = sizeof(int);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册