aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndy Shevchenko <andriy.shevchenko@linux.intel.com>2024-04-15 21:47:57 +0300
committerMark Brown <broonie@kernel.org>2024-04-16 08:45:18 +0900
commitbb40996267670862544cb8e740afb77cbf3a7949 (patch)
tree226abccf18d7a1b8827666360c366c1501d870a2
parentdf3431fd379dcc3b231bd109a55948c27474478d (diff)
downloadspi-bb40996267670862544cb8e740afb77cbf3a7949.tar.gz
spi: Consistently use BIT for cs_index_mask (part 2)
For some reason the commit 1209c5566f9b ("spi: Consistently use BIT for cs_index_mask") missed one place to change, do it here to finish the job. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Link: https://lore.kernel.org/r/20240415184757.1198149-1-andriy.shevchenko@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
-rw-r--r--drivers/spi/spi.c10
1 files changed, 3 insertions, 7 deletions
diff --git a/drivers/spi/spi.c b/drivers/spi/spi.c
index a2f01116ba092..6eb8583f5e401 100644
--- a/drivers/spi/spi.c
+++ b/drivers/spi/spi.c
@@ -822,14 +822,10 @@ struct spi_device *spi_new_device(struct spi_controller *ctlr,
proxy->controller_data = chip->controller_data;
proxy->controller_state = NULL;
/*
- * spi->chip_select[i] gives the corresponding physical CS for logical CS i
- * logical CS number is represented by setting the ith bit in spi->cs_index_mask
- * So, for example, if spi->cs_index_mask = 0x01 then logical CS number is 0 and
- * spi->chip_select[0] will give the physical CS.
- * By default spi->chip_select[0] will hold the physical CS number so, set
- * spi->cs_index_mask as 0x01.
+ * By default spi->chip_select[0] will hold the physical CS number,
+ * so set bit 0 in spi->cs_index_mask.
*/
- proxy->cs_index_mask = 0x01;
+ proxy->cs_index_mask = BIT(0);
if (chip->swnode) {
status = device_add_software_node(&proxy->dev, chip->swnode);