aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/pci/proc.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/pci/proc.c')
-rw-r--r--drivers/pci/proc.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/drivers/pci/proc.c b/drivers/pci/proc.c
index 01f0306525a5..27911b55c2a5 100644
--- a/drivers/pci/proc.c
+++ b/drivers/pci/proc.c
@@ -10,7 +10,6 @@
10#include <linux/module.h> 10#include <linux/module.h>
11#include <linux/proc_fs.h> 11#include <linux/proc_fs.h>
12#include <linux/seq_file.h> 12#include <linux/seq_file.h>
13#include <linux/smp_lock.h>
14#include <linux/capability.h> 13#include <linux/capability.h>
15#include <asm/uaccess.h> 14#include <asm/uaccess.h>
16#include <asm/byteorder.h> 15#include <asm/byteorder.h>
@@ -212,8 +211,6 @@ static long proc_bus_pci_ioctl(struct file *file, unsigned int cmd,
212#endif /* HAVE_PCI_MMAP */ 211#endif /* HAVE_PCI_MMAP */
213 int ret = 0; 212 int ret = 0;
214 213
215 lock_kernel();
216
217 switch (cmd) { 214 switch (cmd) {
218 case PCIIOC_CONTROLLER: 215 case PCIIOC_CONTROLLER:
219 ret = pci_domain_nr(dev->bus); 216 ret = pci_domain_nr(dev->bus);
@@ -242,7 +239,6 @@ static long proc_bus_pci_ioctl(struct file *file, unsigned int cmd,
242 break; 239 break;
243 }; 240 };
244 241
245 unlock_kernel();
246 return ret; 242 return ret;
247} 243}
248 244
@@ -260,7 +256,7 @@ static int proc_bus_pci_mmap(struct file *file, struct vm_area_struct *vma)
260 256
261 /* Make sure the caller is mapping a real resource for this device */ 257 /* Make sure the caller is mapping a real resource for this device */
262 for (i = 0; i < PCI_ROM_RESOURCE; i++) { 258 for (i = 0; i < PCI_ROM_RESOURCE; i++) {
263 if (pci_mmap_fits(dev, i, vma)) 259 if (pci_mmap_fits(dev, i, vma, PCI_MMAP_PROCFS))
264 break; 260 break;
265 } 261 }
266 262
@@ -306,6 +302,7 @@ static const struct file_operations proc_bus_pci_operations = {
306 .read = proc_bus_pci_read, 302 .read = proc_bus_pci_read,
307 .write = proc_bus_pci_write, 303 .write = proc_bus_pci_write,
308 .unlocked_ioctl = proc_bus_pci_ioctl, 304 .unlocked_ioctl = proc_bus_pci_ioctl,
305 .compat_ioctl = proc_bus_pci_ioctl,
309#ifdef HAVE_PCI_MMAP 306#ifdef HAVE_PCI_MMAP
310 .open = proc_bus_pci_open, 307 .open = proc_bus_pci_open,
311 .release = proc_bus_pci_release, 308 .release = proc_bus_pci_release,