Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

iio: pressure: bmp280-core: Make read-only const array conversion_time_max static

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>

authored by

Colin Ian King and committed by
Jonathan Cameron
1bba03b7 eab35358

+1 -1
+1 -1
drivers/iio/pressure/bmp280-core.c
··· 2265 2265 2266 2266 static int bmp180_wait_for_eoc(struct bmp280_data *data, u8 ctrl_meas) 2267 2267 { 2268 - const int conversion_time_max[] = { 4500, 7500, 13500, 25500 }; 2268 + static const int conversion_time_max[] = { 4500, 7500, 13500, 25500 }; 2269 2269 unsigned int delay_us; 2270 2270 unsigned int ctrl; 2271 2271 int ret;