Commit 531a39bb authored by matthieu castet's avatar matthieu castet Committed by Greg Kroah-Hartman

UEAGLE : use interruptible sleep

this patch use wait_event_interruptible_timeout and msleep_interruptible
beacause uninterruptible sleep (task state 'D') is counted as 1 towards
load average, like running processes.
Signed-off-by: default avatarMatthieu Castet <castet.matthieu@free.fr>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent 9ca53464
...@@ -744,7 +744,7 @@ static inline void wake_up_cmv_ack(struct uea_softc *sc) ...@@ -744,7 +744,7 @@ static inline void wake_up_cmv_ack(struct uea_softc *sc)
static inline int wait_cmv_ack(struct uea_softc *sc) static inline int wait_cmv_ack(struct uea_softc *sc)
{ {
int ret = wait_event_timeout(sc->cmv_ack_wait, int ret = wait_event_interruptible_timeout(sc->cmv_ack_wait,
sc->cmv_ack, ACK_TIMEOUT); sc->cmv_ack, ACK_TIMEOUT);
sc->cmv_ack = 0; sc->cmv_ack = 0;
...@@ -1172,7 +1172,7 @@ static int uea_kthread(void *data) ...@@ -1172,7 +1172,7 @@ static int uea_kthread(void *data)
if (!ret) if (!ret)
ret = uea_stat(sc); ret = uea_stat(sc);
if (ret != -EAGAIN) if (ret != -EAGAIN)
msleep(1000); msleep_interruptible(1000);
if (try_to_freeze()) if (try_to_freeze())
uea_err(INS_TO_USBDEV(sc), "suspend/resume not supported, " uea_err(INS_TO_USBDEV(sc), "suspend/resume not supported, "
"please unplug/replug your modem\n"); "please unplug/replug your modem\n");
...@@ -1600,7 +1600,7 @@ static int uea_heavy(struct usbatm_data *usbatm, struct usb_interface *intf) ...@@ -1600,7 +1600,7 @@ static int uea_heavy(struct usbatm_data *usbatm, struct usb_interface *intf)
{ {
struct uea_softc *sc = usbatm->driver_data; struct uea_softc *sc = usbatm->driver_data;
wait_event(sc->sync_q, IS_OPERATIONAL(sc)); wait_event_interruptible(sc->sync_q, IS_OPERATIONAL(sc));
return 0; return 0;
......
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