Skip to content

Commit

Permalink
ip27-rtc: convert ioctl to unlocked_ioctl
Browse files Browse the repository at this point in the history
Convert ioctl call to unlocked_ioctl form.  It is possible (in that simple
way) due to a spinlock protection.

Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
Acked-by: Jiri Slaby <jirislaby@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
  • Loading branch information
Cyrill Gorcunov authored and Linus Torvalds committed Feb 6, 2008
1 parent 9d8af78 commit 102f4a0
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions drivers/char/ip27-rtc.c
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,8 @@
#include <asm/sn/sn0/hub.h>
#include <asm/sn/sn_private.h>

static int rtc_ioctl(struct inode *inode, struct file *file,
unsigned int cmd, unsigned long arg);
static long rtc_ioctl(struct file *filp, unsigned int cmd,
unsigned long arg);

static int rtc_read_proc(char *page, char **start, off_t off,
int count, int *eof, void *data);
Expand Down Expand Up @@ -75,8 +75,7 @@ static unsigned long epoch = 1970; /* year corresponding to 0x00 */
static const unsigned char days_in_mo[] =
{0, 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31};

static int rtc_ioctl(struct inode *inode, struct file *file, unsigned int cmd,
unsigned long arg)
static long rtc_ioctl(struct file *filp, unsigned int cmd, unsigned long arg)
{

struct rtc_time wtime;
Expand Down Expand Up @@ -197,7 +196,7 @@ static int rtc_release(struct inode *inode, struct file *file)

static const struct file_operations rtc_fops = {
.owner = THIS_MODULE,
.ioctl = rtc_ioctl,
.unlocked_ioctl = rtc_ioctl,
.open = rtc_open,
.release = rtc_release,
};
Expand Down

0 comments on commit 102f4a0

Please sign in to comment.