spi: Exctract spi_dev_check_cs() helper
authorAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Wed, 6 Mar 2024 15:59:41 +0000 (17:59 +0200)
committerMark Brown <broonie@kernel.org>
Wed, 6 Mar 2024 18:09:16 +0000 (18:09 +0000)
commit9086d0f23b7c292f162a828967975e29e97c0680
treec79d6702f6e4eae5bc4a0e12278ea1d197ed926d
parent5ee91605ad9ad363766a7ed13dc7d47f5102982a
spi: Exctract spi_dev_check_cs() helper

It seems a few functions implement the similar for-loop to validate
chip select pins for uniqueness. Let's deduplicate that code in order
to have a single place of that for better maintenance.

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