Commit 2f976319 authored by Nicholas Mc Guire's avatar Nicholas Mc Guire Committed by Greg Kroah-Hartman

misc: mic: fixup return type of wait_for_completion_timeout

return type of wait_for_completion_timeout is unsigned long not int. The
rc variable is renamed timeout to reflect its use and the type adjusted to
unsigned long.
Signed-off-by: default avatarNicholas Mc Guire <hofrat@osadl.org>
Acked-by: default avatarSudeep Dutt <sudeep.dutt@intel.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 860cba13
...@@ -309,7 +309,7 @@ void mic_complete_resume(struct mic_device *mdev) ...@@ -309,7 +309,7 @@ void mic_complete_resume(struct mic_device *mdev)
*/ */
void mic_prepare_suspend(struct mic_device *mdev) void mic_prepare_suspend(struct mic_device *mdev)
{ {
int rc; unsigned long timeout;
#define MIC_SUSPEND_TIMEOUT (60 * HZ) #define MIC_SUSPEND_TIMEOUT (60 * HZ)
...@@ -331,10 +331,10 @@ void mic_prepare_suspend(struct mic_device *mdev) ...@@ -331,10 +331,10 @@ void mic_prepare_suspend(struct mic_device *mdev)
*/ */
mic_set_state(mdev, MIC_SUSPENDING); mic_set_state(mdev, MIC_SUSPENDING);
mutex_unlock(&mdev->mic_mutex); mutex_unlock(&mdev->mic_mutex);
rc = wait_for_completion_timeout(&mdev->reset_wait, timeout = wait_for_completion_timeout(&mdev->reset_wait,
MIC_SUSPEND_TIMEOUT); MIC_SUSPEND_TIMEOUT);
/* Force reset the card if the shutdown completion timed out */ /* Force reset the card if the shutdown completion timed out */
if (!rc) { if (!timeout) {
mutex_lock(&mdev->mic_mutex); mutex_lock(&mdev->mic_mutex);
mic_set_state(mdev, MIC_SUSPENDED); mic_set_state(mdev, MIC_SUSPENDED);
mutex_unlock(&mdev->mic_mutex); mutex_unlock(&mdev->mic_mutex);
...@@ -348,10 +348,10 @@ void mic_prepare_suspend(struct mic_device *mdev) ...@@ -348,10 +348,10 @@ void mic_prepare_suspend(struct mic_device *mdev)
*/ */
mic_set_state(mdev, MIC_SUSPENDED); mic_set_state(mdev, MIC_SUSPENDED);
mutex_unlock(&mdev->mic_mutex); mutex_unlock(&mdev->mic_mutex);
rc = wait_for_completion_timeout(&mdev->reset_wait, timeout = wait_for_completion_timeout(&mdev->reset_wait,
MIC_SUSPEND_TIMEOUT); MIC_SUSPEND_TIMEOUT);
/* Force reset the card if the shutdown completion timed out */ /* Force reset the card if the shutdown completion timed out */
if (!rc) if (!timeout)
mic_stop(mdev, true); mic_stop(mdev, true);
break; break;
default: default:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment