aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKenji Kaneshige <kaneshige.kenji@jp.fujitsu.com>2009-09-15 04:28:28 -0400
committerJesse Barnes <jbarnes@virtuousgeek.org>2009-09-17 13:06:02 -0400
commita2359a334fb2c89347e031c4494282e6756e9ae7 (patch)
tree9ac5e61752318def916d47fd0ea27b62b19dbc3c
parent0e3631593c38e8a09bf58a46c6f6a3426d3ad0f0 (diff)
PCI: pciehp: remove slot_device_offset field
Since the device number of the hot-slot under the PCIe downstream port is always 0, the slot_device_offset field in the slot is meaningless and we don't need it. 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>
-rw-r--r--drivers/pci/hotplug/pciehp.h1
-rw-r--r--drivers/pci/hotplug/pciehp_core.c6
-rw-r--r--drivers/pci/hotplug/pciehp_ctrl.c3
-rw-r--r--drivers/pci/hotplug/pciehp_hpc.c1
4 files changed, 2 insertions, 9 deletions
diff --git a/drivers/pci/hotplug/pciehp.h b/drivers/pci/hotplug/pciehp.h
index 382c939ef7ae..979212d5d755 100644
--- a/drivers/pci/hotplug/pciehp.h
+++ b/drivers/pci/hotplug/pciehp.h
@@ -95,7 +95,6 @@ struct controller {
95 struct slot *slot; 95 struct slot *slot;
96 struct hpc_ops *hpc_ops; 96 struct hpc_ops *hpc_ops;
97 wait_queue_head_t queue; /* sleep & wake process */ 97 wait_queue_head_t queue; /* sleep & wake process */
98 u8 slot_device_offset;
99 u32 first_slot; /* First physical slot number */ /* PCIE only has 1 slot */ 98 u32 first_slot; /* First physical slot number */ /* PCIE only has 1 slot */
100 u8 slot_bus; /* Bus where the slots handled by this controller sit */ 99 u8 slot_bus; /* Bus where the slots handled by this controller sit */
101 u32 slot_cap; 100 u32 slot_cap;
diff --git a/drivers/pci/hotplug/pciehp_core.c b/drivers/pci/hotplug/pciehp_core.c
index 3adca3cb502a..209dd9de9a22 100644
--- a/drivers/pci/hotplug/pciehp_core.c
+++ b/drivers/pci/hotplug/pciehp_core.c
@@ -123,11 +123,9 @@ static int init_slot(struct controller *ctrl)
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", slot->number);
125 125
126 ctrl_dbg(ctrl, "Registering domain:bus:dev=%04x:%02x:00 " 126 ctrl_dbg(ctrl, "Registering domain:bus:dev=%04x:%02x:00 sun=%x\n",
127 "sun=%x slot_device_offset=%x\n",
128 pci_domain_nr(ctrl->pci_dev->subordinate), 127 pci_domain_nr(ctrl->pci_dev->subordinate),
129 ctrl->pci_dev->subordinate->number, 128 ctrl->pci_dev->subordinate->number, slot->number);
130 slot->number, ctrl->slot_device_offset);
131 retval = pci_hp_register(hotplug, 129 retval = pci_hp_register(hotplug,
132 ctrl->pci_dev->subordinate, 0, name); 130 ctrl->pci_dev->subordinate, 0, name);
133 if (retval) { 131 if (retval) {
diff --git a/drivers/pci/hotplug/pciehp_ctrl.c b/drivers/pci/hotplug/pciehp_ctrl.c
index 1b5e476a48b9..beb081703fd8 100644
--- a/drivers/pci/hotplug/pciehp_ctrl.c
+++ b/drivers/pci/hotplug/pciehp_ctrl.c
@@ -210,9 +210,6 @@ static int board_added(struct slot *p_slot)
210 struct controller *ctrl = p_slot->ctrl; 210 struct controller *ctrl = p_slot->ctrl;
211 struct pci_bus *parent = ctrl->pci_dev->subordinate; 211 struct pci_bus *parent = ctrl->pci_dev->subordinate;
212 212
213 ctrl_dbg(ctrl, "%s: slot device, slot offset = 0, %d\n",
214 __func__, ctrl->slot_device_offset);
215
216 if (POWER_CTRL(ctrl)) { 213 if (POWER_CTRL(ctrl)) {
217 /* Power on slot */ 214 /* Power on slot */
218 retval = p_slot->hpc_ops->power_on_slot(p_slot); 215 retval = p_slot->hpc_ops->power_on_slot(p_slot);
diff --git a/drivers/pci/hotplug/pciehp_hpc.c b/drivers/pci/hotplug/pciehp_hpc.c
index 24b221572f07..53118c12bc09 100644
--- a/drivers/pci/hotplug/pciehp_hpc.c
+++ b/drivers/pci/hotplug/pciehp_hpc.c
@@ -1017,7 +1017,6 @@ struct controller *pcie_init(struct pcie_device *dev)
1017 1017
1018 ctrl->slot_cap = slot_cap; 1018 ctrl->slot_cap = slot_cap;
1019 ctrl->first_slot = slot_cap >> 19; 1019 ctrl->first_slot = slot_cap >> 19;
1020 ctrl->slot_device_offset = 0;
1021 ctrl->hpc_ops = &pciehp_hpc_ops; 1020 ctrl->hpc_ops = &pciehp_hpc_ops;
1022 mutex_init(&ctrl->crit_sect); 1021 mutex_init(&ctrl->crit_sect);
1023 mutex_init(&ctrl->ctrl_lock); 1022 mutex_init(&ctrl->ctrl_lock);