unisys: use kthread_should_stop in the thread
authorDevendra Naga <devendra.aaru@gmail.com>
Thu, 19 Feb 2015 19:08:32 +0000 (14:08 -0500)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 27 Feb 2015 01:23:47 +0000 (17:23 -0800)
convert the users of should_stop variable into kthread_should_stop() API.

Cc: Ken Cox <jkc@redhat.com>
Cc: Benjamin Romer <benjamin.romer@unisys.com>
Signed-off-by: Devendra Naga <devendra.aaru@gmail.com>
Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/unisys/virthba/virthba.c

index e7af2858942dc80391cd833b36df7b131a34d88d..ca89e76fbf7e91a899e41d414afe0827b797ba40 100644 (file)
@@ -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);