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 <m.niestroj@grinn-global.com>
This commit is contained in:
Marcin Niestroj 2020-04-06 14:25:39 +02:00 committed by Kumar Gala
commit 675c6bdaef

View file

@ -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)