devices: constify device pointers initialized at compile time
Many device pointers are initialized at compile and never changed. This means that the device pointer can be constified (immutable). Automated using: ``` perl -i -pe 's/const struct device \*(?!const)(.*)= DEVICE/const struct device *const $1= DEVICE/g' **/*.c ``` Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
This commit is contained in:
parent
aa0a7dfa92
commit
a202341958
215 changed files with 335 additions and 335 deletions
|
@ -637,7 +637,7 @@ static int uart_stm32_err_check(const struct device *dev)
|
|||
static inline void __uart_stm32_get_clock(const struct device *dev)
|
||||
{
|
||||
struct uart_stm32_data *data = dev->data;
|
||||
const struct device *clk = DEVICE_DT_GET(STM32_CLOCK_CONTROL_NODE);
|
||||
const struct device *const clk = DEVICE_DT_GET(STM32_CLOCK_CONTROL_NODE);
|
||||
|
||||
data->clock = clk;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue