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:
Martí Bolívar 2021-04-26 12:53:04 -07:00 committed by Carles Cufí
commit 3c181e0496

View file

@ -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;
} }