From c9171be27ed108d4d781fa28a683d5845d3a425c Mon Sep 17 00:00:00 2001 From: Anas Nashif Date: Thu, 23 Jan 2020 10:26:59 -0500 Subject: [PATCH] samples: drivers: fix build of spi_fujitsu_fram sample Use DTS filtering and get binding based on DTS variable. Signed-off-by: Anas Nashif --- samples/drivers/spi_fujitsu_fram/sample.yaml | 2 +- samples/drivers/spi_fujitsu_fram/src/main.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/samples/drivers/spi_fujitsu_fram/sample.yaml b/samples/drivers/spi_fujitsu_fram/sample.yaml index e1bae050fd..93ea1f7852 100644 --- a/samples/drivers/spi_fujitsu_fram/sample.yaml +++ b/samples/drivers/spi_fujitsu_fram/sample.yaml @@ -5,4 +5,4 @@ tests: tags: drivers fram harness: fram depends_on: gpio spi - filter: CONFIG_SPI_1 + filter: dt_alias_exists("spi-1") diff --git a/samples/drivers/spi_fujitsu_fram/src/main.c b/samples/drivers/spi_fujitsu_fram/src/main.c index fecbd83ec0..91f1ddb2c4 100644 --- a/samples/drivers/spi_fujitsu_fram/src/main.c +++ b/samples/drivers/spi_fujitsu_fram/src/main.c @@ -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;