input/button: Remove the couple from uinput

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
This commit is contained in:
Xiang Xiao 2022-02-26 23:06:45 +08:00 committed by Petro Karashchenko
parent fa761a8a6a
commit 63c911fb56
1 changed files with 2 additions and 12 deletions

View File

@ -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