]> www.infradead.org Git - users/jedix/linux-maple.git/commit
spi: Simplify conditionals in spi_set_cs()
authorAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Mon, 31 Mar 2025 09:39:15 +0000 (12:39 +0300)
committerMark Brown <broonie@kernel.org>
Sun, 6 Apr 2025 22:26:08 +0000 (23:26 +0100)
commit1f1d979fbf741c3608a344373f88444dc8749967
tree54606d90b030859b18c495885a94ae926dbb5b20
parentdd8a9807fa03666bff52cb28472fb227eaac36c9
spi: Simplify conditionals in spi_set_cs()

First of all, the (foo && bar) || (!foo && !bar) when foo and bar
are booleans is equivalent to (foo == bar). Second, reuse variable
that holds already the calculation of the SPI CS mode to be
active-high. No functional changes intended.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Link: https://patch.msgid.link/20250331093915.4041600-1-andriy.shevchenko@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
drivers/spi/spi.c