diff options
author | Kenji Kaneshige <kaneshige.kenji@jp.fujitsu.com> | 2009-09-15 04:26:32 -0400 |
---|---|---|
committer | Jesse Barnes <jbarnes@virtuousgeek.org> | 2009-09-17 13:05:46 -0400 |
commit | ab9c6c86701b498445334db746aa2e8dc473c7b6 (patch) | |
tree | ebfdc650615be00a8047fb3448d96731a7197292 /drivers/pci | |
parent | 6a11c135f3511743d09474ccaac2137d34c352a8 (diff) |
PCI: pciehp: remove bus field
The bus field in struct slot is not necessary.
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.h | 1 | ||||
-rw-r--r-- | drivers/pci/hotplug/pciehp_core.c | 3 | ||||
-rw-r--r-- | drivers/pci/hotplug/pciehp_ctrl.c | 6 | ||||
-rw-r--r-- | drivers/pci/hotplug/pciehp_hpc.c | 1 | ||||
-rw-r--r-- | drivers/pci/hotplug/pciehp_pci.c | 6 |
5 files changed, 10 insertions, 7 deletions
diff --git a/drivers/pci/hotplug/pciehp.h b/drivers/pci/hotplug/pciehp.h index cfd2f59b6100..44df330c1488 100644 --- a/drivers/pci/hotplug/pciehp.h +++ b/drivers/pci/hotplug/pciehp.h | |||
@@ -72,7 +72,6 @@ do { \ | |||
72 | 72 | ||
73 | #define SLOT_NAME_SIZE 10 | 73 | #define SLOT_NAME_SIZE 10 |
74 | struct slot { | 74 | struct slot { |
75 | u8 bus; | ||
76 | u8 device; | 75 | u8 device; |
77 | u8 state; | 76 | u8 state; |
78 | u8 hp_slot; | 77 | u8 hp_slot; |
diff --git a/drivers/pci/hotplug/pciehp_core.c b/drivers/pci/hotplug/pciehp_core.c index d2cec882a2f5..3164d0e7903b 100644 --- a/drivers/pci/hotplug/pciehp_core.c +++ b/drivers/pci/hotplug/pciehp_core.c | |||
@@ -126,7 +126,8 @@ static int init_slot(struct controller *ctrl) | |||
126 | ctrl_dbg(ctrl, "Registering domain:bus:dev=%04x:%02x:%02x " | 126 | ctrl_dbg(ctrl, "Registering domain:bus:dev=%04x:%02x:%02x " |
127 | "hp_slot=%x sun=%x slot_device_offset=%x\n", | 127 | "hp_slot=%x sun=%x slot_device_offset=%x\n", |
128 | pci_domain_nr(ctrl->pci_dev->subordinate), | 128 | pci_domain_nr(ctrl->pci_dev->subordinate), |
129 | slot->bus, slot->device, slot->hp_slot, slot->number, | 129 | ctrl->pci_dev->subordinate->number, |
130 | slot->device, slot->hp_slot, slot->number, | ||
130 | ctrl->slot_device_offset); | 131 | ctrl->slot_device_offset); |
131 | retval = pci_hp_register(hotplug, | 132 | retval = pci_hp_register(hotplug, |
132 | ctrl->pci_dev->subordinate, | 133 | ctrl->pci_dev->subordinate, |
diff --git a/drivers/pci/hotplug/pciehp_ctrl.c b/drivers/pci/hotplug/pciehp_ctrl.c index b97cb4c3e0fe..a68069c9ba8d 100644 --- a/drivers/pci/hotplug/pciehp_ctrl.c +++ b/drivers/pci/hotplug/pciehp_ctrl.c | |||
@@ -242,7 +242,8 @@ static int board_added(struct slot *p_slot) | |||
242 | retval = pciehp_configure_device(p_slot); | 242 | retval = pciehp_configure_device(p_slot); |
243 | if (retval) { | 243 | if (retval) { |
244 | ctrl_err(ctrl, "Cannot add device at %04x:%02x:%02x\n", | 244 | ctrl_err(ctrl, "Cannot add device at %04x:%02x:%02x\n", |
245 | pci_domain_nr(parent), p_slot->bus, p_slot->device); | 245 | pci_domain_nr(parent), parent->number, |
246 | p_slot->device); | ||
246 | goto err_exit; | 247 | goto err_exit; |
247 | } | 248 | } |
248 | 249 | ||
@@ -319,7 +320,8 @@ static void pciehp_power_thread(struct work_struct *work) | |||
319 | ctrl_dbg(p_slot->ctrl, | 320 | ctrl_dbg(p_slot->ctrl, |
320 | "Disabling domain:bus:device=%04x:%02x:%02x\n", | 321 | "Disabling domain:bus:device=%04x:%02x:%02x\n", |
321 | pci_domain_nr(p_slot->ctrl->pci_dev->subordinate), | 322 | pci_domain_nr(p_slot->ctrl->pci_dev->subordinate), |
322 | p_slot->bus, p_slot->device); | 323 | p_slot->ctrl->pci_dev->subordinate->number, |
324 | p_slot->device); | ||
323 | pciehp_disable_slot(p_slot); | 325 | pciehp_disable_slot(p_slot); |
324 | mutex_lock(&p_slot->lock); | 326 | mutex_lock(&p_slot->lock); |
325 | p_slot->state = STATIC_STATE; | 327 | p_slot->state = STATIC_STATE; |
diff --git a/drivers/pci/hotplug/pciehp_hpc.c b/drivers/pci/hotplug/pciehp_hpc.c index d573338af1a4..aec1d663f623 100644 --- a/drivers/pci/hotplug/pciehp_hpc.c +++ b/drivers/pci/hotplug/pciehp_hpc.c | |||
@@ -930,7 +930,6 @@ static int pcie_init_slot(struct controller *ctrl) | |||
930 | 930 | ||
931 | slot->hp_slot = 0; | 931 | slot->hp_slot = 0; |
932 | slot->ctrl = ctrl; | 932 | slot->ctrl = ctrl; |
933 | slot->bus = ctrl->pci_dev->subordinate->number; | ||
934 | slot->device = ctrl->slot_device_offset + slot->hp_slot; | 933 | slot->device = ctrl->slot_device_offset + slot->hp_slot; |
935 | slot->hpc_ops = ctrl->hpc_ops; | 934 | slot->hpc_ops = ctrl->hpc_ops; |
936 | slot->number = ctrl->first_slot; | 935 | slot->number = ctrl->first_slot; |
diff --git a/drivers/pci/hotplug/pciehp_pci.c b/drivers/pci/hotplug/pciehp_pci.c index 02e24d63b3ee..2e5f6b816da6 100644 --- a/drivers/pci/hotplug/pciehp_pci.c +++ b/drivers/pci/hotplug/pciehp_pci.c | |||
@@ -71,7 +71,8 @@ int pciehp_configure_device(struct slot *p_slot) | |||
71 | if (dev) { | 71 | if (dev) { |
72 | ctrl_err(ctrl, "Device %s already exists " | 72 | ctrl_err(ctrl, "Device %s already exists " |
73 | "at %04x:%02x:%02x, cannot hot-add\n", pci_name(dev), | 73 | "at %04x:%02x:%02x, cannot hot-add\n", pci_name(dev), |
74 | pci_domain_nr(parent), p_slot->bus, p_slot->device); | 74 | pci_domain_nr(parent), parent->number, |
75 | p_slot->device); | ||
75 | pci_dev_put(dev); | 76 | pci_dev_put(dev); |
76 | return -EINVAL; | 77 | return -EINVAL; |
77 | } | 78 | } |
@@ -116,7 +117,8 @@ int pciehp_unconfigure_device(struct slot *p_slot) | |||
116 | struct controller *ctrl = p_slot->ctrl; | 117 | struct controller *ctrl = p_slot->ctrl; |
117 | 118 | ||
118 | ctrl_dbg(ctrl, "%s: domain:bus:dev = %04x:%02x:%02x\n", | 119 | ctrl_dbg(ctrl, "%s: domain:bus:dev = %04x:%02x:%02x\n", |
119 | __func__, pci_domain_nr(parent), p_slot->bus, p_slot->device); | 120 | __func__, pci_domain_nr(parent), parent->number, |
121 | p_slot->device); | ||
120 | ret = p_slot->hpc_ops->get_adapter_status(p_slot, &presence); | 122 | ret = p_slot->hpc_ops->get_adapter_status(p_slot, &presence); |
121 | if (ret) | 123 | if (ret) |
122 | presence = 0; | 124 | presence = 0; |