aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/pci
diff options
context:
space:
mode:
authorKenji Kaneshige <kaneshige.kenji@jp.fujitsu.com>2009-09-15 04:31:16 -0400
committerJesse Barnes <jbarnes@virtuousgeek.org>2009-09-17 13:06:36 -0400
commit07a09694de556f307b1c5035cdf0f17c6243d1cd (patch)
treeceb0bc41419ab4f680e87f49e0c581177c2147f1 /drivers/pci
parent82a9e79ef132cbf77de58aae35c1a14237f2fcde (diff)
PCI: pciehp: remove number field
Since slot_cap field in struct controller contains physical slot number informationq, we don't need number field in struct slot. Acked-by: Alex Chiang <achiang@hp.com> Signed-off-by: Kenji Kaneshige <kaneshige.kenji@jp.fujitsu.com> Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
Diffstat (limited to 'drivers/pci')
-rw-r--r--drivers/pci/hotplug/pciehp.h1
-rw-r--r--drivers/pci/hotplug/pciehp_core.c4
-rw-r--r--drivers/pci/hotplug/pciehp_hpc.c1
3 files changed, 2 insertions, 4 deletions
diff --git a/drivers/pci/hotplug/pciehp.h b/drivers/pci/hotplug/pciehp.h
index b7054cb885cf..b20a38da7a80 100644
--- a/drivers/pci/hotplug/pciehp.h
+++ b/drivers/pci/hotplug/pciehp.h
@@ -73,7 +73,6 @@ do { \
73#define SLOT_NAME_SIZE 10 73#define SLOT_NAME_SIZE 10
74struct slot { 74struct slot {
75 u8 state; 75 u8 state;
76 u32 number;
77 struct controller *ctrl; 76 struct controller *ctrl;
78 struct hotplug_slot *hotplug_slot; 77 struct hotplug_slot *hotplug_slot;
79 struct delayed_work work; /* work for button event */ 78 struct delayed_work work; /* work for button event */
diff --git a/drivers/pci/hotplug/pciehp_core.c b/drivers/pci/hotplug/pciehp_core.c
index 2c6d94fcf9aa..bc234719b1df 100644
--- a/drivers/pci/hotplug/pciehp_core.c
+++ b/drivers/pci/hotplug/pciehp_core.c
@@ -121,11 +121,11 @@ static int init_slot(struct controller *ctrl)
121 hotplug->release = &release_slot; 121 hotplug->release = &release_slot;
122 hotplug->ops = &pciehp_hotplug_slot_ops; 122 hotplug->ops = &pciehp_hotplug_slot_ops;
123 slot->hotplug_slot = hotplug; 123 slot->hotplug_slot = hotplug;
124 snprintf(name, SLOT_NAME_SIZE, "%u", slot->number); 124 snprintf(name, SLOT_NAME_SIZE, "%u", PSN(ctrl));
125 125
126 ctrl_dbg(ctrl, "Registering domain:bus:dev=%04x:%02x:00 sun=%x\n", 126 ctrl_dbg(ctrl, "Registering domain:bus:dev=%04x:%02x:00 sun=%x\n",
127 pci_domain_nr(ctrl->pcie->port->subordinate), 127 pci_domain_nr(ctrl->pcie->port->subordinate),
128 ctrl->pcie->port->subordinate->number, slot->number); 128 ctrl->pcie->port->subordinate->number, PSN(ctrl));
129 retval = pci_hp_register(hotplug, 129 retval = pci_hp_register(hotplug,
130 ctrl->pcie->port->subordinate, 0, name); 130 ctrl->pcie->port->subordinate, 0, name);
131 if (retval) { 131 if (retval) {
diff --git a/drivers/pci/hotplug/pciehp_hpc.c b/drivers/pci/hotplug/pciehp_hpc.c
index 8c34e84fc0c7..9ef4605c1ef6 100644
--- a/drivers/pci/hotplug/pciehp_hpc.c
+++ b/drivers/pci/hotplug/pciehp_hpc.c
@@ -901,7 +901,6 @@ static int pcie_init_slot(struct controller *ctrl)
901 return -ENOMEM; 901 return -ENOMEM;
902 902
903 slot->ctrl = ctrl; 903 slot->ctrl = ctrl;
904 slot->number = PSN(ctrl);
905 mutex_init(&slot->lock); 904 mutex_init(&slot->lock);
906 INIT_DELAYED_WORK(&slot->work, pciehp_queue_pushbutton_work); 905 INIT_DELAYED_WORK(&slot->work, pciehp_queue_pushbutton_work);
907 ctrl->slot = slot; 906 ctrl->slot = slot;