staging: unisys: visorbus: move parahotplug_process_list
The function parahotplug_process_list needs to be moved lower in the file to avoid extraneous function prototypes. Reported-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by: David Kershner <david.kershner@unisys.com> Reviewed-by: Tim Sell <Timothy.Sell@unisys.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
8a2853279b
commit
a9c7393743
|
@ -179,7 +179,6 @@ struct parahotplug_request {
|
||||||
|
|
||||||
static LIST_HEAD(parahotplug_request_list);
|
static LIST_HEAD(parahotplug_request_list);
|
||||||
static DEFINE_SPINLOCK(parahotplug_request_list_lock); /* lock for above */
|
static DEFINE_SPINLOCK(parahotplug_request_list_lock); /* lock for above */
|
||||||
static void parahotplug_process_list(void);
|
|
||||||
|
|
||||||
/* info for /dev/visorchipset */
|
/* info for /dev/visorchipset */
|
||||||
static dev_t major_dev = -1; /*< indicates major num for device */
|
static dev_t major_dev = -1; /*< indicates major num for device */
|
||||||
|
@ -1465,37 +1464,6 @@ parahotplug_request_kickoff(struct parahotplug_request *req)
|
||||||
envp);
|
envp);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* parahotplug_process_list() - remove any request from the list that's been on
|
|
||||||
* there too long and respond with an error
|
|
||||||
*/
|
|
||||||
static void
|
|
||||||
parahotplug_process_list(void)
|
|
||||||
{
|
|
||||||
struct list_head *pos;
|
|
||||||
struct list_head *tmp;
|
|
||||||
|
|
||||||
spin_lock(¶hotplug_request_list_lock);
|
|
||||||
|
|
||||||
list_for_each_safe(pos, tmp, ¶hotplug_request_list) {
|
|
||||||
struct parahotplug_request *req =
|
|
||||||
list_entry(pos, struct parahotplug_request, list);
|
|
||||||
|
|
||||||
if (!time_after_eq(jiffies, req->expiration))
|
|
||||||
continue;
|
|
||||||
|
|
||||||
list_del(pos);
|
|
||||||
if (req->msg.hdr.flags.response_expected)
|
|
||||||
controlvm_respond_physdev_changestate(
|
|
||||||
&req->msg.hdr,
|
|
||||||
CONTROLVM_RESP_ERROR_DEVICE_UDEV_TIMEOUT,
|
|
||||||
req->msg.cmd.device_change_state.state);
|
|
||||||
parahotplug_request_destroy(req);
|
|
||||||
}
|
|
||||||
|
|
||||||
spin_unlock(¶hotplug_request_list_lock);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* parahotplug_request_complete() - mark request as complete
|
* parahotplug_request_complete() - mark request as complete
|
||||||
* @id: the id of the request
|
* @id: the id of the request
|
||||||
|
@ -2091,6 +2059,37 @@ read_controlvm_event(struct controlvm_message *msg)
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* parahotplug_process_list() - remove any request from the list that's been on
|
||||||
|
* there too long and respond with an error
|
||||||
|
*/
|
||||||
|
static void
|
||||||
|
parahotplug_process_list(void)
|
||||||
|
{
|
||||||
|
struct list_head *pos;
|
||||||
|
struct list_head *tmp;
|
||||||
|
|
||||||
|
spin_lock(¶hotplug_request_list_lock);
|
||||||
|
|
||||||
|
list_for_each_safe(pos, tmp, ¶hotplug_request_list) {
|
||||||
|
struct parahotplug_request *req =
|
||||||
|
list_entry(pos, struct parahotplug_request, list);
|
||||||
|
|
||||||
|
if (!time_after_eq(jiffies, req->expiration))
|
||||||
|
continue;
|
||||||
|
|
||||||
|
list_del(pos);
|
||||||
|
if (req->msg.hdr.flags.response_expected)
|
||||||
|
controlvm_respond_physdev_changestate(
|
||||||
|
&req->msg.hdr,
|
||||||
|
CONTROLVM_RESP_ERROR_DEVICE_UDEV_TIMEOUT,
|
||||||
|
req->msg.cmd.device_change_state.state);
|
||||||
|
parahotplug_request_destroy(req);
|
||||||
|
}
|
||||||
|
|
||||||
|
spin_unlock(¶hotplug_request_list_lock);
|
||||||
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
controlvm_periodic_work(struct work_struct *work)
|
controlvm_periodic_work(struct work_struct *work)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue