diff options
author | Samuel Ortiz <sameo@linux.intel.com> | 2013-03-27 16:29:57 +0100 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2013-03-29 16:45:59 +0100 |
commit | cf3baefba04073237decb1b8a8c114b0b45bfc80 (patch) | |
tree | 735e86d98f20c7fb58b7480565837eabc02d7f7c /drivers/misc/mei/bus.c | |
parent | mei: bus: Add bus related structures to mei_cl (diff) | |
download | linux-cf3baefba04073237decb1b8a8c114b0b45bfc80.tar.xz linux-cf3baefba04073237decb1b8a8c114b0b45bfc80.zip |
mei: bus: Call bus routines from the core code
Register the MEI bus type against the kernel core bus APIs and
call the bus Rx handler from interrupt.c
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/misc/mei/bus.c')
-rw-r--r-- | drivers/misc/mei/bus.c | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/drivers/misc/mei/bus.c b/drivers/misc/mei/bus.c index 162cd542cac9..c626dc9937eb 100644 --- a/drivers/misc/mei/bus.c +++ b/drivers/misc/mei/bus.c @@ -441,3 +441,25 @@ int mei_cl_register_event_cb(struct mei_cl_device *device, return 0; } EXPORT_SYMBOL_GPL(mei_cl_register_event_cb); + +void mei_cl_bus_rx_event(struct mei_cl *cl) +{ + struct mei_cl_device *device = cl->device; + + if (!device || !device->event_cb) + return; + + set_bit(MEI_CL_EVENT_RX, &device->events); + + schedule_work(&device->event_work); +} + +int __init mei_cl_bus_init(void) +{ + return bus_register(&mei_cl_bus_type); +} + +void __exit mei_cl_bus_exit(void) +{ + bus_unregister(&mei_cl_bus_type); +} |