Skip to content

Commit 445164e

Browse files
Amit Kumar Mahapatrabroonie
authored andcommitted
spi: dw: Replace spi->chip_select references with function calls
New set/get APIs for accessing spi->chip_select were introduced by 'commit 9e264f3 ("spi: Replace all spi->chip_select and spi->cs_gpiod references with function call")', but the 'commit 2c86060 ("spi: dw: Add support for AMD Pensando Elba SoC")' uses the old interface by directly accessing spi->chip_select. So, replace all spi->chip_select references in the driver with new get/set APIs. Signed-off-by: Amit Kumar Mahapatra <[email protected] Acked-by: Serge Semin <[email protected] Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Mark Brown <[email protected]
1 parent ec94525 commit 445164e

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

drivers/spi/spi-dw-mmio.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -264,17 +264,17 @@ static void dw_spi_elba_set_cs(struct spi_device *spi, bool enable)
264264
struct regmap *syscon = dwsmmio->priv;
265265
u8 cs;
266266

267-
cs = spi->chip_select;
267+
cs = spi_get_chipselect(spi, 0);
268268
if (cs < 2)
269-
dw_spi_elba_override_cs(syscon, spi->chip_select, enable);
269+
dw_spi_elba_override_cs(syscon, spi_get_chipselect(spi, 0), enable);
270270

271271
/*
272272
* The DW SPI controller needs a native CS bit selected to start
273273
* the serial engine.
274274
*/
275-
spi->chip_select = 0;
275+
spi_set_chipselect(spi, 0, 0);
276276
dw_spi_set_cs(spi, enable);
277-
spi->chip_select = cs;
277+
spi_get_chipselect(spi, cs);
278278
}
279279

280280
static int dw_spi_elba_init(struct platform_device *pdev,

0 commit comments

Comments
 (0)