cmd_gpio.c: adjust help message depending on gpio_status being compiled in or not
authorLothar Waßmann <LW@KARO-electronics.de>
Wed, 29 Jun 2016 08:52:53 +0000 (10:52 +0200)
committerLothar Waßmann <LW@KARO-electronics.de>
Wed, 29 Jun 2016 09:12:37 +0000 (11:12 +0200)
common/cmd_gpio.c

index 58d8125..93c53a8 100644 (file)
@@ -211,8 +211,14 @@ static int do_gpio(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
        return (ret && ret != -EBUSY) ? CMD_RET_FAILURE : CMD_RET_SUCCESS;
 }
 
        return (ret && ret != -EBUSY) ? CMD_RET_FAILURE : CMD_RET_SUCCESS;
 }
 
+#ifdef gpio_status
+#define gpio_status_help_msg "gpio status [-a] [<bank> | <pin>]  - show [all/claimed] GPIOs"
+#else
+#define gpio_status_help_msg ""
+#endif
+
 U_BOOT_CMD(gpio, 4, 0, do_gpio,
           "query and control gpio pins",
           "<input|set|clear|toggle> <pin>\n"
           "    - input/set/clear/toggle the specified pin\n"
 U_BOOT_CMD(gpio, 4, 0, do_gpio,
           "query and control gpio pins",
           "<input|set|clear|toggle> <pin>\n"
           "    - input/set/clear/toggle the specified pin\n"
-          "gpio status [-a] [<bank> | <pin>]  - show [all/claimed] GPIOs");
+          gpio_status_help_msg);