Skip to content

Commit

Permalink
mISDN: timerdev: use __user for mISDN_read's buffer argument
Browse files Browse the repository at this point in the history
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: Hannes Eder <hannes@hanneseder.net>
Acked-by: Karsten Keil <kkeil@suse.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Hannes Eder authored and David S. Miller committed Dec 13, 2008
1 parent 047ce8f commit c46f0a2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/isdn/mISDN/timerdev.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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);
Expand Down

0 comments on commit c46f0a2

Please sign in to comment.