aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/pci/hotplug/pciehp.h
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/pci/hotplug/pciehp.h')
-rw-r--r--drivers/pci/hotplug/pciehp.h16
1 files changed, 1 insertions, 15 deletions
diff --git a/drivers/pci/hotplug/pciehp.h b/drivers/pci/hotplug/pciehp.h
index 36faa9a8e18f..af397b1291ea 100644
--- a/drivers/pci/hotplug/pciehp.h
+++ b/drivers/pci/hotplug/pciehp.h
@@ -80,7 +80,6 @@ struct slot {
80 struct controller *ctrl; 80 struct controller *ctrl;
81 struct hpc_ops *hpc_ops; 81 struct hpc_ops *hpc_ops;
82 struct hotplug_slot *hotplug_slot; 82 struct hotplug_slot *hotplug_slot;
83 struct list_head slot_list;
84 struct delayed_work work; /* work for button event */ 83 struct delayed_work work; /* work for button event */
85 struct mutex lock; 84 struct mutex lock;
86}; 85};
@@ -98,7 +97,7 @@ struct controller {
98 int slot_num_inc; /* 1 or -1 */ 97 int slot_num_inc; /* 1 or -1 */
99 struct pci_dev *pci_dev; 98 struct pci_dev *pci_dev;
100 struct pcie_device *pcie; /* PCI Express port service */ 99 struct pcie_device *pcie; /* PCI Express port service */
101 struct list_head slot_list; 100 struct slot *slot;
102 struct hpc_ops *hpc_ops; 101 struct hpc_ops *hpc_ops;
103 wait_queue_head_t queue; /* sleep & wake process */ 102 wait_queue_head_t queue; /* sleep & wake process */
104 u8 slot_device_offset; 103 u8 slot_device_offset;
@@ -181,19 +180,6 @@ static inline const char *slot_name(struct slot *slot)
181 return hotplug_slot_name(slot->hotplug_slot); 180 return hotplug_slot_name(slot->hotplug_slot);
182} 181}
183 182
184static inline struct slot *pciehp_find_slot(struct controller *ctrl, u8 device)
185{
186 struct slot *slot;
187
188 list_for_each_entry(slot, &ctrl->slot_list, slot_list) {
189 if (slot->device == device)
190 return slot;
191 }
192
193 ctrl_err(ctrl, "Slot (device=0x%02x) not found\n", device);
194 return NULL;
195}
196
197struct hpc_ops { 183struct hpc_ops {
198 int (*power_on_slot)(struct slot *slot); 184 int (*power_on_slot)(struct slot *slot);
199 int (*power_off_slot)(struct slot *slot); 185 int (*power_off_slot)(struct slot *slot);