aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/pnp/isapnp
diff options
context:
space:
mode:
authorGlenn Elliott <gelliott@cs.unc.edu>2012-03-04 19:47:13 -0500
committerGlenn Elliott <gelliott@cs.unc.edu>2012-03-04 19:47:13 -0500
commitc71c03bda1e86c9d5198c5d83f712e695c4f2a1e (patch)
treeecb166cb3e2b7e2adb3b5e292245fefd23381ac8 /drivers/pnp/isapnp
parentea53c912f8a86a8567697115b6a0d8152beee5c8 (diff)
parent6a00f206debf8a5c8899055726ad127dbeeed098 (diff)
Merge branch 'mpi-master' into wip-k-fmlpwip-k-fmlp
Conflicts: litmus/sched_cedf.c
Diffstat (limited to 'drivers/pnp/isapnp')
-rw-r--r--drivers/pnp/isapnp/Makefile6
-rw-r--r--drivers/pnp/isapnp/proc.c16
2 files changed, 11 insertions, 11 deletions
diff --git a/drivers/pnp/isapnp/Makefile b/drivers/pnp/isapnp/Makefile
index cac18bbfb817..6e607aa33aa3 100644
--- a/drivers/pnp/isapnp/Makefile
+++ b/drivers/pnp/isapnp/Makefile
@@ -1,7 +1,7 @@
1# 1#
2# Makefile for the kernel ISAPNP driver. 2# Makefile for the kernel ISAPNP driver.
3# 3#
4obj-y += pnp.o
5pnp-y := core.o compat.o
4 6
5isapnp-proc-$(CONFIG_PROC_FS) = proc.o 7pnp-$(CONFIG_PROC_FS) += proc.o
6
7obj-y := core.o compat.o $(isapnp-proc-y)
diff --git a/drivers/pnp/isapnp/proc.c b/drivers/pnp/isapnp/proc.c
index 3f94edab25fa..315b3112aca8 100644
--- a/drivers/pnp/isapnp/proc.c
+++ b/drivers/pnp/isapnp/proc.c
@@ -21,7 +21,6 @@
21#include <linux/isapnp.h> 21#include <linux/isapnp.h>
22#include <linux/proc_fs.h> 22#include <linux/proc_fs.h>
23#include <linux/init.h> 23#include <linux/init.h>
24#include <linux/smp_lock.h>
25#include <asm/uaccess.h> 24#include <asm/uaccess.h>
26 25
27extern struct pnp_protocol isapnp_protocol; 26extern struct pnp_protocol isapnp_protocol;
@@ -31,8 +30,9 @@ static struct proc_dir_entry *isapnp_proc_bus_dir = NULL;
31static loff_t isapnp_proc_bus_lseek(struct file *file, loff_t off, int whence) 30static loff_t isapnp_proc_bus_lseek(struct file *file, loff_t off, int whence)
32{ 31{
33 loff_t new = -1; 32 loff_t new = -1;
33 struct inode *inode = file->f_path.dentry->d_inode;
34 34
35 lock_kernel(); 35 mutex_lock(&inode->i_mutex);
36 switch (whence) { 36 switch (whence) {
37 case 0: 37 case 0:
38 new = off; 38 new = off;
@@ -44,12 +44,12 @@ static loff_t isapnp_proc_bus_lseek(struct file *file, loff_t off, int whence)
44 new = 256 + off; 44 new = 256 + off;
45 break; 45 break;
46 } 46 }
47 if (new < 0 || new > 256) { 47 if (new < 0 || new > 256)
48 unlock_kernel(); 48 new = -EINVAL;
49 return -EINVAL; 49 else
50 } 50 file->f_pos = new;
51 unlock_kernel(); 51 mutex_unlock(&inode->i_mutex);
52 return (file->f_pos = new); 52 return new;
53} 53}
54 54
55static ssize_t isapnp_proc_bus_read(struct file *file, char __user * buf, 55static ssize_t isapnp_proc_bus_read(struct file *file, char __user * buf,