mmc: meson-gx: improve setting data->bytes_xfered
authorHeiner Kallweit <hkallweit1@gmail.com>
Wed, 22 Mar 2017 21:33:53 +0000 (22:33 +0100)
committerUlf Hansson <ulf.hansson@linaro.org>
Mon, 24 Apr 2017 19:41:46 +0000 (21:41 +0200)
commit2c8d96a46dfd45b724465e53a5a9542bcb78cfce
tree2fae42476ce51bc28c3209e07b13569c102f83df
parent1f8066d90739ebfdf70a5debbc5fed22fdd17465
mmc: meson-gx: improve setting data->bytes_xfered

Centralize setting data->bytes_xfered in one place and make sure
that the number of transfererd bytes is set only if we receive
the end-of-chain interrupt and there was no error.

Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
Reviewed-by: Kevin Hilman <khilman@baylibre.com>
drivers/mmc/host/meson-gx-mmc.c