diff options
author | David Kershner <david.kershner@unisys.com> | 2016-09-19 17:09:24 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2016-09-20 07:26:20 -0400 |
commit | a9c73937436a412aed24c08595a31b7bf9e10dd6 (patch) | |
tree | c1eba9f7375b6483d9a1809a5a6ba4c37570781f /drivers/staging | |
parent | 8a2853279b3316558d4a5a34b06b6890ebc65613 (diff) |
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>
Diffstat (limited to 'drivers/staging')
-rw-r--r-- | drivers/staging/unisys/visorbus/visorchipset.c | 63 |
1 files changed, 31 insertions, 32 deletions
diff --git a/drivers/staging/unisys/visorbus/visorchipset.c b/drivers/staging/unisys/visorbus/visorchipset.c index d8e58266c4f9..468286bb13f3 100644 --- a/drivers/staging/unisys/visorbus/visorchipset.c +++ b/drivers/staging/unisys/visorbus/visorchipset.c | |||
@@ -179,7 +179,6 @@ struct parahotplug_request { | |||
179 | 179 | ||
180 | static LIST_HEAD(parahotplug_request_list); | 180 | static LIST_HEAD(parahotplug_request_list); |
181 | static DEFINE_SPINLOCK(parahotplug_request_list_lock); /* lock for above */ | 181 | static DEFINE_SPINLOCK(parahotplug_request_list_lock); /* lock for above */ |
182 | static void parahotplug_process_list(void); | ||
183 | 182 | ||
184 | /* info for /dev/visorchipset */ | 183 | /* info for /dev/visorchipset */ |
185 | static dev_t major_dev = -1; /*< indicates major num for device */ | 184 | static dev_t major_dev = -1; /*< indicates major num for device */ |
@@ -1466,37 +1465,6 @@ parahotplug_request_kickoff(struct parahotplug_request *req) | |||
1466 | } | 1465 | } |
1467 | 1466 | ||
1468 | /** | 1467 | /** |
1469 | * parahotplug_process_list() - remove any request from the list that's been on | ||
1470 | * there too long and respond with an error | ||
1471 | */ | ||
1472 | static void | ||
1473 | parahotplug_process_list(void) | ||
1474 | { | ||
1475 | struct list_head *pos; | ||
1476 | struct list_head *tmp; | ||
1477 | |||
1478 | spin_lock(¶hotplug_request_list_lock); | ||
1479 | |||
1480 | list_for_each_safe(pos, tmp, ¶hotplug_request_list) { | ||
1481 | struct parahotplug_request *req = | ||
1482 | list_entry(pos, struct parahotplug_request, list); | ||
1483 | |||
1484 | if (!time_after_eq(jiffies, req->expiration)) | ||
1485 | continue; | ||
1486 | |||
1487 | list_del(pos); | ||
1488 | if (req->msg.hdr.flags.response_expected) | ||
1489 | controlvm_respond_physdev_changestate( | ||
1490 | &req->msg.hdr, | ||
1491 | CONTROLVM_RESP_ERROR_DEVICE_UDEV_TIMEOUT, | ||
1492 | req->msg.cmd.device_change_state.state); | ||
1493 | parahotplug_request_destroy(req); | ||
1494 | } | ||
1495 | |||
1496 | spin_unlock(¶hotplug_request_list_lock); | ||
1497 | } | ||
1498 | |||
1499 | /** | ||
1500 | * parahotplug_request_complete() - mark request as complete | 1468 | * parahotplug_request_complete() - mark request as complete |
1501 | * @id: the id of the request | 1469 | * @id: the id of the request |
1502 | * @active: indicates whether the request is assigned to active partition | 1470 | * @active: indicates whether the request is assigned to active partition |
@@ -2091,6 +2059,37 @@ read_controlvm_event(struct controlvm_message *msg) | |||
2091 | return false; | 2059 | return false; |
2092 | } | 2060 | } |
2093 | 2061 | ||
2062 | /** | ||
2063 | * parahotplug_process_list() - remove any request from the list that's been on | ||
2064 | * there too long and respond with an error | ||
2065 | */ | ||
2066 | static void | ||
2067 | parahotplug_process_list(void) | ||
2068 | { | ||
2069 | struct list_head *pos; | ||
2070 | struct list_head *tmp; | ||
2071 | |||
2072 | spin_lock(¶hotplug_request_list_lock); | ||
2073 | |||
2074 | list_for_each_safe(pos, tmp, ¶hotplug_request_list) { | ||
2075 | struct parahotplug_request *req = | ||
2076 | list_entry(pos, struct parahotplug_request, list); | ||
2077 | |||
2078 | if (!time_after_eq(jiffies, req->expiration)) | ||
2079 | continue; | ||
2080 | |||
2081 | list_del(pos); | ||
2082 | if (req->msg.hdr.flags.response_expected) | ||
2083 | controlvm_respond_physdev_changestate( | ||
2084 | &req->msg.hdr, | ||
2085 | CONTROLVM_RESP_ERROR_DEVICE_UDEV_TIMEOUT, | ||
2086 | req->msg.cmd.device_change_state.state); | ||
2087 | parahotplug_request_destroy(req); | ||
2088 | } | ||
2089 | |||
2090 | spin_unlock(¶hotplug_request_list_lock); | ||
2091 | } | ||
2092 | |||
2094 | static void | 2093 | static void |
2095 | controlvm_periodic_work(struct work_struct *work) | 2094 | controlvm_periodic_work(struct work_struct *work) |
2096 | { | 2095 | { |