X-Git-Url: https://git.openpandora.org/cgi-bin/gitweb.cgi?p=pandora-kernel.git;a=blobdiff_plain;f=arch%2Fcris%2Farch-v32%2Fdrivers%2Fmach-fs%2Fgpio.c;h=ee90d2659be76db461cd12043bffe842160420a9;hp=5ec8a7d4e7d78db9b1eca0a5e5461414f2c71bb8;hb=10f2a2b0f68abf39c06cf519cbc1740fa50f900b;hpb=aa9f56b66d278aba2f278c75761b7e19fbaca97a diff --git a/arch/cris/arch-v32/drivers/mach-fs/gpio.c b/arch/cris/arch-v32/drivers/mach-fs/gpio.c index 5ec8a7d4e7d7..ee90d2659be7 100644 --- a/arch/cris/arch-v32/drivers/mach-fs/gpio.c +++ b/arch/cris/arch-v32/drivers/mach-fs/gpio.c @@ -22,7 +22,7 @@ #include #include #include -#include +#include #include #include @@ -64,6 +64,7 @@ static int dp_cnt; #define DP(x) #endif +static DEFINE_MUTEX(gpio_mutex); static char gpio_name[] = "etrax gpio"; #if 0 @@ -429,7 +430,7 @@ gpio_open(struct inode *inode, struct file *filp) if (!priv) return -ENOMEM; - lock_kernel(); + mutex_lock(&gpio_mutex); memset(priv, 0, sizeof(*priv)); priv->minor = p; @@ -450,7 +451,7 @@ gpio_open(struct inode *inode, struct file *filp) alarmlist = priv; spin_unlock_irq(&alarm_lock); - unlock_kernel(); + mutex_unlock(&gpio_mutex); return 0; } @@ -708,9 +709,9 @@ static long gpio_ioctl(struct file *file, unsigned int cmd, unsigned long arg) { long ret; - lock_kernel(); + mutex_lock(&gpio_mutex); ret = gpio_ioctl_unlocked(file, cmd, arg); - unlock_kernel(); + mutex_unlock(&gpio_mutex); return ret; } @@ -870,6 +871,7 @@ static const struct file_operations gpio_fops = { .write = gpio_write, .open = gpio_open, .release = gpio_release, + .llseek = noop_llseek, }; #ifdef CONFIG_ETRAX_VIRTUAL_GPIO