[PATCH 2/15] pciehp: remove num_slots field

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Since PCIe downstream port has only one slot at most, we don't need
num_slots field in struct controller. Note that struct controller
itself doesn't exist if PCIe downstream port has no slot.

Signed-off-by: Kenji Kaneshige <kaneshige.kenji@xxxxxxxxxxxxxx>

---
 drivers/pci/hotplug/pciehp.h     |    1 -
 drivers/pci/hotplug/pciehp_hpc.c |    1 -
 2 files changed, 2 deletions(-)

Index: 20090915/drivers/pci/hotplug/pciehp.h
===================================================================
--- 20090915.orig/drivers/pci/hotplug/pciehp.h
+++ 20090915/drivers/pci/hotplug/pciehp.h
@@ -93,7 +93,6 @@ struct event_info {
 struct controller {
 	struct mutex crit_sect;		/* critical section mutex */
 	struct mutex ctrl_lock;		/* controller lock */
-	int num_slots;			/* Number of slots on ctlr */
 	int slot_num_inc;		/* 1 or -1 */
 	struct pci_dev *pci_dev;
 	struct pcie_device *pcie;	/* PCI Express port service */
Index: 20090915/drivers/pci/hotplug/pciehp_hpc.c
===================================================================
--- 20090915.orig/drivers/pci/hotplug/pciehp_hpc.c
+++ 20090915/drivers/pci/hotplug/pciehp_hpc.c
@@ -1025,7 +1025,6 @@ struct controller *pcie_init(struct pcie
 	ctrl->slot_cap = slot_cap;
 	ctrl->first_slot = slot_cap >> 19;
 	ctrl->slot_device_offset = 0;
-	ctrl->num_slots = 1;
 	ctrl->hpc_ops = &pciehp_hpc_ops;
 	mutex_init(&ctrl->crit_sect);
 	mutex_init(&ctrl->ctrl_lock);


--
To unsubscribe from this list: send the line "unsubscribe linux-pci" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [DMA Engine]     [Linux Coverity]     [Linux USB]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Greybus]

  Powered by Linux