Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 13636
b: refs/heads/master
c: 8ca2bdc
h: refs/heads/master
v: v3
  • Loading branch information
Christoph Hellwig authored and David S. Miller committed Nov 9, 2005
1 parent 77c398d commit 50431c5
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 3 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: feee207e44d3643d19e648af3c88946bd1c5106b
refs/heads/master: 8ca2bdc7a98b9584ac5f640761501405154171c7
2 changes: 0 additions & 2 deletions trunk/arch/sparc64/kernel/ioctl32.c
Original file line number Diff line number Diff line change
Expand Up @@ -114,8 +114,6 @@ COMPATIBLE_IOCTL(FBIOGCURPOS)
COMPATIBLE_IOCTL(FBIOGCURMAX)
/* Little k */
/* Little v, the video4linux ioctls */
COMPATIBLE_IOCTL(_IOR('p', 20, int[7])) /* RTCGET */
COMPATIBLE_IOCTL(_IOW('p', 21, int[7])) /* RTCSET */
/* And these ioctls need translation */
/* Note SIOCRTMSG is no longer, so this is safe and * the user would have seen just an -EINVAL anyways. */
HANDLE_IOCTL(FBIOPUTCMAP32, fbiogetputcmap)
Expand Down
22 changes: 22 additions & 0 deletions trunk/drivers/sbus/char/rtc.c
Original file line number Diff line number Diff line change
Expand Up @@ -210,6 +210,27 @@ static int rtc_ioctl(struct inode *inode, struct file *file, unsigned int cmd,
}
}

static long rtc_compat_ioctl(struct file *file, unsigned int cmd,
unsigned long arg)
{
int rval = -ENOIOCTLCMD;

switch (cmd) {
/*
* These two are specific to this driver, the generic rtc ioctls
* are hanlded elsewhere.
*/
case RTCGET:
case RTCSET:
lock_kernel();
rval = rtc_ioctl(file->f_dentry->d_inode, file, cmd, arg);
unlock_kernel();
break;
}

return rval;
}

static int rtc_open(struct inode *inode, struct file *file)
{
int ret;
Expand Down Expand Up @@ -237,6 +258,7 @@ static struct file_operations rtc_fops = {
.owner = THIS_MODULE,
.llseek = no_llseek,
.ioctl = rtc_ioctl,
.compat_ioctl = rtc_compat_ioctl,
.open = rtc_open,
.release = rtc_release,
};
Expand Down

0 comments on commit 50431c5

Please sign in to comment.