diff options
author | Kenji Kaneshige <kaneshige.kenji@jp.fujitsu.com> | 2009-09-15 04:24:46 -0400 |
---|---|---|
committer | Jesse Barnes <jbarnes@virtuousgeek.org> | 2009-09-17 13:05:31 -0400 |
commit | 8720d27dabf580278a7719fa8b5783d9878e2d42 (patch) | |
tree | 229ee309a9a205f41650a01ff83c0a24b710a314 /drivers/pci/hotplug/pciehp.h | |
parent | e2d4304b7d2b85c45de89ec420037d6b9261a12d (diff) |
PCI: pciehp: remove slot_list field
Since PCIe downstream port has only one slot at most, we don't need
'slot_list' linked list to manage multiple slots under the port.
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>
Diffstat (limited to 'drivers/pci/hotplug/pciehp.h')
-rw-r--r-- | drivers/pci/hotplug/pciehp.h | 16 |
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 | ||
184 | static 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 | |||
197 | struct hpc_ops { | 183 | struct 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); |