From 62bc64bc5595e2f3acfaff3e6dcf701398ce6e30 Mon Sep 17 00:00:00 2001
From: Gregory Nutt <gnutt@nuttx.org>
Date: Tue, 2 Aug 2016 08:37:30 -0600
Subject: [PATCH] Back out last Makefile.unix change.  After puzzling about
 this for a while, I moved the definitions to apps/Make.defs.  Also includes
 some cosmetic changes to GPIO lower half driver comments.

---
 Makefile.unix                        |  4 ++--
 drivers/ioexpander/gpio_lower_half.c | 18 ++++++++++--------
 2 files changed, 12 insertions(+), 10 deletions(-)

diff --git a/Makefile.unix b/Makefile.unix
index 08b7fe3b07..d1ee224a67 100644
--- a/Makefile.unix
+++ b/Makefile.unix
@@ -56,8 +56,8 @@ endif
 # Default tools
 
 ifeq ($(DIRLINK),)
-export DIRLINK = $(TOPDIR)/tools/link.sh
-export DIRUNLINK = $(TOPDIR)/tools/unlink.sh
+DIRLINK = $(TOPDIR)/tools/link.sh
+DIRUNLINK = $(TOPDIR)/tools/unlink.sh
 endif
 
 # This define is passed as EXTRADEFINES for kernel-mode builds.  It is also passed
diff --git a/drivers/ioexpander/gpio_lower_half.c b/drivers/ioexpander/gpio_lower_half.c
index b4a2d2aaf0..492e793328 100644
--- a/drivers/ioexpander/gpio_lower_half.c
+++ b/drivers/ioexpander/gpio_lower_half.c
@@ -57,11 +57,11 @@
 
 struct gplh_dev_s
 {
-  /* Publically visiable lower-half state */
+  /* Publically visible lower-half state */
 
   struct gpio_dev_s gpio;
  
-  /* Private driver data follows */
+  /* Private lower half data follows */
 
   uint8_t pin;                      /* I/O expander pin ID */
   FAR struct ioexpander_dev_s *ioe; /* Contain I/O expander interface */
@@ -80,7 +80,7 @@ static int gplh_handler(FAR struct ioexpander_dev_s *ioe,
                         ioe_pinset_t pinset, FAR void *arg);
 #endif
 
-/* GPIO Lower Half Interface methods */
+/* GPIO lower half interface methods */
 
 static int gplh_read(FAR struct gpio_dev_s *gpio, FAR bool *value);
 static int gplh_write(FAR struct gpio_dev_s *gpio, bool value);
@@ -93,6 +93,8 @@ static int gplh_enable(FAR struct gpio_dev_s *gpio, bool enable);
  * Private Data
  ****************************************************************************/
 
+/* GPIO Lower Half interface operations */
+
 static const struct gpio_operations_s g_gplh_ops =
 {
   gplh_read,   /* read   */
@@ -153,7 +155,7 @@ static int gplh_read(FAR struct gpio_dev_s *gpio, FAR bool *value)
 
   gpioinfo("pin%u: value=%p\n", priv->pin, value);
 
-  /* Get the value from the I/O expander */
+  /* Return the value from the I/O expander */
 
   return IOEXP_READPIN(priv->ioe, priv->pin, value);
 }
@@ -352,10 +354,10 @@ int gpio_lower_half(FAR struct ioexpander_dev_s *ioe, unsigned int pin,
 
   /* Initialize the non-zero elements of the newly allocated instance */
 
-  priv->pin              = (uint8_t)pin;
-  gpio                   = &priv->gpio;
-  gpio->gp_pintype       = (uint8_t)pintype;
-  gpio->gp_ops           = &g_gplh_ops;
+  priv->pin        = (uint8_t)pin;
+  gpio             = &priv->gpio;
+  gpio->gp_pintype = (uint8_t)pintype;
+  gpio->gp_ops     = &g_gplh_ops;
 
   /* Register the GPIO driver */
 
-- 
GitLab