samples: drivers: fix build of spi_fujitsu_fram sample

Use DTS filtering and get binding based on DTS variable.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
This commit is contained in:
Anas Nashif 2020-01-23 10:26:59 -05:00
parent 5f2d038410
commit c9171be27e
2 changed files with 2 additions and 2 deletions

View file

@ -5,4 +5,4 @@ tests:
tags: drivers fram
harness: fram
depends_on: gpio spi
filter: CONFIG_SPI_1
filter: dt_alias_exists("spi-1")

View file

@ -143,7 +143,7 @@ void main(void)
printk("fujitsu FRAM example application\n");
spi = device_get_binding(DT_SPI_1_NAME);
spi = device_get_binding(DT_ALIAS_SPI_1_LABEL);
if (!spi) {
printk("Could not find SPI driver\n");
return;