diff options
author | Pavan Savoy <pavan_savoy@ti.com> | 2012-08-03 15:49:42 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2012-08-16 13:11:45 -0400 |
commit | 537023580d2de09fed3c3ebdca7025572a4ad083 (patch) | |
tree | 09fc53d909439686a85fc696d424f2b5b132b4b1 /drivers/misc | |
parent | b64365a52625e6ec5cf05dd984fba0fa69b24623 (diff) |
drivers/misc/ti-st: use cpu friendly completions
Be nice to CPU and don't hog the resources, use a nice wait_for_interruptible
timeout for completions instead of wait_for_timeout which is
non-interruptible.
Signed-off-by: Pavan Savoy <pavan_savoy@ti.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/misc')
-rw-r--r-- | drivers/misc/ti-st/st_kim.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/drivers/misc/ti-st/st_kim.c b/drivers/misc/ti-st/st_kim.c index 54ff644aa56b..0f36db3aa40f 100644 --- a/drivers/misc/ti-st/st_kim.c +++ b/drivers/misc/ti-st/st_kim.c | |||
@@ -207,8 +207,8 @@ static long read_local_version(struct kim_data_s *kim_gdata, char *bts_scr_name) | |||
207 | return -EIO; | 207 | return -EIO; |
208 | } | 208 | } |
209 | 209 | ||
210 | if (!wait_for_completion_timeout | 210 | if (!wait_for_completion_interruptible_timeout( |
211 | (&kim_gdata->kim_rcvd, msecs_to_jiffies(CMD_RESP_TIME))) { | 211 | &kim_gdata->kim_rcvd, msecs_to_jiffies(CMD_RESP_TIME))) { |
212 | pr_err(" waiting for ver info- timed out "); | 212 | pr_err(" waiting for ver info- timed out "); |
213 | return -ETIMEDOUT; | 213 | return -ETIMEDOUT; |
214 | } | 214 | } |
@@ -370,9 +370,9 @@ static long download_firmware(struct kim_data_s *kim_gdata) | |||
370 | break; | 370 | break; |
371 | case ACTION_WAIT_EVENT: /* wait */ | 371 | case ACTION_WAIT_EVENT: /* wait */ |
372 | pr_debug("W"); | 372 | pr_debug("W"); |
373 | if (!wait_for_completion_timeout | 373 | if (!wait_for_completion_interruptible_timeout( |
374 | (&kim_gdata->kim_rcvd, | 374 | &kim_gdata->kim_rcvd, |
375 | msecs_to_jiffies(CMD_RESP_TIME))) { | 375 | msecs_to_jiffies(CMD_RESP_TIME))) { |
376 | pr_err("response timeout during fw download "); | 376 | pr_err("response timeout during fw download "); |
377 | /* timed out */ | 377 | /* timed out */ |
378 | release_firmware(kim_gdata->fw_entry); | 378 | release_firmware(kim_gdata->fw_entry); |
@@ -462,8 +462,8 @@ long st_kim_start(void *kim_data) | |||
462 | sysfs_notify(&kim_gdata->kim_pdev->dev.kobj, | 462 | sysfs_notify(&kim_gdata->kim_pdev->dev.kobj, |
463 | NULL, "install"); | 463 | NULL, "install"); |
464 | /* wait for ldisc to be installed */ | 464 | /* wait for ldisc to be installed */ |
465 | err = wait_for_completion_timeout(&kim_gdata->ldisc_installed, | 465 | err = wait_for_completion_interruptible_timeout( |
466 | msecs_to_jiffies(LDISC_TIME)); | 466 | &kim_gdata->ldisc_installed, msecs_to_jiffies(LDISC_TIME)); |
467 | if (!err) { | 467 | if (!err) { |
468 | /* ldisc installation timeout, | 468 | /* ldisc installation timeout, |
469 | * flush uart, power cycle BT_EN */ | 469 | * flush uart, power cycle BT_EN */ |
@@ -520,8 +520,8 @@ long st_kim_stop(void *kim_data) | |||
520 | sysfs_notify(&kim_gdata->kim_pdev->dev.kobj, NULL, "install"); | 520 | sysfs_notify(&kim_gdata->kim_pdev->dev.kobj, NULL, "install"); |
521 | 521 | ||
522 | /* wait for ldisc to be un-installed */ | 522 | /* wait for ldisc to be un-installed */ |
523 | err = wait_for_completion_timeout(&kim_gdata->ldisc_installed, | 523 | err = wait_for_completion_interruptible_timeout( |
524 | msecs_to_jiffies(LDISC_TIME)); | 524 | &kim_gdata->ldisc_installed, msecs_to_jiffies(LDISC_TIME)); |
525 | if (!err) { /* timeout */ | 525 | if (!err) { /* timeout */ |
526 | pr_err(" timed out waiting for ldisc to be un-installed"); | 526 | pr_err(" timed out waiting for ldisc to be un-installed"); |
527 | err = -ETIMEDOUT; | 527 | err = -ETIMEDOUT; |