devices: constify statically initialized device pointers

It is frequent to find variable definitions like this:

```c
static const struct device *dev = DEVICE_DT_GET(...)
```

That is, module level variables that are statically initialized with a
device reference. Such value is, in most cases, never changed meaning
the variable can also be declared as const (immutable). This patch
constifies all such cases.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
This commit is contained in:
Gerard Marull-Paretas 2022-08-17 15:37:22 +02:00 committed by Carles Cufí
commit e0125d04af
48 changed files with 56 additions and 53 deletions

View file

@ -42,7 +42,7 @@ static const struct stm32_pclken lptim_clk[] = {
static const struct stm32_pclken lptim_clk[] = STM32_DT_INST_CLOCKS(0);
#endif
static const struct device *clk_ctrl = DEVICE_DT_GET(STM32_CLOCK_CONTROL_NODE);
static const struct device *const clk_ctrl = DEVICE_DT_GET(STM32_CLOCK_CONTROL_NODE);
/*
* Assumptions and limitations: