You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by ac...@apache.org on 2021/08/09 11:42:59 UTC

[incubator-nuttx] branch master updated: Compile fixes in MCP23X17 driver.

This is an automated email from the ASF dual-hosted git repository.

acassis pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-nuttx.git


The following commit(s) were added to refs/heads/master by this push:
     new 59b9a30  Compile fixes in MCP23X17 driver.
59b9a30 is described below

commit 59b9a305929bd11d812dfc90905b0831eb5f17c2
Author: Fotis Panagiotopoulos <f....@gmail.com>
AuthorDate: Mon Aug 9 13:47:38 2021 +0300

    Compile fixes in MCP23X17 driver.
---
 drivers/ioexpander/mcp23x17.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/drivers/ioexpander/mcp23x17.c b/drivers/ioexpander/mcp23x17.c
index ec1620e..b784222 100644
--- a/drivers/ioexpander/mcp23x17.c
+++ b/drivers/ioexpander/mcp23x17.c
@@ -45,11 +45,11 @@
 #  warning I2C support is required (CONFIG_I2C)
 #endif
 
-#ifndef CONFIG_SCHED_WORKQUEUE
+#if (!defined CONFIG_SCHED_WORKQUEUE) && (defined CONFIG_MCP23X17_INT_ENABLE)
 #  error Work queue support is required (CONFIG_SCHED_WORKQUEUE)
 #endif
 
-#ifndef CONFIG_SCHED_HPWORK
+#if (!defined CONFIG_SCHED_HPWORK) && (defined CONFIG_MCP23X17_INT_ENABLE)
 #  error High-Priority Work support is required (CONFIG_SCHED_HPWORK)
 #endif
 
@@ -950,7 +950,6 @@ FAR struct ioexpander_dev_s *mcp23x17_initialize(
                               FAR struct mcp23x17_config_s *config)
 {
   FAR struct mcp23x17_dev_s *priv;
-  int ret;
 
   DEBUGASSERT(i2cdev != NULL && config != NULL);