Commit c25c7712 authored by Linus Torvalds's avatar Linus Torvalds

ppc64: add user annotations to rtc driver

parent dc5c7245
......@@ -56,7 +56,7 @@ extern int piranha_simulator;
* ioctls.
*/
static ssize_t rtc_read(struct file *file, char *buf,
static ssize_t rtc_read(struct file *file, char __user *buf,
size_t count, loff_t *ppos);
static int rtc_ioctl(struct inode *inode, struct file *file,
......@@ -79,7 +79,7 @@ static const unsigned char days_in_mo[] =
* Now all the various file operations that we export.
*/
static ssize_t rtc_read(struct file *file, char *buf,
static ssize_t rtc_read(struct file *file, char __user *buf,
size_t count, loff_t *ppos)
{
return -EIO;
......@@ -106,7 +106,7 @@ static int rtc_ioctl(struct inode *inode, struct file *file, unsigned int cmd,
if (!capable(CAP_SYS_TIME))
return -EACCES;
if (copy_from_user(&rtc_tm, (struct rtc_time*)arg,
if (copy_from_user(&rtc_tm, (struct rtc_time __user *)arg,
sizeof(struct rtc_time)))
return -EFAULT;
......@@ -140,7 +140,7 @@ static int rtc_ioctl(struct inode *inode, struct file *file, unsigned int cmd,
}
case RTC_EPOCH_READ: /* Read the epoch. */
{
return put_user (epoch, (unsigned long *)arg);
return put_user (epoch, (unsigned long __user *)arg);
}
case RTC_EPOCH_SET: /* Set the epoch. */
{
......@@ -159,7 +159,7 @@ static int rtc_ioctl(struct inode *inode, struct file *file, unsigned int cmd,
default:
return -EINVAL;
}
return copy_to_user((void *)arg, &wtime, sizeof wtime) ? -EFAULT : 0;
return copy_to_user((void __user *)arg, &wtime, sizeof wtime) ? -EFAULT : 0;
}
static int rtc_open(struct inode *inode, struct file *file)
......
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