From 1ba1c34b0147a6ede1ae9148d4dcc17b12588233 Mon Sep 17 00:00:00 2001 From: Xiang Xiao Date: Sat, 6 Jun 2020 18:22:49 +0800 Subject: [PATCH] drivers/led: Decopule USERLED from ARCH_HAVE_LEDS and let USERLED_LOWER depends on ARCH_HAVE_LEDS instead Signed-off-by: Xiang Xiao Change-Id: Ie03e76d90b61a3d8d3457ccdd319a247b6075fa8 --- drivers/leds/Kconfig | 2 +- include/nuttx/leds/userled.h | 12 ++++++------ 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/drivers/leds/Kconfig b/drivers/leds/Kconfig index ff9e87276a..aa0f5730b2 100644 --- a/drivers/leds/Kconfig +++ b/drivers/leds/Kconfig @@ -8,7 +8,6 @@ menu "LED Support" config USERLED bool "LED driver" default n - depends on ARCH_HAVE_LEDS ---help--- Enable standard user LED upper half driver. @@ -17,6 +16,7 @@ if USERLED config USERLED_LOWER bool "Generic Lower Half LED Driver" default n + depends on ARCH_HAVE_LEDS ---help--- If the board supports the standard LED interfaces as defined in include/nuttx/board.h header file, then this diff --git a/include/nuttx/leds/userled.h b/include/nuttx/leds/userled.h index f0a027808a..2beb1c933c 100644 --- a/include/nuttx/leds/userled.h +++ b/include/nuttx/leds/userled.h @@ -1,4 +1,4 @@ -/************************************************************************************ +/**************************************************************************** * include/nuttx/leds/userled.h * * Copyright (C) 2015 Gregory Nutt. All rights reserved. @@ -31,7 +31,7 @@ * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * - ************************************************************************************/ + ****************************************************************************/ #ifndef __INCLUDE_NUTTX_LEDS_USERLED_H #define __INCLUDE_NUTTX_LEDS_USERLED_H @@ -43,11 +43,10 @@ #include #include -#ifdef CONFIG_ARCH_HAVE_LEDS - /**************************************************************************** * Pre-processor Definitions ****************************************************************************/ + /* ioctl commands */ /* Command: ULEDIOC_SUPPORTED @@ -91,6 +90,7 @@ /**************************************************************************** * Public Types ****************************************************************************/ + /* This type is a bit set that contains the state of all LEDs as defined * in arch/board/board.h. This is the value that is returned when reading * from or writing to the LED driver. @@ -127,7 +127,8 @@ struct userled_lowerhalf_s { /* Return the set of LEDs supported by the board */ - CODE userled_set_t (*ll_supported)(FAR const struct userled_lowerhalf_s *lower); + CODE userled_set_t + (*ll_supported)(FAR const struct userled_lowerhalf_s *lower); /* Set the current state of one LED */ @@ -197,5 +198,4 @@ int userled_lower_initialize(FAR const char *devname); } #endif -#endif /* CONFIG_ARCH_HAVE_LEDS */ #endif /* __INCLUDE_NUTTX_LEDS_USERLED_H */