mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 11:11:45 -04:00
PCI: rename pci_update_slot_number to pci_renumber_slot
The GPL exported symbol pci_update_slot_number has been renamed to pci_renumber_slot. Some of the safety checks were unnecessary and were removed. Cc: [email protected] Cc: [email protected] Acked-by: Kenji Kaneshige <[email protected]> Signed-off-by: Alex Chiang <[email protected]> Signed-off-by: Jesse Barnes <[email protected]>
This commit is contained in:
parent
1359f2701b
commit
d25b7c8d6b
2 changed files with 6 additions and 11 deletions
|
|
@ -175,7 +175,7 @@ placeholder:
|
|||
EXPORT_SYMBOL_GPL(pci_create_slot);
|
||||
|
||||
/**
|
||||
* pci_update_slot_number - update %struct pci_slot -> number
|
||||
* pci_renumber_slot - update %struct pci_slot -> number
|
||||
* @slot - %struct pci_slot to update
|
||||
* @slot_nr - new number for slot
|
||||
*
|
||||
|
|
@ -183,27 +183,22 @@ EXPORT_SYMBOL_GPL(pci_create_slot);
|
|||
* 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_update_slot_number(struct pci_slot *slot, int slot_nr)
|
||||
void pci_renumber_slot(struct pci_slot *slot, int slot_nr)
|
||||
{
|
||||
int name_count = 0;
|
||||
struct pci_slot *tmp;
|
||||
|
||||
down_write(&pci_bus_sem);
|
||||
|
||||
list_for_each_entry(tmp, &slot->bus->slots, list) {
|
||||
WARN_ON(tmp->number == slot_nr);
|
||||
if (!strcmp(kobject_name(&tmp->kobj), kobject_name(&slot->kobj)))
|
||||
name_count++;
|
||||
goto out;
|
||||
}
|
||||
|
||||
if (name_count > 1)
|
||||
printk(KERN_WARNING "pci_update_slot_number found %d slots with the same name: %s\n", name_count, kobject_name(&slot->kobj));
|
||||
|
||||
slot->number = slot_nr;
|
||||
out:
|
||||
up_write(&pci_bus_sem);
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(pci_update_slot_number);
|
||||
EXPORT_SYMBOL_GPL(pci_renumber_slot);
|
||||
|
||||
/**
|
||||
* pci_destroy_slot - decrement refcount for physical PCI slot
|
||||
|
|
|
|||
Loading…
Reference in a new issue