Commit 07a09694 authored by Kenji Kaneshige's avatar Kenji Kaneshige Committed by Jesse Barnes

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: default avatarAlex Chiang <achiang@hp.com>
Signed-off-by: default avatarKenji Kaneshige <kaneshige.kenji@jp.fujitsu.com>
Signed-off-by: default avatarJesse Barnes <jbarnes@virtuousgeek.org>
parent 82a9e79e
...@@ -73,7 +73,6 @@ do { \ ...@@ -73,7 +73,6 @@ do { \
#define SLOT_NAME_SIZE 10 #define SLOT_NAME_SIZE 10
struct slot { struct slot {
u8 state; u8 state;
u32 number;
struct controller *ctrl; struct controller *ctrl;
struct hotplug_slot *hotplug_slot; struct hotplug_slot *hotplug_slot;
struct delayed_work work; /* work for button event */ struct delayed_work work; /* work for button event */
......
...@@ -121,11 +121,11 @@ static int init_slot(struct controller *ctrl) ...@@ -121,11 +121,11 @@ static int init_slot(struct controller *ctrl)
hotplug->release = &release_slot; hotplug->release = &release_slot;
hotplug->ops = &pciehp_hotplug_slot_ops; hotplug->ops = &pciehp_hotplug_slot_ops;
slot->hotplug_slot = hotplug; slot->hotplug_slot = hotplug;
snprintf(name, SLOT_NAME_SIZE, "%u", slot->number); snprintf(name, SLOT_NAME_SIZE, "%u", PSN(ctrl));
ctrl_dbg(ctrl, "Registering domain:bus:dev=%04x:%02x:00 sun=%x\n", ctrl_dbg(ctrl, "Registering domain:bus:dev=%04x:%02x:00 sun=%x\n",
pci_domain_nr(ctrl->pcie->port->subordinate), pci_domain_nr(ctrl->pcie->port->subordinate),
ctrl->pcie->port->subordinate->number, slot->number); ctrl->pcie->port->subordinate->number, PSN(ctrl));
retval = pci_hp_register(hotplug, retval = pci_hp_register(hotplug,
ctrl->pcie->port->subordinate, 0, name); ctrl->pcie->port->subordinate, 0, name);
if (retval) { if (retval) {
......
...@@ -901,7 +901,6 @@ static int pcie_init_slot(struct controller *ctrl) ...@@ -901,7 +901,6 @@ static int pcie_init_slot(struct controller *ctrl)
return -ENOMEM; return -ENOMEM;
slot->ctrl = ctrl; slot->ctrl = ctrl;
slot->number = PSN(ctrl);
mutex_init(&slot->lock); mutex_init(&slot->lock);
INIT_DELAYED_WORK(&slot->work, pciehp_queue_pushbutton_work); INIT_DELAYED_WORK(&slot->work, pciehp_queue_pushbutton_work);
ctrl->slot = slot; ctrl->slot = slot;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment