]> git.baikalelectronics.ru Git - kernel.git/commit
spi: dw: refactor code that handles clk_div
authorAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Tue, 24 Feb 2015 11:32:12 +0000 (13:32 +0200)
committerMark Brown <broonie@kernel.org>
Tue, 24 Feb 2015 14:43:34 +0000 (23:43 +0900)
commitf3c4ef50cabf0b7c5efd0bfdf1116931e7c442c2
tree0ecbe7107f54a5dd6efcfe6dd93bfb6e9f107d09
parent2a032cadf0bc8581c44c944c08f7ba056b6c4af0
spi: dw: refactor code that handles clk_div

This patch does the following changes:

a) the calculation of clk_div is simplified to oneliner;

b) chip->clk_div is updated if clk_div is not zero, therefore the condition is
   simplified by using chip->clk_div in both cases;

c) while here, the redundant parentheses are removed.

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