You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by pk...@apache.org on 2022/02/27 21:19:31 UTC

[incubator-nuttx] 01/02: input/button: Remove the couple from uinput

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

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

commit 63c911fb56495f91125ed2cea30db61c75fccf86
Author: Xiang Xiao <xi...@xiaomi.com>
AuthorDate: Sat Feb 26 23:06:45 2022 +0800

    input/button: Remove the couple from uinput
    
    Signed-off-by: Xiang Xiao <xi...@xiaomi.com>
---
 drivers/input/button_upper.c | 14 ++------------
 1 file changed, 2 insertions(+), 12 deletions(-)

diff --git a/drivers/input/button_upper.c b/drivers/input/button_upper.c
index b6899be..2493724 100644
--- a/drivers/input/button_upper.c
+++ b/drivers/input/button_upper.c
@@ -124,16 +124,13 @@ static int     btn_open(FAR struct file *filep);
 static int     btn_close(FAR struct file *filep);
 static ssize_t btn_read(FAR struct file *filep, FAR char *buffer,
                         size_t buflen);
+static ssize_t btn_write(FAR struct file *filep, FAR const char *buffer,
+                         size_t buflen);
 static int     btn_ioctl(FAR struct file *filep, int cmd,
                          unsigned long arg);
 static int     btn_poll(FAR struct file *filep, FAR struct pollfd *fds,
                         bool setup);
 
-#ifdef CONFIG_INPUT_UINPUT
-static ssize_t btn_write(FAR struct file *filep, FAR const char *buffer,
-                         size_t buflen);
-#endif
-
 /****************************************************************************
  * Private Data
  ****************************************************************************/
@@ -143,11 +140,7 @@ static const struct file_operations btn_fops =
   btn_open,  /* open */
   btn_close, /* close */
   btn_read,  /* read */
-#ifdef CONFIG_INPUT_UINPUT
   btn_write, /* write */
-#else
-  NULL,      /* write */
-#endif
   NULL,      /* seek */
   btn_ioctl, /* ioctl */
   btn_poll   /* poll */
@@ -544,8 +537,6 @@ static ssize_t btn_read(FAR struct file *filep, FAR char *buffer,
  * Name: btn_write
  ****************************************************************************/
 
-#ifdef CONFIG_INPUT_UINPUT
-
 static ssize_t btn_write(FAR struct file *filep, FAR const char *buffer,
                          size_t buflen)
 {
@@ -596,7 +587,6 @@ static ssize_t btn_write(FAR struct file *filep, FAR const char *buffer,
   btn_givesem(&priv->bu_exclsem);
   return (ssize_t)ret;
 }
-#endif
 
 /****************************************************************************
  * Name: btn_ioctl