[PATCH 2/2] nvram: Convert nvram_ioctl to unlocked_ioctl

From: John Kacur
Date: Wed Oct 21 2009 - 15:57:19 EST


After removing the BKL from open, we can also convert nvram_ioctl to
an unlocked_ioctl. It has it's own spin_lock, and doesn't rely on the BKL

Signed-off-by: John Kacur <jkacur@xxxxxxxxxx>
---
drivers/char/nvram.c | 17 ++++++++---------
1 files changed, 8 insertions(+), 9 deletions(-)

diff --git a/drivers/char/nvram.c b/drivers/char/nvram.c
index 740e356..724b9fe 100644
--- a/drivers/char/nvram.c
+++ b/drivers/char/nvram.c
@@ -292,8 +292,7 @@ checksum_err:
return -EIO;
}

-static int nvram_ioctl(struct inode *inode, struct file *file,
- unsigned int cmd, unsigned long arg)
+static long nvram_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
{
int i;

@@ -414,13 +413,13 @@ static int nvram_add_proc_fs(void)
#endif /* CONFIG_PROC_FS */

static const struct file_operations nvram_fops = {
- .owner = THIS_MODULE,
- .llseek = nvram_llseek,
- .read = nvram_read,
- .write = nvram_write,
- .ioctl = nvram_ioctl,
- .open = nvram_open,
- .release = nvram_release,
+ .owner = THIS_MODULE,
+ .llseek = nvram_llseek,
+ .read = nvram_read,
+ .write = nvram_write,
+ .unlocked_ioctl = nvram_ioctl,
+ .open = nvram_open,
+ .release = nvram_release,
};

static struct miscdevice nvram_dev = {
--
1.6.5.2


--8323328-785366160-1260399214=:5146--
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/