diff options
Diffstat (limited to 'drivers/misc/mei/client.c')
-rw-r--r-- | drivers/misc/mei/client.c | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/drivers/misc/mei/client.c b/drivers/misc/mei/client.c index e310ca6ed1a3..c2534ca5c6f1 100644 --- a/drivers/misc/mei/client.c +++ b/drivers/misc/mei/client.c | |||
@@ -785,6 +785,32 @@ err: | |||
785 | } | 785 | } |
786 | 786 | ||
787 | 787 | ||
788 | /** | ||
789 | * mei_cl_complete - processes completed operation for a client | ||
790 | * | ||
791 | * @cl: private data of the file object. | ||
792 | * @cb: callback block. | ||
793 | */ | ||
794 | void mei_cl_complete(struct mei_cl *cl, struct mei_cl_cb *cb) | ||
795 | { | ||
796 | if (cb->fop_type == MEI_FOP_WRITE) { | ||
797 | mei_io_cb_free(cb); | ||
798 | cb = NULL; | ||
799 | cl->writing_state = MEI_WRITE_COMPLETE; | ||
800 | if (waitqueue_active(&cl->tx_wait)) | ||
801 | wake_up_interruptible(&cl->tx_wait); | ||
802 | |||
803 | } else if (cb->fop_type == MEI_FOP_READ && | ||
804 | MEI_READING == cl->reading_state) { | ||
805 | cl->reading_state = MEI_READ_COMPLETE; | ||
806 | if (waitqueue_active(&cl->rx_wait)) | ||
807 | wake_up_interruptible(&cl->rx_wait); | ||
808 | else | ||
809 | mei_cl_bus_rx_event(cl); | ||
810 | |||
811 | } | ||
812 | } | ||
813 | |||
788 | 814 | ||
789 | /** | 815 | /** |
790 | * mei_cl_all_disconnect - disconnect forcefully all connected clients | 816 | * mei_cl_all_disconnect - disconnect forcefully all connected clients |