diff options
author | Christoph Hellwig <hch@lst.de> | 2005-11-07 17:12:34 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2005-11-07 17:12:34 -0500 |
commit | 1928f8e541245eae933f8c95b64b2bc3683f9661 (patch) | |
tree | 6a3d0b88315a7fce739aabe68af320124af67529 /drivers/sbus/char/envctrl.c | |
parent | 16cf0d816541fde06ed8f37c0f5cf9940cdfc145 (diff) |
[SPARC] envctrl: implement ->unlocked_ioctl and ->compat_ioctl
all the ioctls in the driver are 32bit compat clean and don't need BKL,
so we can switch it to ->unlocked_ioctl and ->compat_ioctl trivially.
Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/sbus/char/envctrl.c')
-rw-r--r-- | drivers/sbus/char/envctrl.c | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/drivers/sbus/char/envctrl.c b/drivers/sbus/char/envctrl.c index ba56762b05f6..19e8eddf887a 100644 --- a/drivers/sbus/char/envctrl.c +++ b/drivers/sbus/char/envctrl.c | |||
@@ -654,9 +654,8 @@ envctrl_read(struct file *file, char __user *buf, size_t count, loff_t *ppos) | |||
654 | /* Function Description: Command what to read. Mapped to user ioctl(). | 654 | /* Function Description: Command what to read. Mapped to user ioctl(). |
655 | * Return: Gives 0 for implemented commands, -EINVAL otherwise. | 655 | * Return: Gives 0 for implemented commands, -EINVAL otherwise. |
656 | */ | 656 | */ |
657 | static int | 657 | static long |
658 | envctrl_ioctl(struct inode *inode, struct file *file, | 658 | envctrl_ioctl(struct file *file, unsigned int cmd, unsigned long arg) |
659 | unsigned int cmd, unsigned long arg) | ||
660 | { | 659 | { |
661 | char __user *infobuf; | 660 | char __user *infobuf; |
662 | 661 | ||
@@ -715,11 +714,14 @@ envctrl_release(struct inode *inode, struct file *file) | |||
715 | } | 714 | } |
716 | 715 | ||
717 | static struct file_operations envctrl_fops = { | 716 | static struct file_operations envctrl_fops = { |
718 | .owner = THIS_MODULE, | 717 | .owner = THIS_MODULE, |
719 | .read = envctrl_read, | 718 | .read = envctrl_read, |
720 | .ioctl = envctrl_ioctl, | 719 | .unlocked_ioctl = envctrl_ioctl, |
721 | .open = envctrl_open, | 720 | #ifdef CONFIG_COMPAT |
722 | .release = envctrl_release, | 721 | .compat_ioctl = envctrl_ioctl, |
722 | #endif | ||
723 | .open = envctrl_open, | ||
724 | .release = envctrl_release, | ||
723 | }; | 725 | }; |
724 | 726 | ||
725 | static struct miscdevice envctrl_dev = { | 727 | static struct miscdevice envctrl_dev = { |