From 63c911fb56495f91125ed2cea30db61c75fccf86 Mon Sep 17 00:00:00 2001 From: Xiang Xiao Date: Sat, 26 Feb 2022 23:06:45 +0800 Subject: [PATCH] input/button: Remove the couple from uinput Signed-off-by: Xiang Xiao --- 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 b6899be301..24937244e7 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