diff options
author | Kenji Kaneshige <kaneshige.kenji@jp.fujitsu.com> | 2006-12-21 20:01:09 -0500 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2007-02-07 18:50:05 -0500 |
commit | 44ef4cefb0168740184ee3d7d18254339741e9d5 (patch) | |
tree | 9ae7d2d94c6bec9fe1b6c0a9ddf7e78994ea4dc9 /drivers/pci/hotplug/pciehp.h | |
parent | 75e13178af33e20b5802885f637af2a82c64ac2c (diff) |
pciehp: cleanup wait command completion
This patch cleans up the code to wait for command completion.
Signed-off-by: Kenji Kaneshige <kaneshige.kenji@jp.fujitsu.com>
Signed-off-by: Kristen Carlson Accardi <kristen.c.accardi@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/pci/hotplug/pciehp.h')
-rw-r--r-- | drivers/pci/hotplug/pciehp.h | 18 |
1 files changed, 0 insertions, 18 deletions
diff --git a/drivers/pci/hotplug/pciehp.h b/drivers/pci/hotplug/pciehp.h index e4524cf02427..17167d594472 100644 --- a/drivers/pci/hotplug/pciehp.h +++ b/drivers/pci/hotplug/pciehp.h | |||
@@ -173,24 +173,6 @@ static inline struct slot *pciehp_find_slot(struct controller *ctrl, u8 device) | |||
173 | return NULL; | 173 | return NULL; |
174 | } | 174 | } |
175 | 175 | ||
176 | static inline int wait_for_ctrl_irq(struct controller *ctrl) | ||
177 | { | ||
178 | DECLARE_WAITQUEUE(wait, current); | ||
179 | |||
180 | add_wait_queue(&ctrl->queue, &wait); | ||
181 | if (!pciehp_poll_mode) | ||
182 | /* Sleep for up to 1 second */ | ||
183 | msleep_interruptible(1000); | ||
184 | else | ||
185 | msleep_interruptible(2500); | ||
186 | |||
187 | remove_wait_queue(&ctrl->queue, &wait); | ||
188 | if (signal_pending(current)) | ||
189 | return -EINTR; | ||
190 | |||
191 | return 0; | ||
192 | } | ||
193 | |||
194 | struct hpc_ops { | 176 | struct hpc_ops { |
195 | int (*power_on_slot)(struct slot *slot); | 177 | int (*power_on_slot)(struct slot *slot); |
196 | int (*power_off_slot)(struct slot *slot); | 178 | int (*power_off_slot)(struct slot *slot); |