mei: always copy the read buffer if data is ready
authorAlexander Usyskin <alexander.usyskin@intel.com>
Thu, 7 Jan 2016 12:46:37 +0000 (14:46 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 7 Feb 2016 06:06:43 +0000 (22:06 -0800)
commit8b2458f413c429e4c5c4799e02ec2820396aaac4
tree2c1c8ec69d5f1176c10e465ead021c834b63e3cc
parent13cf988562b0c7f06e0016bea2b5304358397702
mei: always copy the read buffer if data is ready

Copy completed callback content to the user space
if we have such callback ready in the beginning of the read.
Simplify offset processing logic as byproduct.

This is a refinement for:
commit 139aacf757fc ("mei: fix read after read scenario")

Signed-off-by: Alexander Usyskin <alexander.usyskin@intel.com>
Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/misc/mei/main.c