eeprom: Pull out transfer length computation
authorMarek Vasut <marex@denx.de>
Tue, 10 Nov 2015 19:53:29 +0000 (20:53 +0100)
committerTom Rini <trini@konsulko.com>
Sun, 22 Nov 2015 02:50:25 +0000 (21:50 -0500)
commit39b6f98bd55541a89eddaf59effeb75f6fe631f6
tree51f5134a701a77ec374c923b69810387bb5910f3
parent6717e3c84fc3934241eb02a3b437b06dede12594
eeprom: Pull out transfer length computation

Pull out the code which computes the length of the transfer
into separate code and clean it up a little. This again trims
down the code duplication.

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Simon Glass <sjg@chromium.org>
Cc: Tom Rini <trini@konsulko.com>
Cc: Heiko Schocher <hs@denx.de>
Reviewed-by: Heiko Schocher <hs@denx.de>
common/cmd_eeprom.c