From 1efbb4c114880a6ffa2181f9a326389ae282da42 Mon Sep 17 00:00:00 2001 From: Augusto Fraga Giachero Date: Thu, 17 Sep 2020 15:54:37 -0300 Subject: [PATCH] Fix build errors when using DEBUGASSERT I never tested these drivers with debug assertions enabled as I should have. This commit fixes build errors due to wrong variable names used. --- drivers/analog/dac7554.c | 4 ++-- drivers/rf/dat-31r5-sp.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/analog/dac7554.c b/drivers/analog/dac7554.c index eab701bf07..4e0fdab208 100644 --- a/drivers/analog/dac7554.c +++ b/drivers/analog/dac7554.c @@ -199,7 +199,7 @@ static int dac7554_send(FAR struct dac_dev_s *dev, FAR struct dac_msg_s *msg) /* Sanity check */ - DEBUGASSERT(priv->SPI != NULL); + DEBUGASSERT(priv->spi != NULL); /* Set up message to send */ @@ -261,7 +261,7 @@ FAR struct dac_dev_s *dac7554_initialize(FAR struct spi_dev_s *spi, /* Sanity check */ - DEBUGASSERT(i2c != NULL); + DEBUGASSERT(spi != NULL); /* Initialize the DAC7554 device structure */ diff --git a/drivers/rf/dat-31r5-sp.c b/drivers/rf/dat-31r5-sp.c index bc31b77da9..fe84b2049a 100644 --- a/drivers/rf/dat-31r5-sp.c +++ b/drivers/rf/dat-31r5-sp.c @@ -230,7 +230,7 @@ static int dat31r5sp_ioctl(FAR struct file *filep, int cmd, unsigned long arg) { FAR struct attenuator_control *att = (FAR struct attenuator_control *)((uintptr_t)arg); - DEBUGASSERT(ptr != NULL); + DEBUGASSERT(att != NULL); dat31r5sp_set_attenuation(priv, att->attenuation); } break;