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:
parent
5f2d038410
commit
c9171be27e
2 changed files with 2 additions and 2 deletions
|
@ -5,4 +5,4 @@ tests:
|
||||||
tags: drivers fram
|
tags: drivers fram
|
||||||
harness: fram
|
harness: fram
|
||||||
depends_on: gpio spi
|
depends_on: gpio spi
|
||||||
filter: CONFIG_SPI_1
|
filter: dt_alias_exists("spi-1")
|
||||||
|
|
|
@ -143,7 +143,7 @@ void main(void)
|
||||||
|
|
||||||
printk("fujitsu FRAM example application\n");
|
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) {
|
if (!spi) {
|
||||||
printk("Could not find SPI driver\n");
|
printk("Could not find SPI driver\n");
|
||||||
return;
|
return;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue