i2c: tegra: Factor out packet header setup from tegra_i2c_xfer_msg()
authorDmitry Osipenko <digetx@gmail.com>
Tue, 29 Sep 2020 22:19:06 +0000 (01:19 +0300)
committerWolfram Sang <wsa@kernel.org>
Mon, 5 Oct 2020 20:57:43 +0000 (22:57 +0200)
commit4be62340f3ce62b90a01ce11a6bc2426606614c5
treec42c7456ebf108a1b78858c7e9a54cf0f8b7fd67
parent4a8e0f87977ec3b83db13d3ac22c6fc5a9703fd9
i2c: tegra: Factor out packet header setup from tegra_i2c_xfer_msg()

The code related to packet header setting up is a bit messy and makes
tegra_i2c_xfer_msg() more difficult to read than it could be. Let's
factor the packet header setup from tegra_i2c_xfer_msg() into separate
function in order to make code easier to read and follow.

Reviewed-by: Michał Mirosław <mirq-linux@rere.qmqm.pl>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Acked-by: Thierry Reding <treding@nvidia.com>
Tested-by: Thierry Reding <treding@nvidia.com>
Signed-off-by: Dmitry Osipenko <digetx@gmail.com>
Signed-off-by: Wolfram Sang <wsa@kernel.org>
drivers/i2c/busses/i2c-tegra.c