]> git.karo-electronics.de Git - linux-beck.git/commitdiff
mei: drop read_pending member form struct mei_cl
authorTomas Winkler <tomas.winkler@intel.com>
Tue, 8 Jan 2013 21:07:18 +0000 (23:07 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 9 Jan 2013 00:40:45 +0000 (16:40 -0800)
read_pending never changes, it is a leftover from the old code.

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/main.c
drivers/misc/mei/mei_dev.h

index e2e9cb7df06778789a0721d923bd03d3ad108923..231eda2b09e1ca6b3c378de789625f22879559fd 100644 (file)
@@ -631,7 +631,7 @@ int mei_cl_read_start(struct mei_cl *cl)
        if (dev->dev_state != MEI_DEV_ENABLED)
                return -ENODEV;
 
-       if (cl->read_pending || cl->read_cb) {
+       if (cl->read_cb) {
                dev_dbg(&dev->pdev->dev, "read is pending.\n");
                return -EBUSY;
        }
index e31ade30086dd6db102ccb33fbcc709f54b7e6d8..5c7c85505c91cba2b9f0acec3016aa465024990d 100644 (file)
@@ -380,7 +380,6 @@ free:
        mei_io_cb_free(cb);
        cl->reading_state = MEI_IDLE;
        cl->read_cb = NULL;
-       cl->read_pending = 0;
 out:
        dev_dbg(&dev->pdev->dev, "end mei read rets= %d\n", rets);
        mutex_unlock(&dev->device_lock);
@@ -462,9 +461,8 @@ static ssize_t mei_write(struct file *file, const char __user *ubuf,
                        write_cb = NULL;
                        cl->reading_state = MEI_IDLE;
                        cl->read_cb = NULL;
-                       cl->read_pending = 0;
                }
-       } else if (cl->reading_state == MEI_IDLE && !cl->read_pending)
+       } else if (cl->reading_state == MEI_IDLE)
                *offset = 0;
 
 
index 87b1f6a1a1dd87988fa96f76d498b6adabe0b15e..11ff875e8658369aa77b30277a79fd3d79047a5a 100644 (file)
@@ -199,7 +199,6 @@ struct mei_cl {
        wait_queue_head_t tx_wait;
        wait_queue_head_t rx_wait;
        wait_queue_head_t wait;
-       int read_pending;
        int status;
        /* ID of client connected */
        u8 host_client_id;