git.openpandora.org
/
pandora-kernel.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge git://git.infradead.org/~dwmw2/mtd-2.6.35
[pandora-kernel.git]
/
drivers
/
char
/
nwflash.c
diff --git
a/drivers/char/nwflash.c
b/drivers/char/nwflash.c
index
f808109
..
043a1c7
100644
(file)
--- a/
drivers/char/nwflash.c
+++ b/
drivers/char/nwflash.c
@@
-94,8
+94,9
@@
static int get_flash_id(void)
return c2;
}
return c2;
}
-static
int flash_ioctl(struct inode *inodep,
struct file *filep, unsigned int cmd, unsigned long arg)
+static
long flash_ioctl(
struct file *filep, unsigned int cmd, unsigned long arg)
{
{
+ lock_kernel();
switch (cmd) {
case CMD_WRITE_DISABLE:
gbWriteBase64Enable = 0;
switch (cmd) {
case CMD_WRITE_DISABLE:
gbWriteBase64Enable = 0;
@@
-113,8
+114,10
@@
static int flash_ioctl(struct inode *inodep, struct file *filep, unsigned int cm
default:
gbWriteBase64Enable = 0;
gbWriteEnable = 0;
default:
gbWriteBase64Enable = 0;
gbWriteEnable = 0;
+ unlock_kernel();
return -EINVAL;
}
return -EINVAL;
}
+ unlock_kernel();
return 0;
}
return 0;
}
@@
-631,7
+634,7
@@
static const struct file_operations flash_fops =
.llseek = flash_llseek,
.read = flash_read,
.write = flash_write,
.llseek = flash_llseek,
.read = flash_read,
.write = flash_write,
- .
ioctl
= flash_ioctl,
+ .
unlocked_ioctl
= flash_ioctl,
};
static struct miscdevice flash_miscdev =
};
static struct miscdevice flash_miscdev =