mei: move mei_cl_complete to client.c
authorTomas Winkler <tomas.winkler@intel.com>
Sun, 12 May 2013 12:34:45 +0000 (15:34 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 21 May 2013 16:39:56 +0000 (09:39 -0700)
1. rename mei_cl_complete_handler to mei_cl_complete
2. move the function client.c where it belongs

Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/misc/mei/client.c
drivers/misc/mei/client.h
drivers/misc/mei/interrupt.c

index e310ca6ed1a34b2f78e8e02de45cb9cf222614ac..c2534ca5c6f17b66f7eeb360e8fa5222d7721533 100644 (file)
@@ -785,6 +785,32 @@ err:
 }
 
 
+/**
+ * mei_cl_complete - processes completed operation for a client
+ *
+ * @cl: private data of the file object.
+ * @cb: callback block.
+ */
+void mei_cl_complete(struct mei_cl *cl, struct mei_cl_cb *cb)
+{
+       if (cb->fop_type == MEI_FOP_WRITE) {
+               mei_io_cb_free(cb);
+               cb = NULL;
+               cl->writing_state = MEI_WRITE_COMPLETE;
+               if (waitqueue_active(&cl->tx_wait))
+                       wake_up_interruptible(&cl->tx_wait);
+
+       } else if (cb->fop_type == MEI_FOP_READ &&
+                       MEI_READING == cl->reading_state) {
+               cl->reading_state = MEI_READ_COMPLETE;
+               if (waitqueue_active(&cl->rx_wait))
+                       wake_up_interruptible(&cl->rx_wait);
+               else
+                       mei_cl_bus_rx_event(cl);
+
+       }
+}
+
 
 /**
  * mei_cl_all_disconnect - disconnect forcefully all connected clients
index cfdb144526aa93cdca27d3c37da9ce590a4ec921..7dc2af7b6fba3281ecceebf71b8da46673954869 100644 (file)
@@ -89,6 +89,7 @@ int mei_cl_disconnect(struct mei_cl *cl);
 int mei_cl_connect(struct mei_cl *cl, struct file *file);
 int mei_cl_read_start(struct mei_cl *cl, size_t length);
 int mei_cl_write(struct mei_cl *cl, struct mei_cl_cb *cb, bool blocking);
+void mei_cl_complete(struct mei_cl *cl, struct mei_cl_cb *cb);
 
 void mei_host_client_init(struct work_struct *work);
 
index 2ad736989410d475af90e7b8e6569283c07500b0..93da90a0986fbe7f3d53ceef98476c4a628184a1 100644 (file)
 #include "client.h"
 
 
-/**
- * mei_cl_complete_handler - processes completed operation for a client
- *
- * @cl: private data of the file object.
- * @cb: callback block.
- */
-static void mei_cl_complete_handler(struct mei_cl *cl, struct mei_cl_cb *cb)
-{
-       if (cb->fop_type == MEI_FOP_WRITE) {
-               mei_io_cb_free(cb);
-               cb = NULL;
-               cl->writing_state = MEI_WRITE_COMPLETE;
-               if (waitqueue_active(&cl->tx_wait))
-                       wake_up_interruptible(&cl->tx_wait);
-
-       } else if (cb->fop_type == MEI_FOP_READ &&
-                       MEI_READING == cl->reading_state) {
-               cl->reading_state = MEI_READ_COMPLETE;
-               if (waitqueue_active(&cl->rx_wait))
-                       wake_up_interruptible(&cl->rx_wait);
-               else
-                       mei_cl_bus_rx_event(cl);
-
-       }
-}
-
 /**
  * mei_irq_compl_handler - dispatch complete handelers
  *     for the completed callbacks
@@ -78,7 +52,7 @@ void mei_irq_compl_handler(struct mei_device *dev, struct mei_cl_cb *compl_list)
                if (cl == &dev->iamthif_cl)
                        mei_amthif_complete(dev, cb);
                else
-                       mei_cl_complete_handler(cl, cb);
+                       mei_cl_complete(cl, cb);
        }
 }
 EXPORT_SYMBOL_GPL(mei_irq_compl_handler);
This page took 0.027771 seconds and 5 git commands to generate.