Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 105478
b: refs/heads/master
c: 53f1b14
h: refs/heads/master
v: v3
  • Loading branch information
Alan Cox authored and Linus Torvalds committed Jul 24, 2008
1 parent b85dccc commit 6880466
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 8 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 4c228db0b30fa12d65ae7461ce29ed1f4da12c5b
refs/heads/master: 53f1b1433da7eac2607a4a0898a221a4485fd732
17 changes: 10 additions & 7 deletions trunk/drivers/char/rtc.c
Original file line number Diff line number Diff line change
Expand Up @@ -78,9 +78,10 @@
#include <linux/wait.h>
#include <linux/bcd.h>
#include <linux/delay.h>
#include <linux/smp_lock.h>
#include <linux/uaccess.h>

#include <asm/current.h>
#include <asm/uaccess.h>
#include <asm/system.h>

#ifdef CONFIG_X86
Expand Down Expand Up @@ -144,8 +145,7 @@ static DEFINE_TIMER(rtc_irq_timer, rtc_dropped_irq, 0, 0);
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,
unsigned int cmd, unsigned long arg);
static long rtc_ioctl(struct file *file, unsigned int cmd, unsigned long arg);

#ifdef RTC_IRQ
static unsigned int rtc_poll(struct file *file, poll_table *wait);
Expand Down Expand Up @@ -719,10 +719,13 @@ static int rtc_do_ioctl(unsigned int cmd, unsigned long arg, int kernel)
&wtime, sizeof wtime) ? -EFAULT : 0;
}

static int rtc_ioctl(struct inode *inode, struct file *file, unsigned int cmd,
unsigned long arg)
static long rtc_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
{
return rtc_do_ioctl(cmd, arg, 0);
long ret;
lock_kernel();
ret = rtc_do_ioctl(cmd, arg, 0);
unlock_kernel();
return ret;
}

/*
Expand Down Expand Up @@ -915,7 +918,7 @@ static const struct file_operations rtc_fops = {
#ifdef RTC_IRQ
.poll = rtc_poll,
#endif
.ioctl = rtc_ioctl,
.unlocked_ioctl = rtc_ioctl,
.open = rtc_open,
.release = rtc_release,
.fasync = rtc_fasync,
Expand Down

0 comments on commit 6880466

Please sign in to comment.