From: Devendra Naga Date: Thu, 19 Feb 2015 19:08:32 +0000 (-0500) Subject: unisys: use kthread_should_stop in the thread X-Git-Tag: firefly_0821_release~176^2~1998^2~138^2~856 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=010c9f8ebd27f4af484cbe752ed583bf72675882;p=firefly-linux-kernel-4.4.55.git unisys: use kthread_should_stop in the thread convert the users of should_stop variable into kthread_should_stop() API. Cc: Ken Cox Cc: Benjamin Romer Signed-off-by: Devendra Naga Signed-off-by: Benjamin Romer Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/unisys/virthba/virthba.c b/drivers/staging/unisys/virthba/virthba.c index e7af2858942d..ca89e76fbf7e 100644 --- a/drivers/staging/unisys/virthba/virthba.c +++ b/drivers/staging/unisys/virthba/virthba.c @@ -1339,6 +1339,8 @@ process_incoming_rsps(void *v) } mask = ULTRA_CHANNEL_ENABLE_INTS; while (1) { + if (kthread_should_stop()) + break; wait_event_interruptible_timeout(virthbainfo->rsp_queue, (atomic_read(&virthbainfo->interrupt_rcvd) == 1), usecs_to_jiffies(rsltq_wait_usecs)); @@ -1346,8 +1348,6 @@ process_incoming_rsps(void *v) /* drain queue */ drain_queue(virthbainfo, dc, cmdrsp); rc1 = uisqueue_interlocked_or(virthbainfo->flags_addr, mask); - if (dc->threadinfo.should_stop) - break; } kfree(cmdrsp);