samples: entropy: drop device_get_binding
Use DEVICE_DT_GET. Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
This commit is contained in:
parent
bb20b05cf3
commit
3c181e0496
1 changed files with 2 additions and 2 deletions
|
@ -14,8 +14,8 @@ void main(void)
|
||||||
|
|
||||||
printf("Entropy Example! %s\n", CONFIG_ARCH);
|
printf("Entropy Example! %s\n", CONFIG_ARCH);
|
||||||
|
|
||||||
dev = device_get_binding(DT_CHOSEN_ZEPHYR_ENTROPY_LABEL);
|
dev = DEVICE_DT_GET(DT_CHOSEN(zephyr_entropy));
|
||||||
if (!dev) {
|
if (!device_is_ready(dev)) {
|
||||||
printf("error: no entropy device\n");
|
printf("error: no entropy device\n");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue