Skip to content

Commit

Permalink
powerpc: Use unlocked ioctl in nvram_64
Browse files Browse the repository at this point in the history
The ioctl is only used for powermac systems and reads a partition
number from an array which is initialized at boot time way before the
nvram code is initialized. So it's safe to switch to unlocked_ioctl.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: linuxppc-dev@ozlabs.org
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
  • Loading branch information
Thomas Gleixner authored and Benjamin Herrenschmidt committed Nov 24, 2009
1 parent 17e3767 commit 3b03fec
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions arch/powerpc/kernel/nvram_64.c
Original file line number Diff line number Diff line change
Expand Up @@ -139,8 +139,8 @@ static ssize_t dev_nvram_write(struct file *file, const char __user *buf,

}

static int dev_nvram_ioctl(struct inode *inode, struct file *file,
unsigned int cmd, unsigned long arg)
static long dev_nvram_ioctl(struct file *file, unsigned int cmd,
unsigned long arg)
{
switch(cmd) {
#ifdef CONFIG_PPC_PMAC
Expand Down Expand Up @@ -169,11 +169,11 @@ static int dev_nvram_ioctl(struct inode *inode, struct file *file,
}

const struct file_operations nvram_fops = {
.owner = THIS_MODULE,
.llseek = dev_nvram_llseek,
.read = dev_nvram_read,
.write = dev_nvram_write,
.ioctl = dev_nvram_ioctl,
.owner = THIS_MODULE,
.llseek = dev_nvram_llseek,
.read = dev_nvram_read,
.write = dev_nvram_write,
.unlocked_ioctl = dev_nvram_ioctl,
};

static struct miscdevice nvram_dev = {
Expand Down

0 comments on commit 3b03fec

Please sign in to comment.