]> git.karo-electronics.de Git - karo-tx-linux.git/blobdiff - drivers/pci/proc.c
ACPI / PM: Do not refcount power resources that can't be turned on
[karo-tx-linux.git] / drivers / pci / proc.c
index 01f0306525a504a7ed2a9f954f7376e06170c57e..27911b55c2a52295a01bf834cbb9eacb3f9455c3 100644 (file)
@@ -10,7 +10,6 @@
 #include <linux/module.h>
 #include <linux/proc_fs.h>
 #include <linux/seq_file.h>
-#include <linux/smp_lock.h>
 #include <linux/capability.h>
 #include <asm/uaccess.h>
 #include <asm/byteorder.h>
@@ -212,8 +211,6 @@ static long proc_bus_pci_ioctl(struct file *file, unsigned int cmd,
 #endif /* HAVE_PCI_MMAP */
        int ret = 0;
 
-       lock_kernel();
-
        switch (cmd) {
        case PCIIOC_CONTROLLER:
                ret = pci_domain_nr(dev->bus);
@@ -242,7 +239,6 @@ static long proc_bus_pci_ioctl(struct file *file, unsigned int cmd,
                break;
        };
 
-       unlock_kernel();
        return ret;
 }
 
@@ -260,7 +256,7 @@ static int proc_bus_pci_mmap(struct file *file, struct vm_area_struct *vma)
 
        /* Make sure the caller is mapping a real resource for this device */
        for (i = 0; i < PCI_ROM_RESOURCE; i++) {
-               if (pci_mmap_fits(dev, i, vma))
+               if (pci_mmap_fits(dev, i, vma,  PCI_MMAP_PROCFS))
                        break;
        }
 
@@ -306,6 +302,7 @@ static const struct file_operations proc_bus_pci_operations = {
        .read           = proc_bus_pci_read,
        .write          = proc_bus_pci_write,
        .unlocked_ioctl = proc_bus_pci_ioctl,
+       .compat_ioctl   = proc_bus_pci_ioctl,
 #ifdef HAVE_PCI_MMAP
        .open           = proc_bus_pci_open,
        .release        = proc_bus_pci_release,