From 675c6bdaef45118fba0596a160a3378e10db3e7c Mon Sep 17 00:00:00 2001 From: Marcin Niestroj Date: Mon, 6 Apr 2020 14:25:39 +0200 Subject: [PATCH] drivers: lora: sx1276: constify dio gpio configuration This information is filled during build time from device-tree. This is not supposed to change in runtime, so make it const. Signed-off-by: Marcin Niestroj --- drivers/lora/sx1276.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/lora/sx1276.c b/drivers/lora/sx1276.c index 3f429e791a2..17ac9622e95 100644 --- a/drivers/lora/sx1276.c +++ b/drivers/lora/sx1276.c @@ -45,7 +45,7 @@ struct sx1276_dio { #define SX1276_DIO_GPIO_INIT(n) \ UTIL_LISTIFY(DT_INST_PROP_LEN(n, dio_gpios), SX1276_DIO_GPIO_ELEM, n) -static struct sx1276_dio sx1276_dios[] = { SX1276_DIO_GPIO_INIT(0) }; +static const struct sx1276_dio sx1276_dios[] = { SX1276_DIO_GPIO_INIT(0) }; #define SX1276_MAX_DIO ARRAY_SIZE(sx1276_dios)