aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/char
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2010-05-19 20:23:28 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2010-05-19 20:23:28 -0400
commit98c89cdd3a292af3451e47a2a33132f5183861b0 (patch)
treecfad77bcfd2d04fb0b9326a859803a1ab90b0757 /drivers/char
parent164d44fd92e79d5bce54d0d62df9f856f7b23925 (diff)
parent99df95a22f7cfcf85405d4edc07c2d953542f0dd (diff)
Merge branch 'bkl/procfs' of git://git.kernel.org/pub/scm/linux/kernel/git/frederic/random-tracing
* 'bkl/procfs' of git://git.kernel.org/pub/scm/linux/kernel/git/frederic/random-tracing: sunrpc: Include missing smp_lock.h procfs: Kill the bkl in ioctl procfs: Push down the bkl from ioctl procfs: Use generic_file_llseek in /proc/vmcore procfs: Use generic_file_llseek in /proc/kmsg procfs: Use generic_file_llseek in /proc/kcore procfs: Kill BKL in llseek on proc base
Diffstat (limited to 'drivers/char')
-rw-r--r--drivers/char/i8k.c21
1 files changed, 16 insertions, 5 deletions
diff --git a/drivers/char/i8k.c b/drivers/char/i8k.c
index fc8cf7ac7f2b..4cd8b227c11f 100644
--- a/drivers/char/i8k.c
+++ b/drivers/char/i8k.c
@@ -23,6 +23,7 @@
23#include <linux/seq_file.h> 23#include <linux/seq_file.h>
24#include <linux/dmi.h> 24#include <linux/dmi.h>
25#include <linux/capability.h> 25#include <linux/capability.h>
26#include <linux/smp_lock.h>
26#include <asm/uaccess.h> 27#include <asm/uaccess.h>
27#include <asm/io.h> 28#include <asm/io.h>
28 29
@@ -82,8 +83,7 @@ module_param(fan_mult, int, 0);
82MODULE_PARM_DESC(fan_mult, "Factor to multiply fan speed with"); 83MODULE_PARM_DESC(fan_mult, "Factor to multiply fan speed with");
83 84
84static int i8k_open_fs(struct inode *inode, struct file *file); 85static int i8k_open_fs(struct inode *inode, struct file *file);
85static int i8k_ioctl(struct inode *, struct file *, unsigned int, 86static long i8k_ioctl(struct file *, unsigned int, unsigned long);
86 unsigned long);
87 87
88static const struct file_operations i8k_fops = { 88static const struct file_operations i8k_fops = {
89 .owner = THIS_MODULE, 89 .owner = THIS_MODULE,
@@ -91,7 +91,7 @@ static const struct file_operations i8k_fops = {
91 .read = seq_read, 91 .read = seq_read,
92 .llseek = seq_lseek, 92 .llseek = seq_lseek,
93 .release = single_release, 93 .release = single_release,
94 .ioctl = i8k_ioctl, 94 .unlocked_ioctl = i8k_ioctl,
95}; 95};
96 96
97struct smm_regs { 97struct smm_regs {
@@ -307,8 +307,8 @@ static int i8k_get_dell_signature(int req_fn)
307 return regs.eax == 1145651527 && regs.edx == 1145392204 ? 0 : -1; 307 return regs.eax == 1145651527 && regs.edx == 1145392204 ? 0 : -1;
308} 308}
309 309
310static int i8k_ioctl(struct inode *ip, struct file *fp, unsigned int cmd, 310static int
311 unsigned long arg) 311i8k_ioctl_unlocked(struct file *fp, unsigned int cmd, unsigned long arg)
312{ 312{
313 int val = 0; 313 int val = 0;
314 int speed; 314 int speed;
@@ -395,6 +395,17 @@ static int i8k_ioctl(struct inode *ip, struct file *fp, unsigned int cmd,
395 return 0; 395 return 0;
396} 396}
397 397
398static long i8k_ioctl(struct file *fp, unsigned int cmd, unsigned long arg)
399{
400 long ret;
401
402 lock_kernel();
403 ret = i8k_ioctl_unlocked(fp, cmd, arg);
404 unlock_kernel();
405
406 return ret;
407}
408
398/* 409/*
399 * Print the information for /proc/i8k. 410 * Print the information for /proc/i8k.
400 */ 411 */