diff options
author | Mark Brown <broonie@kernel.org> | 2023-03-13 18:19:31 +0000 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2023-03-13 18:19:31 +0000 |
commit | 4d8ff713e684ea58111a33ea7df2e7ddc30683cc (patch) | |
tree | 1c712cbe67882f338274e77dbf92246bda96fb9f /drivers/spi/spi-sh-msiof.c | |
parent | 0762875674b969e35371ec5fe4b594d7a92ab364 (diff) | |
parent | 7859ad5a401b73bf2ddfa274950b5722492c3150 (diff) |
spi: struct spi_device constification
Merge series from Geert Uytterhoeven <geert+renesas@glider.be>:
After noticing new cases of casting away constness, I went over all
spi_get_*() functions and their callers, and made the following changes:
1. Make all pointer parameters const where possible,
2. Remove unneeded casts, some not even related to constness.
Diffstat (limited to 'drivers/spi/spi-sh-msiof.c')
-rw-r--r-- | drivers/spi/spi-sh-msiof.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/spi/spi-sh-msiof.c b/drivers/spi/spi-sh-msiof.c index ccda021ac148..9e90b4f8b357 100644 --- a/drivers/spi/spi-sh-msiof.c +++ b/drivers/spi/spi-sh-msiof.c @@ -587,11 +587,11 @@ static int sh_msiof_prepare_message(struct spi_controller *ctlr, u32 ss, cs_high; /* Configure pins before asserting CS */ - if (spi_get_csgpiod((struct spi_device *)spi, 0)) { + if (spi_get_csgpiod(spi, 0)) { ss = ctlr->unused_native_cs; cs_high = p->native_cs_high; } else { - ss = spi_get_chipselect((struct spi_device *)spi, 0); + ss = spi_get_chipselect(spi, 0); cs_high = !!(spi->mode & SPI_CS_HIGH); } sh_msiof_spi_set_pin_regs(p, ss, !!(spi->mode & SPI_CPOL), |