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:
parent
42b53e46aa
commit
e0125d04af
48 changed files with 56 additions and 53 deletions
|
@ -46,7 +46,7 @@ static const struct busy_sim_config sim_config = {
|
|||
};
|
||||
|
||||
static struct busy_sim_data sim_data;
|
||||
static const struct device *busy_sim_dev = DEVICE_DT_GET_ONE(vnd_busy_sim);
|
||||
static const struct device *const busy_sim_dev = DEVICE_DT_GET_ONE(vnd_busy_sim);
|
||||
|
||||
static void rng_pool_work_handler(struct k_work *work)
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue