]> git.karo-electronics.de Git - mv-sheeva.git/blobdiff - drivers/staging/mei/iorw.c
Merge branch 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel...
[mv-sheeva.git] / drivers / staging / mei / iorw.c
index 0752ead4269a164e82e7cead44ac1e90b124c1ba..0a80dc4e62f3c3cc702e720d223bc0c14393ed70 100644 (file)
@@ -1,7 +1,7 @@
 /*
  *
  * Intel Management Engine Interface (Intel MEI) Linux driver
- * Copyright (c) 2003-2011, Intel Corporation.
+ * Copyright (c) 2003-2012, Intel Corporation.
  *
  * This program is free software; you can redistribute it and/or modify it
  * under the terms and conditions of the GNU General Public License,
@@ -37,7 +37,6 @@
 #include "hw.h"
 #include "mei.h"
 #include "interface.h"
-#include "mei_version.h"
 
 
 
@@ -109,8 +108,8 @@ int mei_ioctl_connect_client(struct file *file,
        dev_dbg(&dev->pdev->dev, "FW Client - Max Msg Len = %d\n",
                        dev->me_clients[i].props.max_msg_length);
 
-       /* if we're connecting to amthi client so we will use the exist
-        * connection
+       /* if we're connecting to amthi client then we will use the
+        * existing connection
         */
        if (uuid_le_cmp(data->in_client_uuid, mei_amthi_guid) == 0) {
                dev_dbg(&dev->pdev->dev, "FW Client is amthi\n");
@@ -162,7 +161,7 @@ int mei_ioctl_connect_client(struct file *file,
            && !mei_other_client_is_connecting(dev, cl)) {
                dev_dbg(&dev->pdev->dev, "Sending Connect Message\n");
                dev->mei_host_buffer_is_empty = false;
-               if (!mei_connect(dev, cl)) {
+               if (mei_connect(dev, cl)) {
                        dev_dbg(&dev->pdev->dev, "Sending connect message - failed\n");
                        rets = -ENODEV;
                        goto end;
@@ -434,13 +433,11 @@ int mei_start_read(struct mei_device *dev, struct mei_cl *cl)
        cl->read_cb = cb;
        if (dev->mei_host_buffer_is_empty) {
                dev->mei_host_buffer_is_empty = false;
-               if (!mei_send_flow_control(dev, cl)) {
+               if (mei_send_flow_control(dev, cl)) {
                        rets = -ENODEV;
                        goto unlock;
-               } else {
-                       list_add_tail(&cb->cb_list,
-                                     &dev->read_list.mei_cb.cb_list);
                }
+               list_add_tail(&cb->cb_list, &dev->read_list.mei_cb.cb_list);
        } else {
                list_add_tail(&cb->cb_list, &dev->ctrl_wr_list.mei_cb.cb_list);
        }
@@ -500,7 +497,7 @@ int amthi_write(struct mei_device *dev, struct mei_cl_cb *cb)
                mei_hdr.me_addr = dev->iamthif_cl.me_client_id;
                mei_hdr.reserved = 0;
                dev->iamthif_msg_buf_index += mei_hdr.length;
-               if (!mei_write_message(dev, &mei_hdr,
+               if (mei_write_message(dev, &mei_hdr,
                                        (unsigned char *)(dev->iamthif_msg_buf),
                                        mei_hdr.length))
                        return -ENODEV;