Skip to content

Commit 741cec3

Browse files
masbugjic23
authored andcommitted
iio: pressure: ms5611: changed hardcoded SPI speed to value limited
Don't hardcode the ms5611 SPI speed, limit it instead. Signed-off-by: Mitja Spes <[email protected]> Fixes: c064416 ("iio: pressure: add support for MS5611 pressure and temperature sensor") Link: https://lore.kernel.org/r/[email protected] Cc: <[email protected]> Signed-off-by: Jonathan Cameron <[email protected]>
1 parent 17f442e commit 741cec3

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/iio/pressure/ms5611_spi.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ static int ms5611_spi_probe(struct spi_device *spi)
9191
spi_set_drvdata(spi, indio_dev);
9292

9393
spi->mode = SPI_MODE_0;
94-
spi->max_speed_hz = 20000000;
94+
spi->max_speed_hz = min(spi->max_speed_hz, 20000000U);
9595
spi->bits_per_word = 8;
9696
ret = spi_setup(spi);
9797
if (ret < 0)

0 commit comments

Comments
 (0)