iio: pressure: bmp280-core: Make read-only const array conversion_time_max static
authorColin Ian King <colin.i.king@gmail.com>
Mon, 22 Jul 2024 15:17:38 +0000 (16:17 +0100)
committerJonathan Cameron <Jonathan.Cameron@huawei.com>
Sat, 3 Aug 2024 09:13:41 +0000 (10:13 +0100)
Don't populate the read-only array conversion_time_max on the stack at
run time, instead make it static.

Signed-off-by: Colin Ian King <colin.i.king@gmail.com>
Link: https://patch.msgid.link/20240722151738.572913-1-colin.i.king@gmail.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
drivers/iio/pressure/bmp280-core.c

index 3deaa57..da37923 100644 (file)
@@ -2265,7 +2265,7 @@ EXPORT_SYMBOL_NS(bmp580_chip_info, IIO_BMP280);
 
 static int bmp180_wait_for_eoc(struct bmp280_data *data, u8 ctrl_meas)
 {
-       const int conversion_time_max[] = { 4500, 7500, 13500, 25500 };
+       static const int conversion_time_max[] = { 4500, 7500, 13500, 25500 };
        unsigned int delay_us;
        unsigned int ctrl;
        int ret;