diff options
author | Linus Torvalds <torvalds@ppc970.osdl.org> | 2004-08-08 00:22:10 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@ppc970.osdl.org> | 2004-08-08 00:22:10 -0700 |
commit | c25c7712973989edf825566e5786448d1a3c2e57 (patch) | |
tree | a3f77c56d47c41e56203ef3eb9d3efd779edf19f /arch | |
parent | dc5c72458480bb0b5e8abfa9a2968a9603c74dcf (diff) | |
download | history-c25c7712973989edf825566e5786448d1a3c2e57.tar.gz |
ppc64: add user annotations to rtc driver
Diffstat (limited to 'arch')
-rw-r--r-- | arch/ppc64/kernel/rtc.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/arch/ppc64/kernel/rtc.c b/arch/ppc64/kernel/rtc.c index 28ac6c7ae78261..7bf41f3cab904b 100644 --- a/arch/ppc64/kernel/rtc.c +++ b/arch/ppc64/kernel/rtc.c @@ -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) |