Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit a2359a33 authored by Kenji Kaneshige's avatar Kenji Kaneshige Committed by Jesse Barnes
Browse files

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: 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 0e363159
Loading
Loading
Loading
Loading
+0 −1
Original line number Original line Diff line number Diff line
@@ -95,7 +95,6 @@ struct controller {
	struct slot *slot;
	struct slot *slot;
	struct hpc_ops *hpc_ops;
	struct hpc_ops *hpc_ops;
	wait_queue_head_t queue;	/* sleep & wake process */
	wait_queue_head_t queue;	/* sleep & wake process */
	u8 slot_device_offset;
	u32 first_slot;		/* First physical slot number */  /* PCIE only has 1 slot */
	u32 first_slot;		/* First physical slot number */  /* PCIE only has 1 slot */
	u8 slot_bus;		/* Bus where the slots handled by this controller sit */
	u8 slot_bus;		/* Bus where the slots handled by this controller sit */
	u32 slot_cap;
	u32 slot_cap;
+2 −4
Original line number Original line Diff line number Diff line
@@ -123,11 +123,9 @@ static int init_slot(struct controller *ctrl)
	slot->hotplug_slot = hotplug;
	slot->hotplug_slot = hotplug;
	snprintf(name, SLOT_NAME_SIZE, "%u", slot->number);
	snprintf(name, SLOT_NAME_SIZE, "%u", slot->number);


	ctrl_dbg(ctrl, "Registering domain:bus:dev=%04x:%02x:00 "
	ctrl_dbg(ctrl, "Registering domain:bus:dev=%04x:%02x:00 sun=%x\n",
		 "sun=%x slot_device_offset=%x\n",
		 pci_domain_nr(ctrl->pci_dev->subordinate),
		 pci_domain_nr(ctrl->pci_dev->subordinate),
		 ctrl->pci_dev->subordinate->number,
		 ctrl->pci_dev->subordinate->number, slot->number);
		 slot->number, ctrl->slot_device_offset);
	retval = pci_hp_register(hotplug,
	retval = pci_hp_register(hotplug,
				 ctrl->pci_dev->subordinate, 0, name);
				 ctrl->pci_dev->subordinate, 0, name);
	if (retval) {
	if (retval) {
+0 −3
Original line number Original line Diff line number Diff line
@@ -210,9 +210,6 @@ static int board_added(struct slot *p_slot)
	struct controller *ctrl = p_slot->ctrl;
	struct controller *ctrl = p_slot->ctrl;
	struct pci_bus *parent = ctrl->pci_dev->subordinate;
	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)) {
	if (POWER_CTRL(ctrl)) {
		/* Power on slot */
		/* Power on slot */
		retval = p_slot->hpc_ops->power_on_slot(p_slot);
		retval = p_slot->hpc_ops->power_on_slot(p_slot);
+0 −1
Original line number Original line Diff line number Diff line
@@ -1017,7 +1017,6 @@ struct controller *pcie_init(struct pcie_device *dev)


	ctrl->slot_cap = slot_cap;
	ctrl->slot_cap = slot_cap;
	ctrl->first_slot = slot_cap >> 19;
	ctrl->first_slot = slot_cap >> 19;
	ctrl->slot_device_offset = 0;
	ctrl->hpc_ops = &pciehp_hpc_ops;
	ctrl->hpc_ops = &pciehp_hpc_ops;
	mutex_init(&ctrl->crit_sect);
	mutex_init(&ctrl->crit_sect);
	mutex_init(&ctrl->ctrl_lock);
	mutex_init(&ctrl->ctrl_lock);