]> git.karo-electronics.de Git - karo-tx-linux.git/blobdiff - drivers/pci/slot.c
Merge branch 'for-linus' of git://git.kernel.dk/linux-block
[karo-tx-linux.git] / drivers / pci / slot.c
index 448ca562d1f8cd368385a0d1bd53f26a3c1171c4..396c200b9ddb3b6d534e571f1827819e221c65e8 100644 (file)
@@ -116,11 +116,11 @@ static void pci_slot_release(struct kobject *kobj)
 }
 
 static struct pci_slot_attribute pci_slot_attr_address =
-       __ATTR(address, (S_IFREG | S_IRUGO), address_read_file, NULL);
+       __ATTR(address, S_IRUGO, address_read_file, NULL);
 static struct pci_slot_attribute pci_slot_attr_max_speed =
-       __ATTR(max_bus_speed, (S_IFREG | S_IRUGO), max_speed_read_file, NULL);
+       __ATTR(max_bus_speed, S_IRUGO, max_speed_read_file, NULL);
 static struct pci_slot_attribute pci_slot_attr_cur_speed =
-       __ATTR(cur_bus_speed, (S_IFREG | S_IRUGO), cur_speed_read_file, NULL);
+       __ATTR(cur_bus_speed, S_IRUGO, cur_speed_read_file, NULL);
 
 static struct attribute *pci_slot_default_attrs[] = {
        &pci_slot_attr_address.attr,
@@ -319,32 +319,6 @@ err:
 }
 EXPORT_SYMBOL_GPL(pci_create_slot);
 
-/**
- * pci_renumber_slot - update %struct pci_slot -> number
- * @slot: &struct pci_slot to update
- * @slot_nr: new number for slot
- *
- * The primary purpose of this interface is to allow callers who earlier
- * created a placeholder slot in pci_create_slot() by passing a -1 as
- * slot_nr, to update their %struct pci_slot with the correct @slot_nr.
- */
-void pci_renumber_slot(struct pci_slot *slot, int slot_nr)
-{
-       struct pci_slot *tmp;
-
-       down_write(&pci_bus_sem);
-
-       list_for_each_entry(tmp, &slot->bus->slots, list) {
-               WARN_ON(tmp->number == slot_nr);
-               goto out;
-       }
-
-       slot->number = slot_nr;
-out:
-       up_write(&pci_bus_sem);
-}
-EXPORT_SYMBOL_GPL(pci_renumber_slot);
-
 /**
  * pci_destroy_slot - decrement refcount for physical PCI slot
  * @slot: struct pci_slot to decrement