diff options
Diffstat (limited to 'drivers/char/ipmi/ipmi_si_intf.c')
| -rw-r--r-- | drivers/char/ipmi/ipmi_si_intf.c | 18 |
1 files changed, 6 insertions, 12 deletions
diff --git a/drivers/char/ipmi/ipmi_si_intf.c b/drivers/char/ipmi/ipmi_si_intf.c index 278f84104996..b6e5cbfb09f8 100644 --- a/drivers/char/ipmi/ipmi_si_intf.c +++ b/drivers/char/ipmi/ipmi_si_intf.c | |||
| @@ -1920,8 +1920,7 @@ static int try_get_dev_id(struct smi_info *smi_info) | |||
| 1920 | for (;;) | 1920 | for (;;) |
| 1921 | { | 1921 | { |
| 1922 | if (smi_result == SI_SM_CALL_WITH_DELAY) { | 1922 | if (smi_result == SI_SM_CALL_WITH_DELAY) { |
| 1923 | set_current_state(TASK_UNINTERRUPTIBLE); | 1923 | schedule_timeout_uninterruptible(1); |
| 1924 | schedule_timeout(1); | ||
| 1925 | smi_result = smi_info->handlers->event( | 1924 | smi_result = smi_info->handlers->event( |
| 1926 | smi_info->si_sm, 100); | 1925 | smi_info->si_sm, 100); |
| 1927 | } | 1926 | } |
| @@ -2256,10 +2255,8 @@ static int init_one_smi(int intf_num, struct smi_info **smi) | |||
| 2256 | 2255 | ||
| 2257 | /* Wait for the timer to stop. This avoids problems with race | 2256 | /* Wait for the timer to stop. This avoids problems with race |
| 2258 | conditions removing the timer here. */ | 2257 | conditions removing the timer here. */ |
| 2259 | while (! new_smi->timer_stopped) { | 2258 | while (!new_smi->timer_stopped) |
| 2260 | set_current_state(TASK_UNINTERRUPTIBLE); | 2259 | schedule_timeout_uninterruptible(1); |
| 2261 | schedule_timeout(1); | ||
| 2262 | } | ||
| 2263 | 2260 | ||
| 2264 | out_err: | 2261 | out_err: |
| 2265 | if (new_smi->intf) | 2262 | if (new_smi->intf) |
| @@ -2379,17 +2376,14 @@ static void __exit cleanup_one_si(struct smi_info *to_clean) | |||
| 2379 | 2376 | ||
| 2380 | /* Wait for the timer to stop. This avoids problems with race | 2377 | /* Wait for the timer to stop. This avoids problems with race |
| 2381 | conditions removing the timer here. */ | 2378 | conditions removing the timer here. */ |
| 2382 | while (! to_clean->timer_stopped) { | 2379 | while (!to_clean->timer_stopped) |
| 2383 | set_current_state(TASK_UNINTERRUPTIBLE); | 2380 | schedule_timeout_uninterruptible(1); |
| 2384 | schedule_timeout(1); | ||
| 2385 | } | ||
| 2386 | 2381 | ||
| 2387 | /* Interrupts and timeouts are stopped, now make sure the | 2382 | /* Interrupts and timeouts are stopped, now make sure the |
| 2388 | interface is in a clean state. */ | 2383 | interface is in a clean state. */ |
| 2389 | while (to_clean->curr_msg || (to_clean->si_state != SI_NORMAL)) { | 2384 | while (to_clean->curr_msg || (to_clean->si_state != SI_NORMAL)) { |
| 2390 | poll(to_clean); | 2385 | poll(to_clean); |
| 2391 | set_current_state(TASK_UNINTERRUPTIBLE); | 2386 | schedule_timeout_uninterruptible(1); |
| 2392 | schedule_timeout(1); | ||
| 2393 | } | 2387 | } |
| 2394 | 2388 | ||
| 2395 | rv = ipmi_unregister_smi(to_clean->intf); | 2389 | rv = ipmi_unregister_smi(to_clean->intf); |
