We wrap the smm calls and other bits with the BKL push down as a
precaution but they can probably go
Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
#include <linux/stat.h>
#include <linux/proc_fs.h>
#include <linux/seq_file.h>
#include <linux/stat.h>
#include <linux/proc_fs.h>
#include <linux/seq_file.h>
+#include <linux/smp_lock.h>
#include <linux/toshiba.h>
#define TOSH_MINOR_DEV 181
#include <linux/toshiba.h>
#define TOSH_MINOR_DEV 181
static int tosh_sci;
static int tosh_fan;
static int tosh_sci;
static int tosh_fan;
-static int tosh_ioctl(struct inode *, struct file *, unsigned int,
+static long tosh_ioctl(struct file *, unsigned int,
unsigned long);
static const struct file_operations tosh_fops = {
.owner = THIS_MODULE,
unsigned long);
static const struct file_operations tosh_fops = {
.owner = THIS_MODULE,
+ .unlocked_ioctl = tosh_ioctl,
};
static struct miscdevice tosh_device = {
};
static struct miscdevice tosh_device = {
-static int tosh_ioctl(struct inode *ip, struct file *fp, unsigned int cmd,
- unsigned long arg)
+static long tosh_ioctl(struct file *fp, unsigned int cmd, unsigned long arg)
{
SMMRegisters regs;
SMMRegisters __user *argp = (SMMRegisters __user *)arg;
{
SMMRegisters regs;
SMMRegisters __user *argp = (SMMRegisters __user *)arg;
return -EINVAL;
/* do we need to emulate the fan ? */
return -EINVAL;
/* do we need to emulate the fan ? */
if (tosh_fan==1) {
if (((ax==0xf300) || (ax==0xf400)) && (bx==0x0004)) {
err = tosh_emulate_fan(®s);
if (tosh_fan==1) {
if (((ax==0xf300) || (ax==0xf400)) && (bx==0x0004)) {
err = tosh_emulate_fan(®s);
break;
}
}
err = tosh_smm(®s);
break;
}
}
err = tosh_smm(®s);
break;
default:
return -EINVAL;
break;
default:
return -EINVAL;