summaryrefslogtreecommitdiffstats
path: root/drivers/staging/unisys/include/visorbus.h
diff options
context:
space:
mode:
authorTim Sell <Timothy.Sell@unisys.com>2016-06-10 21:48:08 -0400
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2016-08-15 20:44:24 +0200
commit9ebab64952237f7b9b263d6dc0cdf31e83a2d5e7 (patch)
tree98987dcb9aba3bdb27ab20e053fee6749f0dea96 /drivers/staging/unisys/include/visorbus.h
parent83011b6cbe7c597c73b31c41021dc71f78dcef7b (diff)
downloadop-kernel-dev-9ebab64952237f7b9b263d6dc0cdf31e83a2d5e7.zip
op-kernel-dev-9ebab64952237f7b9b263d6dc0cdf31e83a2d5e7.tar.gz
staging: unisys: visorbus: use kernel timer instead of workqueue
A kernel timer is now used as the vehicle to periodically call the channel_interrupt function of registered visor drivers, instead of a workqueue. This simplifies a lot of things by making periodic_work.c and periodic_work.h no longer necessary. This change also means that the channel_interrupt() callbacks registered by visor drivers (via visorbus_register_visor_driver()) will now be called in atomic context (i.e., canNOT sleep) rather than kernel thread context (CAN sleep). Fortunately this did NOT necessitate any change to the existing channel_interrupt() callbacks, because none of them ever perform any operations that would be invalid in atomic context. Signed-off-by: Tim Sell <Timothy.Sell@unisys.com> Signed-off-by: David Kershner <david.kershner@unisys.com> Acked-By: Neil Horman <nhorman@tuxdriver.com> Reviewed-by: Thomas Gleixner <tglx@linutronix.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/unisys/include/visorbus.h')
-rw-r--r--drivers/staging/unisys/include/visorbus.h10
1 files changed, 6 insertions, 4 deletions
diff --git a/drivers/staging/unisys/include/visorbus.h b/drivers/staging/unisys/include/visorbus.h
index 9baf1ec..9bb88bb 100644
--- a/drivers/staging/unisys/include/visorbus.h
+++ b/drivers/staging/unisys/include/visorbus.h
@@ -34,8 +34,9 @@
#include <linux/poll.h>
#include <linux/kernel.h>
#include <linux/uuid.h>
+#include <linux/seq_file.h>
+#include <linux/slab.h>
-#include "periodic_work.h"
#include "channel.h"
struct visor_driver;
@@ -126,8 +127,8 @@ struct visor_driver {
* device: Device struct meant for use by the bus driver
* only.
* list_all: Used by the bus driver to enumerate devices.
- * periodic_work: Device work queue. Private use by bus driver
- * only.
+ * timer: Timer fired periodically to do interrupt-type
+ * activity.
* being_removed: Indicates that the device is being removed from
* the bus. Private bus driver use only.
* visordriver_callback_lock: Used by the bus driver to lock when handling
@@ -157,7 +158,8 @@ struct visor_device {
/* These fields are for private use by the bus driver only. */
struct device device;
struct list_head list_all;
- struct periodic_work *periodic_work;
+ struct timer_list timer;
+ bool timer_active;
bool being_removed;
struct semaphore visordriver_callback_lock;
bool pausing;
OpenPOWER on IntegriCloud