]> git.kernelconcepts.de Git - karo-tx-linux.git/commit
spi: dw: eliminate speed variable in ->transfer_one()
authorAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Wed, 14 Oct 2015 20:12:21 +0000 (23:12 +0300)
committerMark Brown <broonie@kernel.org>
Mon, 19 Oct 2015 19:32:01 +0000 (20:32 +0100)
commitde6feda884b0079f5f232a41d94da23d198ff230
tree9125959d8251e458816f4ebbcc22448895b1f794
parent863cb2f72e636c8721482fd88e256facb59c5737
spi: dw: eliminate speed variable in ->transfer_one()

There is no point to have a separate variable for speed in ->transfer_one().

While here, remove !chip->clk_div from a condition since it is assigned
simultaneously with chip->speed_hz. We can do this safely because
 a) transfer speed can't be higher than max_freq and therefore chip->clk_div
    can be 0 only when chip->speed_hz is 0, and
 b) transfer speed can't be 0, otherwise we will get division by zero
    exception.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
drivers/spi/spi-dw.c