samples: spi_fujitsu_fram: drop device_get_binding
Use DEVICE_DT_GET. Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
This commit is contained in:
parent
2f576b9ada
commit
bb20b05cf3
1 changed files with 3 additions and 3 deletions
|
@ -145,9 +145,9 @@ void main(void)
|
|||
|
||||
printk("fujitsu FRAM example application\n");
|
||||
|
||||
spi = device_get_binding(DT_LABEL(DT_ALIAS(spi_1)));
|
||||
if (!spi) {
|
||||
printk("Could not find SPI driver\n");
|
||||
spi = DEVICE_DT_GET(DT_ALIAS(spi_1));
|
||||
if (!device_is_ready(spi)) {
|
||||
printk("SPI device %s is not ready\n", spi->name);
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue