iio: chemical: bme680_spi: remove bits_per_word = 8
authorDavid Lechner <dlechner@baylibre.com>
Mon, 5 May 2025 19:20:30 +0000 (14:20 -0500)
committerJonathan Cameron <Jonathan.Cameron@huawei.com>
Wed, 21 May 2025 13:20:30 +0000 (14:20 +0100)
Remove setting bits_per_word = 8 from the bme680 driver. This is the
default value for SPI transfers, so it is not necessary to explicitly
set it.

Since no other SPI settings are changed, we can also remove the call to
spi_setup().

Signed-off-by: David Lechner <dlechner@baylibre.com>
Reviewed-by: Nuno Sá <nuno.sa@analog.com>
Link: https://patch.msgid.link/20250505-iio-remove-bits_per_word-8-v1-3-341f85fcfe11@baylibre.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
drivers/iio/chemical/bme680_spi.c

index ced5af2..aa97645 100644 (file)
@@ -112,14 +112,6 @@ static int bme680_spi_probe(struct spi_device *spi)
        const struct spi_device_id *id = spi_get_device_id(spi);
        struct bme680_spi_bus_context *bus_context;
        struct regmap *regmap;
-       int ret;
-
-       spi->bits_per_word = 8;
-       ret = spi_setup(spi);
-       if (ret < 0) {
-               dev_err(&spi->dev, "spi_setup failed!\n");
-               return ret;
-       }
 
        bus_context = devm_kzalloc(&spi->dev, sizeof(*bus_context), GFP_KERNEL);
        if (!bus_context)