]> git.baikalelectronics.ru Git - kernel.git/commit
platform/chrome: cros_ec_proto: factor legacy out from cros_ec_prepare_tx()
authorTzung-Bi Shih <tzungbi@kernel.org>
Wed, 18 May 2022 09:18:12 +0000 (17:18 +0800)
committerTzung-Bi Shih <tzungbi@kernel.org>
Mon, 6 Jun 2022 03:11:37 +0000 (03:11 +0000)
commitc546e962f5ad6dcbbb5721de0f9f9aa55cdb1f89
tree8145959b47571b6e9bb40e4991e724609a9b03cd
parenta006c28b33184e7a8495c0397c3659ee88453af0
platform/chrome: cros_ec_proto: factor legacy out from cros_ec_prepare_tx()

cros_ec_prepare_tx() mixed the code for both versions.  To be neat and to
make it clear, factor the legacy part out as a separate function, rename
the function, and update the comments.

Specifically,
- prepare_tx(), for current protocol version (i.e. 3).
- prepare_tx_legacy(), for protocol version <= 2.

Signed-off-by: Tzung-Bi Shih <tzungbi@kernel.org>
Reviewed-by: Guenter Roeck <groeck@chromium.org>
Link: https://lore.kernel.org/r/20220518091814.2028579-3-tzungbi@kernel.org
drivers/platform/chrome/cros_ec_proto.c