summaryrefslogtreecommitdiffstats
path: root/drivers/misc/mei/main.c
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>2013-09-30 03:27:03 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2013-09-30 03:27:03 +0200
commitd7173493683853047d6efc8d4454c70469a7b033 (patch)
tree8e6dac16d3104494b5cc2f33756c582ecdc3b753 /drivers/misc/mei/main.c
parentmisc: mic: depend on X86 for both host and card drivers. (diff)
parentLinux 3.12-rc3 (diff)
downloadlinux-d7173493683853047d6efc8d4454c70469a7b033.tar.xz
linux-d7173493683853047d6efc8d4454c70469a7b033.zip
Merge 3.12-rc3 into char-misc-next
We need/want the mei fixes in here so we can apply other updates that are depending on them. Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/misc/mei/main.c')
-rw-r--r--drivers/misc/mei/main.c11
1 files changed, 4 insertions, 7 deletions
diff --git a/drivers/misc/mei/main.c b/drivers/misc/mei/main.c
index 9aa3b78067d3..c71420ef1e37 100644
--- a/drivers/misc/mei/main.c
+++ b/drivers/misc/mei/main.c
@@ -252,19 +252,16 @@ static ssize_t mei_read(struct file *file, char __user *ubuf,
mutex_unlock(&dev->device_lock);
if (wait_event_interruptible(cl->rx_wait,
- (MEI_READ_COMPLETE == cl->reading_state ||
- MEI_FILE_INITIALIZING == cl->state ||
- MEI_FILE_DISCONNECTED == cl->state ||
- MEI_FILE_DISCONNECTING == cl->state))) {
+ MEI_READ_COMPLETE == cl->reading_state ||
+ mei_cl_is_transitioning(cl))) {
+
if (signal_pending(current))
return -EINTR;
return -ERESTARTSYS;
}
mutex_lock(&dev->device_lock);
- if (MEI_FILE_INITIALIZING == cl->state ||
- MEI_FILE_DISCONNECTED == cl->state ||
- MEI_FILE_DISCONNECTING == cl->state) {
+ if (mei_cl_is_transitioning(cl)) {
rets = -EBUSY;
goto out;
}