]> git.karo-electronics.de Git - mv-sheeva.git/blobdiff - drivers/pci/proc.c
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/x86/linux...
[mv-sheeva.git] / drivers / pci / proc.c
index 2bf159b9c1cdc149d215c5d1a68743db1f47ce1c..ef18fcd641e2c478927e5e6f29505d31380b75ae 100644 (file)
@@ -375,7 +375,7 @@ static int show_device(struct seq_file *m, void *v)
        return 0;
 }
 
-static struct seq_operations proc_bus_pci_devices_op = {
+static const struct seq_operations proc_bus_pci_devices_op = {
        .start  = pci_seq_start,
        .next   = pci_seq_next,
        .stop   = pci_seq_stop,
@@ -422,7 +422,7 @@ int pci_proc_detach_device(struct pci_dev *dev)
        struct proc_dir_entry *e;
 
        if ((e = dev->procent)) {
-               if (atomic_read(&e->count))
+               if (atomic_read(&e->count) > 1)
                        return -EBUSY;
                remove_proc_entry(e->name, dev->bus->procdir);
                dev->procent = NULL;