diff options
author | Takashi Iwai <tiwai@suse.de> | 2010-08-18 15:17:30 +0200 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2010-08-18 15:17:30 +0200 |
commit | 6ab561c8aab2e4af535f09adbc6253f958536848 (patch) | |
tree | 37846adb4ea106485720d113e252d71d615c23ed /arch/cris/arch-v32/drivers/mach-a3/gpio.c | |
parent | 4f4e8f69895c8696a4bcc751817d4b186023ac44 (diff) | |
parent | cbaa9f60d5d5c3af10f94e0d49789d5b82341a4a (diff) |
Merge branch 'topic/isa' into topic/misc
Diffstat (limited to 'arch/cris/arch-v32/drivers/mach-a3/gpio.c')
-rw-r--r-- | arch/cris/arch-v32/drivers/mach-a3/gpio.c | 28 |
1 files changed, 19 insertions, 9 deletions
diff --git a/arch/cris/arch-v32/drivers/mach-a3/gpio.c b/arch/cris/arch-v32/drivers/mach-a3/gpio.c index 97357cfd17b..2dcd27adbad 100644 --- a/arch/cris/arch-v32/drivers/mach-a3/gpio.c +++ b/arch/cris/arch-v32/drivers/mach-a3/gpio.c @@ -72,8 +72,7 @@ static char gpio_name[] = "etrax gpio"; static int virtual_gpio_ioctl(struct file *file, unsigned int cmd, unsigned long arg); #endif -static int gpio_ioctl(struct inode *inode, struct file *file, - unsigned int cmd, unsigned long arg); +static long gpio_ioctl(struct file *file, unsigned int cmd, unsigned long arg); static ssize_t gpio_write(struct file *file, const char __user *buf, size_t count, loff_t *off); static int gpio_open(struct inode *inode, struct file *filp); @@ -521,7 +520,7 @@ static inline unsigned long setget_output(struct gpio_private *priv, return dir_shadow; } /* setget_output */ -static int gpio_ioctl(struct inode *inode, struct file *file, +static long gpio_ioctl_unlocked(struct file *file, unsigned int cmd, unsigned long arg) { unsigned long flags; @@ -664,6 +663,17 @@ static int gpio_ioctl(struct inode *inode, struct file *file, return 0; } +static long gpio_ioctl(struct file *file, unsigned int cmd, unsigned long arg) +{ + long ret; + + lock_kernel(); + ret = gpio_ioctl_unlocked(file, cmd, arg); + unlock_kernel(); + + return ret; +} + #ifdef CONFIG_ETRAX_VIRTUAL_GPIO static int virtual_gpio_ioctl(struct file *file, unsigned int cmd, unsigned long arg) @@ -877,12 +887,12 @@ static int gpio_pwm_ioctl(struct gpio_private *priv, unsigned int cmd, } static const struct file_operations gpio_fops = { - .owner = THIS_MODULE, - .poll = gpio_poll, - .ioctl = gpio_ioctl, - .write = gpio_write, - .open = gpio_open, - .release = gpio_release, + .owner = THIS_MODULE, + .poll = gpio_poll, + .unlocked_ioctl = gpio_ioctl, + .write = gpio_write, + .open = gpio_open, + .release = gpio_release, }; #ifdef CONFIG_ETRAX_VIRTUAL_GPIO |