diff options
author | Alex Chiang <achiang@hp.com> | 2008-10-20 19:41:58 -0400 |
---|---|---|
committer | Jesse Barnes <jbarnes@virtuousgeek.org> | 2008-10-22 19:42:43 -0400 |
commit | 58319b802a614f10f1b5238fbde7a4b2e9a60069 (patch) | |
tree | 2f1d284bf836bf06f8469b9cf77836fd34543a3f | |
parent | 66f1705580f796a3f52c092e9dc92cbe5df41dd6 (diff) |
PCI: Hotplug core: remove 'name'
Now that the PCI core manages the 'name' for each individual
hotplug driver, and all drivers (except rpaphp) have been converted
to use hotplug_slot_name(), there is no need for the PCI hotplug
core to drag around its own copy of name either.
Cc: kristen.c.accardi@intel.com
Cc: matthew@wil.cx
Acked-by: Kenji Kaneshige <kaneshige.kenji@jp.fujitsu.com>
Signed-off-by: Alex Chiang <achiang@hp.com>
Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
-rw-r--r-- | drivers/pci/hotplug/pci_hotplug_core.c | 6 | ||||
-rw-r--r-- | include/linux/pci_hotplug.h | 3 |
2 files changed, 3 insertions, 6 deletions
diff --git a/drivers/pci/hotplug/pci_hotplug_core.c b/drivers/pci/hotplug/pci_hotplug_core.c index a6f1f282b683..535fce0f07f9 100644 --- a/drivers/pci/hotplug/pci_hotplug_core.c +++ b/drivers/pci/hotplug/pci_hotplug_core.c | |||
@@ -533,7 +533,7 @@ static struct hotplug_slot *get_slot_from_name (const char *name) | |||
533 | 533 | ||
534 | list_for_each (tmp, &pci_hotplug_slot_list) { | 534 | list_for_each (tmp, &pci_hotplug_slot_list) { |
535 | slot = list_entry (tmp, struct hotplug_slot, slot_list); | 535 | slot = list_entry (tmp, struct hotplug_slot, slot_list); |
536 | if (strcmp(slot->name, name) == 0) | 536 | if (strcmp(hotplug_slot_name(slot), name) == 0) |
537 | return slot; | 537 | return slot; |
538 | } | 538 | } |
539 | return NULL; | 539 | return NULL; |
@@ -611,7 +611,7 @@ int pci_hp_deregister(struct hotplug_slot *hotplug) | |||
611 | return -ENODEV; | 611 | return -ENODEV; |
612 | 612 | ||
613 | mutex_lock(&pci_hp_mutex); | 613 | mutex_lock(&pci_hp_mutex); |
614 | temp = get_slot_from_name(hotplug->name); | 614 | temp = get_slot_from_name(hotplug_slot_name(hotplug)); |
615 | if (temp != hotplug) { | 615 | if (temp != hotplug) { |
616 | mutex_unlock(&pci_hp_mutex); | 616 | mutex_unlock(&pci_hp_mutex); |
617 | return -ENODEV; | 617 | return -ENODEV; |
@@ -621,7 +621,7 @@ int pci_hp_deregister(struct hotplug_slot *hotplug) | |||
621 | 621 | ||
622 | slot = hotplug->pci_slot; | 622 | slot = hotplug->pci_slot; |
623 | fs_remove_slot(slot); | 623 | fs_remove_slot(slot); |
624 | dbg("Removed slot %s from the list\n", hotplug->name); | 624 | dbg("Removed slot %s from the list\n", hotplug_slot_name(hotplug)); |
625 | 625 | ||
626 | hotplug->release(hotplug); | 626 | hotplug->release(hotplug); |
627 | slot->hotplug = NULL; | 627 | slot->hotplug = NULL; |
diff --git a/include/linux/pci_hotplug.h b/include/linux/pci_hotplug.h index a3a3245943b1..a00bd1a0f156 100644 --- a/include/linux/pci_hotplug.h +++ b/include/linux/pci_hotplug.h | |||
@@ -142,8 +142,6 @@ struct hotplug_slot_info { | |||
142 | 142 | ||
143 | /** | 143 | /** |
144 | * struct hotplug_slot - used to register a physical slot with the hotplug pci core | 144 | * struct hotplug_slot - used to register a physical slot with the hotplug pci core |
145 | * @name: the name of the slot being registered. This string must | ||
146 | * be unique amoung slots registered on this system. | ||
147 | * @ops: pointer to the &struct hotplug_slot_ops to be used for this slot | 145 | * @ops: pointer to the &struct hotplug_slot_ops to be used for this slot |
148 | * @info: pointer to the &struct hotplug_slot_info for the initial values for | 146 | * @info: pointer to the &struct hotplug_slot_info for the initial values for |
149 | * this slot. | 147 | * this slot. |
@@ -153,7 +151,6 @@ struct hotplug_slot_info { | |||
153 | * needs. | 151 | * needs. |
154 | */ | 152 | */ |
155 | struct hotplug_slot { | 153 | struct hotplug_slot { |
156 | char *name; | ||
157 | struct hotplug_slot_ops *ops; | 154 | struct hotplug_slot_ops *ops; |
158 | struct hotplug_slot_info *info; | 155 | struct hotplug_slot_info *info; |
159 | void (*release) (struct hotplug_slot *slot); | 156 | void (*release) (struct hotplug_slot *slot); |