PCI: pciehp: remove slot_device_offset field
authorKenji Kaneshige <kaneshige.kenji@jp.fujitsu.com>
Tue, 15 Sep 2009 08:28:28 +0000 (17:28 +0900)
committerJesse Barnes <jbarnes@virtuousgeek.org>
Thu, 17 Sep 2009 17:06:02 +0000 (10:06 -0700)
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>
drivers/pci/hotplug/pciehp.h
drivers/pci/hotplug/pciehp_core.c
drivers/pci/hotplug/pciehp_ctrl.c
drivers/pci/hotplug/pciehp_hpc.c

index 382c939..979212d 100644 (file)
@@ -95,7 +95,6 @@ struct controller {
        struct slot *slot;
        struct hpc_ops *hpc_ops;
        wait_queue_head_t queue;        /* sleep & wake process */
-       u8 slot_device_offset;
        u32 first_slot;         /* First physical slot number */  /* PCIE only has 1 slot */
        u8 slot_bus;            /* Bus where the slots handled by this controller sit */
        u32 slot_cap;
index 3adca3c..209dd9d 100644 (file)
@@ -123,11 +123,9 @@ static int init_slot(struct controller *ctrl)
        slot->hotplug_slot = hotplug;
        snprintf(name, SLOT_NAME_SIZE, "%u", slot->number);
 
-       ctrl_dbg(ctrl, "Registering domain:bus:dev=%04x:%02x:00 "
-                "sun=%x slot_device_offset=%x\n",
+       ctrl_dbg(ctrl, "Registering domain:bus:dev=%04x:%02x:00 sun=%x\n",
                 pci_domain_nr(ctrl->pci_dev->subordinate),
-                ctrl->pci_dev->subordinate->number,
-                slot->number, ctrl->slot_device_offset);
+                ctrl->pci_dev->subordinate->number, slot->number);
        retval = pci_hp_register(hotplug,
                                 ctrl->pci_dev->subordinate, 0, name);
        if (retval) {
index 1b5e476..beb0817 100644 (file)
@@ -210,9 +210,6 @@ static int board_added(struct slot *p_slot)
        struct controller *ctrl = p_slot->ctrl;
        struct pci_bus *parent = ctrl->pci_dev->subordinate;
 
-       ctrl_dbg(ctrl, "%s: slot device, slot offset = 0, %d\n",
-                __func__, ctrl->slot_device_offset);
-
        if (POWER_CTRL(ctrl)) {
                /* Power on slot */
                retval = p_slot->hpc_ops->power_on_slot(p_slot);
index 24b2215..53118c1 100644 (file)
@@ -1017,7 +1017,6 @@ struct controller *pcie_init(struct pcie_device *dev)
 
        ctrl->slot_cap = slot_cap;
        ctrl->first_slot = slot_cap >> 19;
-       ctrl->slot_device_offset = 0;
        ctrl->hpc_ops = &pciehp_hpc_ops;
        mutex_init(&ctrl->crit_sect);
        mutex_init(&ctrl->ctrl_lock);