Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 178736
b: refs/heads/master
c: 3e8d95d
h: refs/heads/master
v: v3
  • Loading branch information
Alan Cox authored and Linus Torvalds committed Jan 4, 2010
1 parent 58620f7 commit bc69abf
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 5d9d6e44ce15d072d22c10fe670679c77fa2b31d
refs/heads/master: 3e8d95d95eaf4b332f6e1862ffbaa80c24780767
12 changes: 7 additions & 5 deletions trunk/drivers/char/toshiba.c
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@
#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
Expand All @@ -88,13 +88,13 @@ static int tosh_date;
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,
.ioctl = tosh_ioctl,
.unlocked_ioctl = tosh_ioctl,
};

static struct miscdevice tosh_device = {
Expand Down Expand Up @@ -252,8 +252,7 @@ int tosh_smm(SMMRegisters *regs)
EXPORT_SYMBOL(tosh_smm);


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;
Expand All @@ -275,13 +274,16 @@ static int tosh_ioctl(struct inode *ip, struct file *fp, unsigned int cmd,
return -EINVAL;

/* do we need to emulate the fan ? */
lock_kernel();
if (tosh_fan==1) {
if (((ax==0xf300) || (ax==0xf400)) && (bx==0x0004)) {
err = tosh_emulate_fan(&regs);
unlock_kernel();
break;
}
}
err = tosh_smm(&regs);
unlock_kernel();
break;
default:
return -EINVAL;
Expand Down

0 comments on commit bc69abf

Please sign in to comment.