Squashed commit of the following:

arch/:  Removed all references to CONFIG_DISABLE_POLL.  The standard POSIX poll() can not longer be disabled.
    sched/ audio/ crypto/:  Removed all references to CONFIG_DISABLE_POLL.  The standard POSIX poll() can not longer be disabled.
    Documentation/:  Removed all references to CONFIG_DISABLE_POLL.  The standard POSIX poll() can not longer be disabled.
    fs/:  Removed all references to CONFIG_DISABLE_POLL.  The standard POSIX poll() can not longer be disabled.
    graphics/:  Removed all references to CONFIG_DISABLE_POLL.  The standard POSIX poll() can not longer be disabled.
    net/:  Removed all references to CONFIG_DISABLE_POLL.  The standard POSIX poll() can not longer be disabled.
    drivers/:  Removed all references to CONFIG_DISABLE_POLL.  The standard POSIX poll() can not longer be disabled.
    include/, syscall/, wireless/:  Removed all references to CONFIG_DISABLE_POLL.  The standard POSIX poll() can not longer be disabled.
    configs/:  Remove all references to CONFIG_DISABLE_POLL.  Standard POSIX poll can no longer be disabled.
This commit is contained in:
Gregory Nutt
2019-05-21 18:57:54 -06:00
parent 3ab2b82b63
commit b49be4bb20
516 changed files with 424 additions and 1705 deletions
-9
View File
@@ -51,7 +51,6 @@ config TSC2007_MULTIPLE
config TSC2007_NPOLLWAITERS
int "Number TSC2007 poll waiters"
default 4
depends on !DISABLE_POLL
---help---
Maximum number of threads that can be waiting on poll()
@@ -125,7 +124,6 @@ endif # FT5X06_SINGLEPOINT
config FT5X06_NPOLLWAITERS
int "Number FT5336/FT5x06 poll waiters"
default 4
depends on !DISABLE_POLL
---help---
Maximum number of threads that can be waiting on poll()
@@ -151,7 +149,6 @@ config ADS7843E_MULTIPLE
config ADS7843E_NPOLLWAITERS
int "Number poll waiters"
default 4
depends on !DISABLE_POLL
---help---
Maximum number of threads that can be waiting on poll()
@@ -246,7 +243,6 @@ config MXT_THRESHY
config MXT_NPOLLWAITERS
int "Number poll waiters"
default 4
depends on !DISABLE_POLL
---help---
Maximum number of threads that can be waiting on poll()
@@ -320,7 +316,6 @@ config STMPE811_MULTIPLE
config STMPE811_NPOLLWAITERS
int "Number poll waiters"
default 4
depends on !DISABLE_POLL
---help---
Maximum number of threads that can be waiting on poll()
@@ -459,7 +454,6 @@ config BUTTONS_LOWER
config BUTTONS_NPOLLWAITERS
int "Max Number of Poll Waiters"
default 2
depends on !DISABLE_POLL
endif # BUTTONS
@@ -478,7 +472,6 @@ if DJOYSTICK
config DJOYSTICK_NPOLLWAITERS
int "Max Number of Poll Waiters"
default 2
depends on !DISABLE_POLL
endif # DJOYSTICK
@@ -497,7 +490,6 @@ if AJOYSTICK
config AJOYSTICK_NPOLLWAITERS
int "Max Number of Poll Waiters"
default 2
depends on !DISABLE_POLL
endif # AJOYSTICK
@@ -516,6 +508,5 @@ if INPUT_NUNCHUCK
config NUNCHUCK_NPOLLWAITERS
int "Max Number of Poll Waiters"
default 2
depends on !DISABLE_POLL
endif # INPUT_NUNCHUCK
+2 -16
View File
@@ -119,9 +119,7 @@ static int ads7843e_open(FAR struct file *filep);
static int ads7843e_close(FAR struct file *filep);
static ssize_t ads7843e_read(FAR struct file *filep, FAR char *buffer, size_t len);
static int ads7843e_ioctl(FAR struct file *filep, int cmd, unsigned long arg);
#ifndef CONFIG_DISABLE_POLL
static int ads7843e_poll(FAR struct file *filep, struct pollfd *fds, bool setup);
#endif
/****************************************************************************
* Private Data
@@ -136,10 +134,8 @@ static const struct file_operations ads7843e_fops =
ads7843e_read, /* read */
0, /* write */
0, /* seek */
ads7843e_ioctl /* ioctl */
#ifndef CONFIG_DISABLE_POLL
, ads7843e_poll /* poll */
#endif
ads7843e_ioctl, /* ioctl */
ads7843e_poll /* poll */
};
/* If only a single ADS7843E device is supported, then the driver state
@@ -292,9 +288,7 @@ static uint16_t ads7843e_sendcmd(FAR struct ads7843e_dev_s *priv, uint8_t cmd)
static void ads7843e_notify(FAR struct ads7843e_dev_s *priv)
{
#ifndef CONFIG_DISABLE_POLL
int i;
#endif
/* If there are threads waiting for read data, then signal one of them
* that the read data is available.
@@ -315,7 +309,6 @@ static void ads7843e_notify(FAR struct ads7843e_dev_s *priv)
* then some make end up blocking after all.
*/
#ifndef CONFIG_DISABLE_POLL
for (i = 0; i < CONFIG_ADS7843E_NPOLLWAITERS; i++)
{
struct pollfd *fds = priv->fds[i];
@@ -326,7 +319,6 @@ static void ads7843e_notify(FAR struct ads7843e_dev_s *priv)
nxsem_post(fds->sem);
}
}
#endif
}
/****************************************************************************
@@ -1035,7 +1027,6 @@ static int ads7843e_ioctl(FAR struct file *filep, int cmd, unsigned long arg)
* Name: ads7843e_poll
****************************************************************************/
#ifndef CONFIG_DISABLE_POLL
static int ads7843e_poll(FAR struct file *filep, FAR struct pollfd *fds,
bool setup)
{
@@ -1121,11 +1112,6 @@ errout:
nxsem_post(&priv->devsem);
return ret;
}
#endif
/****************************************************************************
* Public Functions
****************************************************************************/
/****************************************************************************
* Public Functions
-2
View File
@@ -156,9 +156,7 @@ struct ads7843e_dev_s
* retained in the f_priv field of the 'struct file'.
*/
#ifndef CONFIG_DISABLE_POLL
struct pollfd *fds[CONFIG_ADS7843E_NPOLLWAITERS];
#endif
};
/********************************************************************************************
+2 -33
View File
@@ -106,7 +106,6 @@ struct ajoy_open_s
struct ajoy_notify_s ao_notify;
struct sigwork_s ao_work;
#ifndef CONFIG_DISABLE_POLL
/* Poll event information */
struct ajoy_pollevents_s ao_pollevents;
@@ -116,7 +115,6 @@ struct ajoy_open_s
*/
FAR struct pollfd *ao_fds[CONFIG_AJOYSTICK_NPOLLWAITERS];
#endif
};
/****************************************************************************
@@ -130,11 +128,9 @@ static inline int ajoy_takesem(sem_t *sem);
/* Sampling and Interrupt handling */
#ifndef CONFIG_DISABLE_POLL
static void ajoy_enable(FAR struct ajoy_upperhalf_s *priv);
static void ajoy_interrupt(FAR const struct ajoy_lowerhalf_s *lower,
FAR void *arg);
#endif
/* Sampling */
@@ -148,10 +144,8 @@ static ssize_t ajoy_read(FAR struct file *filep, FAR char *buffer,
size_t buflen);
static int ajoy_ioctl(FAR struct file *filep, int cmd,
unsigned long arg);
#ifndef CONFIG_DISABLE_POLL
static int ajoy_poll(FAR struct file *filep, FAR struct pollfd *fds,
bool setup);
#endif
/****************************************************************************
* Private Data
@@ -164,10 +158,8 @@ static const struct file_operations ajoy_fops =
ajoy_read, /* read */
0, /* write */
0, /* seek */
ajoy_ioctl /* ioctl */
#ifndef CONFIG_DISABLE_POLL
, ajoy_poll /* poll */
#endif
ajoy_ioctl, /* ioctl */
ajoy_poll /* poll */
};
/****************************************************************************
@@ -198,7 +190,6 @@ static inline int ajoy_takesem(sem_t *sem)
* Name: ajoy_enable
****************************************************************************/
#ifndef CONFIG_DISABLE_POLL
static void ajoy_enable(FAR struct ajoy_upperhalf_s *priv)
{
FAR const struct ajoy_lowerhalf_s *lower;
@@ -206,9 +197,7 @@ static void ajoy_enable(FAR struct ajoy_upperhalf_s *priv)
ajoy_buttonset_t press;
ajoy_buttonset_t release;
irqstate_t flags;
#ifndef CONFIG_DISABLE_POLL
int i;
#endif
DEBUGASSERT(priv);
lower = priv->au_lower;
@@ -227,7 +216,6 @@ static void ajoy_enable(FAR struct ajoy_upperhalf_s *priv)
for (opriv = priv->au_open; opriv; opriv = opriv->ao_flink)
{
#ifndef CONFIG_DISABLE_POLL
/* Are there any poll waiters? */
for (i = 0; i < CONFIG_AJOYSTICK_NPOLLWAITERS; i++)
@@ -268,13 +256,11 @@ static void ajoy_enable(FAR struct ajoy_upperhalf_s *priv)
leave_critical_section(flags);
}
#endif
/****************************************************************************
* Name: ajoy_interrupt
****************************************************************************/
#ifndef CONFIG_DISABLE_POLL
static void ajoy_interrupt(FAR const struct ajoy_lowerhalf_s *lower,
FAR void *arg)
{
@@ -286,7 +272,6 @@ static void ajoy_interrupt(FAR const struct ajoy_lowerhalf_s *lower,
ajoy_sample(priv);
}
#endif
/****************************************************************************
* Name: ajoy_sample
@@ -297,15 +282,11 @@ static void ajoy_sample(FAR struct ajoy_upperhalf_s *priv)
FAR const struct ajoy_lowerhalf_s *lower;
FAR struct ajoy_open_s *opriv;
ajoy_buttonset_t sample;
#ifndef CONFIG_DISABLE_POLL
ajoy_buttonset_t change;
ajoy_buttonset_t press;
ajoy_buttonset_t release;
#endif
irqstate_t flags;
#ifndef CONFIG_DISABLE_POLL
int i;
#endif
DEBUGASSERT(priv);
lower = priv->au_lower;
@@ -324,7 +305,6 @@ static void ajoy_sample(FAR struct ajoy_upperhalf_s *priv)
add_ui_randomness(sample);
#ifndef CONFIG_DISABLE_POLL
/* Determine which buttons have been newly pressed and which have been
* newly released.
*/
@@ -339,7 +319,6 @@ static void ajoy_sample(FAR struct ajoy_upperhalf_s *priv)
for (opriv = priv->au_open; opriv; opriv = opriv->ao_flink)
{
#ifndef CONFIG_DISABLE_POLL
/* Have any poll events occurred? */
if ((press & opriv->ao_pollevents.ap_press) != 0 ||
@@ -361,7 +340,6 @@ static void ajoy_sample(FAR struct ajoy_upperhalf_s *priv)
}
}
}
#endif
/* Have any signal events occurred? */
@@ -379,7 +357,6 @@ static void ajoy_sample(FAR struct ajoy_upperhalf_s *priv)
/* Enable/disable interrupt handling */
ajoy_enable(priv);
#endif
priv->au_sample = sample;
leave_critical_section(flags);
@@ -394,10 +371,8 @@ static int ajoy_open(FAR struct file *filep)
FAR struct inode *inode;
FAR struct ajoy_upperhalf_s *priv;
FAR struct ajoy_open_s *opriv;
#ifndef CONFIG_DISABLE_POLL
FAR const struct ajoy_lowerhalf_s *lower;
ajoy_buttonset_t supported;
#endif
int ret;
DEBUGASSERT(filep && filep->f_inode);
@@ -426,14 +401,12 @@ static int ajoy_open(FAR struct file *filep)
/* Initialize the open structure */
#ifndef CONFIG_DISABLE_POLL
lower = priv->au_lower;
DEBUGASSERT(lower && lower->al_supported);
supported = lower->al_supported(lower);
opriv->ao_pollevents.ap_press = supported;
opriv->ao_pollevents.ap_release = supported;
#endif
/* Attach the open structure to the device */
@@ -652,7 +625,6 @@ static int ajoy_ioctl(FAR struct file *filep, int cmd, unsigned long arg)
}
break;
#ifndef CONFIG_DISABLE_POLL
/* Command: AJOYIOC_POLLEVENTS
* Description: Specify the set of button events that can cause a poll()
* to awaken. The default is all button depressions and
@@ -682,7 +654,6 @@ static int ajoy_ioctl(FAR struct file *filep, int cmd, unsigned long arg)
}
}
break;
#endif
/* Command: AJOYIOC_REGISTER
* Description: Register to receive a signal whenever there is a change
@@ -731,7 +702,6 @@ static int ajoy_ioctl(FAR struct file *filep, int cmd, unsigned long arg)
* Name: ajoy_poll
****************************************************************************/
#ifndef CONFIG_DISABLE_POLL
static int ajoy_poll(FAR struct file *filep, FAR struct pollfd *fds,
bool setup)
{
@@ -811,7 +781,6 @@ errout_with_dusem:
ajoy_givesem(&priv->au_exclsem);
return ret;
}
#endif
/****************************************************************************
* Public Functions
+2 -32
View File
@@ -102,7 +102,6 @@ struct btn_open_s
struct btn_notify_s bo_notify;
struct sigwork_s bo_work;
#ifndef CONFIG_DISABLE_POLL
/* Poll event information */
struct btn_pollevents_s bo_pollevents;
@@ -112,7 +111,6 @@ struct btn_open_s
*/
FAR struct pollfd *bo_fds[CONFIG_BUTTONS_NPOLLWAITERS];
#endif
};
/****************************************************************************
@@ -126,11 +124,9 @@ static inline int btn_takesem(sem_t *sem);
/* Sampling and Interrupt handling */
#ifndef CONFIG_DISABLE_POLL
static void btn_enable(FAR struct btn_upperhalf_s *priv);
static void btn_interrupt(FAR const struct btn_lowerhalf_s *lower,
FAR void *arg);
#endif
/* Sampling */
@@ -144,10 +140,8 @@ static ssize_t btn_read(FAR struct file *filep, FAR char *buffer,
size_t buflen);
static int btn_ioctl(FAR struct file *filep, int cmd,
unsigned long arg);
#ifndef CONFIG_DISABLE_POLL
static int btn_poll(FAR struct file *filep, FAR struct pollfd *fds,
bool setup);
#endif
/****************************************************************************
* Private Data
@@ -160,10 +154,8 @@ static const struct file_operations btn_fops =
btn_read, /* read */
NULL, /* write */
NULL, /* seek */
btn_ioctl /* ioctl */
#ifndef CONFIG_DISABLE_POLL
, btn_poll /* poll */
#endif
btn_ioctl, /* ioctl */
btn_poll /* poll */
};
/****************************************************************************
@@ -194,7 +186,6 @@ static inline int btn_takesem(sem_t *sem)
* Name: btn_enable
****************************************************************************/
#ifndef CONFIG_DISABLE_POLL
static void btn_enable(FAR struct btn_upperhalf_s *priv)
{
FAR const struct btn_lowerhalf_s *lower;
@@ -219,12 +210,10 @@ static void btn_enable(FAR struct btn_upperhalf_s *priv)
for (opriv = priv->bu_open; opriv; opriv = opriv->bo_flink)
{
#ifndef CONFIG_DISABLE_POLL
/* OR in the poll event buttons */
press |= opriv->bo_pollevents.bp_press;
release |= opriv->bo_pollevents.bp_release;
#endif
/* OR in the signal events */
@@ -251,13 +240,11 @@ static void btn_enable(FAR struct btn_upperhalf_s *priv)
leave_critical_section(flags);
}
#endif
/****************************************************************************
* Name: btn_interrupt
****************************************************************************/
#ifndef CONFIG_DISABLE_POLL
static void btn_interrupt(FAR const struct btn_lowerhalf_s *lower,
FAR void *arg)
{
@@ -269,7 +256,6 @@ static void btn_interrupt(FAR const struct btn_lowerhalf_s *lower,
btn_sample(priv);
}
#endif
/****************************************************************************
* Name: btn_sample
@@ -280,15 +266,11 @@ static void btn_sample(FAR struct btn_upperhalf_s *priv)
FAR const struct btn_lowerhalf_s *lower;
FAR struct btn_open_s *opriv;
btn_buttonset_t sample;
#ifndef CONFIG_DISABLE_POLL
btn_buttonset_t change;
btn_buttonset_t press;
btn_buttonset_t release;
#endif
irqstate_t flags;
#ifndef CONFIG_DISABLE_POLL
int i;
#endif
DEBUGASSERT(priv && priv->bu_lower);
lower = priv->bu_lower;
@@ -306,7 +288,6 @@ static void btn_sample(FAR struct btn_upperhalf_s *priv)
add_ui_randomness(sample);
#ifndef CONFIG_DISABLE_POLL
/* Determine which buttons have been newly pressed and which have been
* newly released.
*/
@@ -321,7 +302,6 @@ static void btn_sample(FAR struct btn_upperhalf_s *priv)
for (opriv = priv->bu_open; opriv; opriv = opriv->bo_flink)
{
#ifndef CONFIG_DISABLE_POLL
/* Have any poll events occurred? */
if ((press & opriv->bo_pollevents.bp_press) != 0 ||
@@ -343,7 +323,6 @@ static void btn_sample(FAR struct btn_upperhalf_s *priv)
}
}
}
#endif
/* Have any signal events occurred? */
@@ -361,7 +340,6 @@ static void btn_sample(FAR struct btn_upperhalf_s *priv)
/* Enable/disable interrupt handling */
btn_enable(priv);
#endif
priv->bu_sample = sample;
leave_critical_section(flags);
@@ -376,10 +354,8 @@ static int btn_open(FAR struct file *filep)
FAR struct inode *inode;
FAR struct btn_upperhalf_s *priv;
FAR struct btn_open_s *opriv;
#ifndef CONFIG_DISABLE_POLL
FAR const struct btn_lowerhalf_s *lower;
btn_buttonset_t supported;
#endif
int ret;
DEBUGASSERT(filep && filep->f_inode);
@@ -408,14 +384,12 @@ static int btn_open(FAR struct file *filep)
/* Initialize the open structure */
#ifndef CONFIG_DISABLE_POLL
lower = priv->bu_lower;
DEBUGASSERT(lower && lower->bl_supported);
supported = lower->bl_supported(lower);
opriv->bo_pollevents.bp_press = supported;
opriv->bo_pollevents.bp_release = supported;
#endif
/* Attach the open structure to the device */
@@ -635,7 +609,6 @@ static int btn_ioctl(FAR struct file *filep, int cmd, unsigned long arg)
}
break;
#ifndef CONFIG_DISABLE_POLL
/* Command: BTNIOC_POLLEVENTS
* Description: Specify the set of button events that can cause a poll()
* to awaken. The default is all button depressions and
@@ -665,7 +638,6 @@ static int btn_ioctl(FAR struct file *filep, int cmd, unsigned long arg)
}
}
break;
#endif
/* Command: BTNIOC_REGISTER
* Description: Register to receive a signal whenever there is a change
@@ -714,7 +686,6 @@ static int btn_ioctl(FAR struct file *filep, int cmd, unsigned long arg)
* Name: btn_poll
****************************************************************************/
#ifndef CONFIG_DISABLE_POLL
static int btn_poll(FAR struct file *filep, FAR struct pollfd *fds,
bool setup)
{
@@ -795,7 +766,6 @@ errout_with_dusem:
btn_givesem(&priv->bu_exclsem);
return ret;
}
#endif
/****************************************************************************
* Public Functions
+3 -15
View File
@@ -210,9 +210,7 @@ struct mbr3108_dev_s
struct mbr3108_debug_conf_s debug_conf;
bool int_pending;
#ifndef CONFIG_DISABLE_POLL
struct pollfd *fds[CONFIG_INPUT_CYPRESS_MBR3108_NPOLLWAITERS];
#endif
};
/****************************************************************************
@@ -225,10 +223,8 @@ static ssize_t mbr3108_read(FAR struct file *filep, FAR char *buffer,
size_t buflen);
static ssize_t mbr3108_write(FAR struct file *filep, FAR const char *buffer,
size_t buflen);
#ifndef CONFIG_DISABLE_POLL
static int mbr3108_poll(FAR struct file *filep, FAR struct pollfd *fds,
bool setup);
#endif
/****************************************************************************
* Private Data
@@ -240,11 +236,9 @@ static const struct file_operations g_mbr3108_fileops =
mbr3108_close, /* close */
mbr3108_read, /* read */
mbr3108_write, /* write */
0, /* seek */
0 /* ioctl */
#ifndef CONFIG_DISABLE_POLL
, mbr3108_poll /* poll */
#endif
NULL, /* seek */
NULL, /* ioctl */
mbr3108_poll /* poll */
};
/****************************************************************************
@@ -1006,8 +1000,6 @@ static int mbr3108_close(FAR struct file *filep)
return 0;
}
#ifndef CONFIG_DISABLE_POLL
static void mbr3108_poll_notify(FAR struct mbr3108_dev_s *priv)
{
int i;
@@ -1108,8 +1100,6 @@ out:
return ret;
}
#endif /* !CONFIG_DISABLE_POLL */
static int mbr3108_isr_handler(int irq, FAR void *context, FAR void *arg)
{
FAR struct mbr3108_dev_s *priv = (FAR struct mbr3108_dev_s *)arg;
@@ -1121,9 +1111,7 @@ static int mbr3108_isr_handler(int irq, FAR void *context, FAR void *arg)
priv->int_pending = true;
leave_critical_section(flags);
#ifndef CONFIG_DISABLE_POLL
mbr3108_poll_notify(priv);
#endif
return 0;
}
+2 -34
View File
@@ -106,7 +106,6 @@ struct djoy_open_s
struct djoy_notify_s do_notify;
struct sigwork_s do_work;
#ifndef CONFIG_DISABLE_POLL
/* Poll event information */
struct djoy_pollevents_s do_pollevents;
@@ -116,7 +115,6 @@ struct djoy_open_s
*/
FAR struct pollfd *do_fds[CONFIG_DJOYSTICK_NPOLLWAITERS];
#endif
};
/****************************************************************************
@@ -130,11 +128,9 @@ static inline int djoy_takesem(sem_t *sem);
/* Sampling and Interrupt handling */
#ifndef CONFIG_DISABLE_POLL
static void djoy_enable(FAR struct djoy_upperhalf_s *priv);
static void djoy_interrupt(FAR const struct djoy_lowerhalf_s *lower,
FAR void *arg);
#endif
/* Sampling */
@@ -148,10 +144,8 @@ static ssize_t djoy_read(FAR struct file *filep, FAR char *buffer,
size_t buflen);
static int djoy_ioctl(FAR struct file *filep, int cmd,
unsigned long arg);
#ifndef CONFIG_DISABLE_POLL
static int djoy_poll(FAR struct file *filep, FAR struct pollfd *fds,
bool setup);
#endif
/****************************************************************************
* Private Data
@@ -164,10 +158,8 @@ static const struct file_operations djoy_fops =
djoy_read, /* read */
0, /* write */
0, /* seek */
djoy_ioctl /* ioctl */
#ifndef CONFIG_DISABLE_POLL
, djoy_poll /* poll */
#endif
djoy_ioctl, /* ioctl */
djoy_poll /* poll */
};
/****************************************************************************
@@ -198,7 +190,6 @@ static inline int djoy_takesem(sem_t *sem)
* Name: djoy_enable
****************************************************************************/
#ifndef CONFIG_DISABLE_POLL
static void djoy_enable(FAR struct djoy_upperhalf_s *priv)
{
FAR const struct djoy_lowerhalf_s *lower;
@@ -206,9 +197,7 @@ static void djoy_enable(FAR struct djoy_upperhalf_s *priv)
djoy_buttonset_t press;
djoy_buttonset_t release;
irqstate_t flags;
#ifndef CONFIG_DISABLE_POLL
int i;
#endif
DEBUGASSERT(priv);
lower = priv->du_lower;
@@ -227,7 +216,6 @@ static void djoy_enable(FAR struct djoy_upperhalf_s *priv)
for (opriv = priv->du_open; opriv; opriv = opriv->do_flink)
{
#ifndef CONFIG_DISABLE_POLL
/* Are there any poll waiters? */
for (i = 0; i < CONFIG_DJOYSTICK_NPOLLWAITERS; i++)
@@ -241,7 +229,6 @@ static void djoy_enable(FAR struct djoy_upperhalf_s *priv)
break;
}
}
#endif
/* OR in the signal events */
@@ -268,13 +255,11 @@ static void djoy_enable(FAR struct djoy_upperhalf_s *priv)
leave_critical_section(flags);
}
#endif
/****************************************************************************
* Name: djoy_interrupt
****************************************************************************/
#ifndef CONFIG_DISABLE_POLL
static void djoy_interrupt(FAR const struct djoy_lowerhalf_s *lower,
FAR void *arg)
{
@@ -286,7 +271,6 @@ static void djoy_interrupt(FAR const struct djoy_lowerhalf_s *lower,
djoy_sample(priv);
}
#endif
/****************************************************************************
* Name: djoy_sample
@@ -297,15 +281,11 @@ static void djoy_sample(FAR struct djoy_upperhalf_s *priv)
FAR const struct djoy_lowerhalf_s *lower;
FAR struct djoy_open_s *opriv;
djoy_buttonset_t sample;
#ifndef CONFIG_DISABLE_POLL
djoy_buttonset_t change;
djoy_buttonset_t press;
djoy_buttonset_t release;
#endif
irqstate_t flags;
#ifndef CONFIG_DISABLE_POLL
int i;
#endif
DEBUGASSERT(priv);
lower = priv->du_lower;
@@ -324,7 +304,6 @@ static void djoy_sample(FAR struct djoy_upperhalf_s *priv)
add_ui_randomness(sample);
#ifndef CONFIG_DISABLE_POLL
/* Determine which buttons have been newly pressed and which have been
* newly released.
*/
@@ -339,7 +318,6 @@ static void djoy_sample(FAR struct djoy_upperhalf_s *priv)
for (opriv = priv->du_open; opriv; opriv = opriv->do_flink)
{
#ifndef CONFIG_DISABLE_POLL
/* Have any poll events occurred? */
if ((press & opriv->do_pollevents.dp_press) != 0 ||
@@ -361,7 +339,6 @@ static void djoy_sample(FAR struct djoy_upperhalf_s *priv)
}
}
}
#endif
/* Have any signal events occurred? */
@@ -379,7 +356,6 @@ static void djoy_sample(FAR struct djoy_upperhalf_s *priv)
/* Enable/disable interrupt handling */
djoy_enable(priv);
#endif
priv->du_sample = sample;
leave_critical_section(flags);
@@ -394,10 +370,8 @@ static int djoy_open(FAR struct file *filep)
FAR struct inode *inode;
FAR struct djoy_upperhalf_s *priv;
FAR struct djoy_open_s *opriv;
#ifndef CONFIG_DISABLE_POLL
FAR const struct djoy_lowerhalf_s *lower;
djoy_buttonset_t supported;
#endif
int ret;
DEBUGASSERT(filep && filep->f_inode);
@@ -426,14 +400,12 @@ static int djoy_open(FAR struct file *filep)
/* Initialize the open structure */
#ifndef CONFIG_DISABLE_POLL
lower = priv->du_lower;
DEBUGASSERT(lower && lower->dl_supported);
supported = lower->dl_supported(lower);
opriv->do_pollevents.dp_press = supported;
opriv->do_pollevents.dp_release = supported;
#endif
/* Attach the open structure to the device */
@@ -648,7 +620,6 @@ static int djoy_ioctl(FAR struct file *filep, int cmd, unsigned long arg)
}
break;
#ifndef CONFIG_DISABLE_POLL
/* Command: DJOYIOC_POLLEVENTS
* Description: Specify the set of button events that can cause a poll()
* to awaken. The default is all button depressions and
@@ -678,7 +649,6 @@ static int djoy_ioctl(FAR struct file *filep, int cmd, unsigned long arg)
}
}
break;
#endif
/* Command: DJOYIOC_REGISTER
* Description: Register to receive a signal whenever there is a change
@@ -727,7 +697,6 @@ static int djoy_ioctl(FAR struct file *filep, int cmd, unsigned long arg)
* Name: djoy_poll
****************************************************************************/
#ifndef CONFIG_DISABLE_POLL
static int djoy_poll(FAR struct file *filep, FAR struct pollfd *fds,
bool setup)
{
@@ -807,7 +776,6 @@ errout_with_dusem:
djoy_givesem(&priv->du_exclsem);
return ret;
}
#endif
/****************************************************************************
* Public Functions
+2 -14
View File
@@ -144,14 +144,12 @@ struct ft5x06_dev_s
#endif
uint8_t touchbuf[FT5x06_TOUCH_DATA_LEN]; /* Raw touch data */
#ifndef CONFIG_DISABLE_POLL
/* The following is a list if poll structures of threads waiting for
* driver events. The 'struct pollfd' reference for each open is also
* retained in the f_priv field of the 'struct file'.
*/
struct pollfd *fds[CONFIG_FT5X06_NPOLLWAITERS];
#endif
};
/****************************************************************************
@@ -180,10 +178,8 @@ static ssize_t ft5x06_read(FAR struct file *filep, FAR char *buffer,
size_t len);
static int ft5x06_ioctl(FAR struct file *filep, int cmd,
unsigned long arg);
#ifndef CONFIG_DISABLE_POLL
static int ft5x06_poll(FAR struct file *filep, struct pollfd *fds,
bool setup);
#endif
/****************************************************************************
* Private Data
@@ -198,10 +194,8 @@ static const struct file_operations ft5x06_fops =
ft5x06_read, /* read */
NULL, /* write */
NULL, /* seek */
ft5x06_ioctl /* ioctl */
#ifndef CONFIG_DISABLE_POLL
, ft5x06_poll /* poll */
#endif
ft5x06_ioctl, /* ioctl */
ft5x06_poll /* poll */
#ifndef CONFIG_DISABLE_PSEUDOFS_OPERATIONS
, NULL /* unlink */
#endif
@@ -227,9 +221,7 @@ static const uint8_t g_event_map[4] =
static void ft5x06_notify(FAR struct ft5x06_dev_s *priv)
{
#ifndef CONFIG_DISABLE_POLL
int i;
#endif
/* If there are threads waiting for read data, then signal one of them
* that the read data is available.
@@ -244,7 +236,6 @@ static void ft5x06_notify(FAR struct ft5x06_dev_s *priv)
nxsem_post(&priv->waitsem);
}
#ifndef CONFIG_DISABLE_POLL
/* If there are threads waiting on poll() for FT5x06 data to become available,
* then wake them up now. NOTE: we wake up all waiting threads because we
* do not know that they are going to do. If they all try to read the data,
@@ -261,7 +252,6 @@ static void ft5x06_notify(FAR struct ft5x06_dev_s *priv)
nxsem_post(fds->sem);
}
}
#endif
}
/****************************************************************************
@@ -1034,7 +1024,6 @@ static int ft5x06_ioctl(FAR struct file *filep, int cmd, unsigned long arg)
* Name: ft5x06_poll
****************************************************************************/
#ifndef CONFIG_DISABLE_POLL
static int ft5x06_poll(FAR struct file *filep, FAR struct pollfd *fds,
bool setup)
{
@@ -1123,7 +1112,6 @@ errout:
nxsem_post(&priv->devsem);
return ret;
}
#endif
/****************************************************************************
* Public Functions
+2 -12
View File
@@ -114,10 +114,8 @@ static ssize_t max11802_read(FAR struct file *filep, FAR char *buffer,
size_t len);
static int max11802_ioctl(FAR struct file *filep, int cmd,
unsigned long arg);
#ifndef CONFIG_DISABLE_POLL
static int max11802_poll(FAR struct file *filep, struct pollfd *fds,
bool setup);
#endif
/****************************************************************************
* Private Data
@@ -132,10 +130,8 @@ static const struct file_operations max11802_fops =
max11802_read, /* read */
0, /* write */
0, /* seek */
max11802_ioctl /* ioctl */
#ifndef CONFIG_DISABLE_POLL
, max11802_poll /* poll */
#endif
max11802_ioctl, /* ioctl */
max11802_poll /* poll */
#ifndef CONFIG_DISABLE_PSEUDOFS_OPERATIONS
, 0 /* unlink */
#endif
@@ -256,9 +252,7 @@ static uint16_t max11802_sendcmd(FAR struct max11802_dev_s *priv,
static void max11802_notify(FAR struct max11802_dev_s *priv)
{
#ifndef CONFIG_DISABLE_POLL
int i;
#endif
/* If there are threads waiting for read data, then signal one of them
* that the read data is available.
@@ -279,7 +273,6 @@ static void max11802_notify(FAR struct max11802_dev_s *priv)
* all try to read the data, then some make end up blocking after all.
*/
#ifndef CONFIG_DISABLE_POLL
for (i = 0; i < CONFIG_MAX11802_NPOLLWAITERS; i++)
{
struct pollfd *fds = priv->fds[i];
@@ -290,7 +283,6 @@ static void max11802_notify(FAR struct max11802_dev_s *priv)
nxsem_post(fds->sem);
}
}
#endif
}
/****************************************************************************
@@ -1041,7 +1033,6 @@ static int max11802_ioctl(FAR struct file *filep, int cmd, unsigned long arg)
* Name: max11802_poll
****************************************************************************/
#ifndef CONFIG_DISABLE_POLL
static int max11802_poll(FAR struct file *filep, FAR struct pollfd *fds,
bool setup)
{
@@ -1127,7 +1118,6 @@ errout:
nxsem_post(&priv->devsem);
return ret;
}
#endif
/****************************************************************************
* Public Functions
-2
View File
@@ -148,9 +148,7 @@ struct max11802_dev_s
* retained in the f_priv field of the 'struct file'.
*/
#ifndef CONFIG_DISABLE_POLL
struct pollfd *fds[CONFIG_MAX11802_NPOLLWAITERS];
#endif
};
/********************************************************************************************
+2 -14
View File
@@ -214,9 +214,7 @@ struct mxt_dev_s
* retained in the f_priv field of the 'struct file'.
*/
#ifndef CONFIG_DISABLE_POLL
struct pollfd *fds[CONFIG_MXT_NPOLLWAITERS];
#endif
};
/****************************************************************************
@@ -271,9 +269,7 @@ static int mxt_close(FAR struct file *filep);
static ssize_t mxt_read(FAR struct file *filep, FAR char *buffer,
size_t len);
static int mxt_ioctl(FAR struct file *filep, int cmd, unsigned long arg);
#ifndef CONFIG_DISABLE_POLL
static int mxt_poll(FAR struct file *filep, struct pollfd *fds, bool setup);
#endif
/* Initialization */
@@ -293,10 +289,8 @@ static const struct file_operations mxt_fops =
mxt_read, /* read */
0, /* write */
0, /* seek */
mxt_ioctl /* ioctl */
#ifndef CONFIG_DISABLE_POLL
, mxt_poll /* poll */
#endif
mxt_ioctl, /* ioctl */
mxt_poll /* poll */
};
/****************************************************************************
@@ -598,9 +592,7 @@ static int mxt_flushmsgs(FAR struct mxt_dev_s *priv)
static void mxt_notify(FAR struct mxt_dev_s *priv)
{
#ifndef CONFIG_DISABLE_POLL
int i;
#endif
/* If there are threads waiting for read data, then signal one of them
* that the read data is available.
@@ -621,7 +613,6 @@ static void mxt_notify(FAR struct mxt_dev_s *priv)
* then some make end up blocking after all.
*/
#ifndef CONFIG_DISABLE_POLL
for (i = 0; i < CONFIG_MXT_NPOLLWAITERS; i++)
{
struct pollfd *fds = priv->fds[i];
@@ -632,7 +623,6 @@ static void mxt_notify(FAR struct mxt_dev_s *priv)
nxsem_post(fds->sem);
}
}
#endif
}
/****************************************************************************
@@ -1560,7 +1550,6 @@ static int mxt_ioctl(FAR struct file *filep, int cmd, unsigned long arg)
* Name: mxt_poll
****************************************************************************/
#ifndef CONFIG_DISABLE_POLL
static int mxt_poll(FAR struct file *filep, FAR struct pollfd *fds,
bool setup)
{
@@ -1648,7 +1637,6 @@ errout:
nxsem_post(&priv->devsem);
return ret;
}
#endif
/****************************************************************************
* Name: mxt_getinfo
+2 -4
View File
@@ -133,10 +133,8 @@ static const struct file_operations nunchuck_fops =
nunchuck_read, /* read */
NULL, /* write */
NULL, /* seek */
nunchuck_ioctl /* ioctl */
#ifndef CONFIG_DISABLE_POLL
, NULL /* poll */
#endif
nunchuck_ioctl, /* ioctl */
NULL /* poll */
#ifndef CONFIG_DISABLE_PSEUDOFS_OPERATIONS
, NULL /* unlink */
#endif
-2
View File
@@ -169,9 +169,7 @@ struct stmpe811_dev_s
* retained in the f_priv field of the 'struct file'.
*/
#ifndef CONFIG_DISABLE_POLL
struct pollfd *fds[CONFIG_STMPE811_NPOLLWAITERS];
#endif
#endif
/* Fields that may be disabled to save size of GPIO support is not used */
+4 -14
View File
@@ -125,10 +125,8 @@ static ssize_t stmpe811_read(FAR struct file *filep, FAR char *buffer,
size_t len);
static int stmpe811_ioctl(FAR struct file *filep, int cmd,
unsigned long arg);
#ifndef CONFIG_DISABLE_POLL
static int stmpe811_poll(FAR struct file *filep, struct pollfd *fds,
bool setup);
#endif
/* Initialization logic */
@@ -145,12 +143,10 @@ static const struct file_operations g_stmpe811fops =
stmpe811_open, /* open */
stmpe811_close, /* close */
stmpe811_read, /* read */
0, /* write */
0, /* seek */
stmpe811_ioctl /* ioctl */
#ifndef CONFIG_DISABLE_POLL
, stmpe811_poll /* poll */
#endif
NULL, /* write */
NULL, /* seek */
stmpe811_ioctl, /* ioctl */
stmpe811_poll /* poll */
};
/****************************************************************************
@@ -167,9 +163,7 @@ static const struct file_operations g_stmpe811fops =
static void stmpe811_notify(FAR struct stmpe811_dev_s *priv)
{
#ifndef CONFIG_DISABLE_POLL
int i;
#endif
/* If there are threads waiting for read data, then signal one of them
* that the read data is available.
@@ -190,7 +184,6 @@ static void stmpe811_notify(FAR struct stmpe811_dev_s *priv)
* then some make end up blocking after all.
*/
#ifndef CONFIG_DISABLE_POLL
for (i = 0; i < CONFIG_STMPE811_NPOLLWAITERS; i++)
{
struct pollfd *fds = priv->fds[i];
@@ -201,7 +194,6 @@ static void stmpe811_notify(FAR struct stmpe811_dev_s *priv)
nxsem_post(fds->sem);
}
}
#endif
}
/****************************************************************************
@@ -644,7 +636,6 @@ static int stmpe811_ioctl(FAR struct file *filep, int cmd, unsigned long arg)
*
****************************************************************************/
#ifndef CONFIG_DISABLE_POLL
static int stmpe811_poll(FAR struct file *filep, FAR struct pollfd *fds,
bool setup)
{
@@ -733,7 +724,6 @@ errout:
nxsem_post(&priv->exclsem);
return ret;
}
#endif
/****************************************************************************
* Name: stmpe811_timeoutworker
+2 -18
View File
@@ -177,9 +177,7 @@ struct tsc2007_dev_s
* retained in the f_priv field of the 'struct file'.
*/
#ifndef CONFIG_DISABLE_POLL
struct pollfd *fds[CONFIG_TSC2007_NPOLLWAITERS];
#endif
};
/****************************************************************************
@@ -204,9 +202,7 @@ static int tsc2007_open(FAR struct file *filep);
static int tsc2007_close(FAR struct file *filep);
static ssize_t tsc2007_read(FAR struct file *filep, FAR char *buffer, size_t len);
static int tsc2007_ioctl(FAR struct file *filep, int cmd, unsigned long arg);
#ifndef CONFIG_DISABLE_POLL
static int tsc2007_poll(FAR struct file *filep, struct pollfd *fds, bool setup);
#endif
/****************************************************************************
* Private Data
@@ -221,10 +217,8 @@ static const struct file_operations tsc2007_fops =
tsc2007_read, /* read */
0, /* write */
0, /* seek */
tsc2007_ioctl /* ioctl */
#ifndef CONFIG_DISABLE_POLL
, tsc2007_poll /* poll */
#endif
tsc2007_ioctl, /* ioctl */
tsc2007_poll /* poll */
};
/* If only a single TSC2007 device is supported, then the driver state
@@ -250,9 +244,7 @@ static struct tsc2007_dev_s *g_tsc2007list;
static void tsc2007_notify(FAR struct tsc2007_dev_s *priv)
{
#ifndef CONFIG_DISABLE_POLL
int i;
#endif
/* If there are threads waiting for read data, then signal one of them
* that the read data is available.
@@ -273,7 +265,6 @@ static void tsc2007_notify(FAR struct tsc2007_dev_s *priv)
* then some make end up blocking after all.
*/
#ifndef CONFIG_DISABLE_POLL
for (i = 0; i < CONFIG_TSC2007_NPOLLWAITERS; i++)
{
struct pollfd *fds = priv->fds[i];
@@ -284,7 +275,6 @@ static void tsc2007_notify(FAR struct tsc2007_dev_s *priv)
nxsem_post(fds->sem);
}
}
#endif
}
/****************************************************************************
@@ -1106,7 +1096,6 @@ static int tsc2007_ioctl(FAR struct file *filep, int cmd, unsigned long arg)
* Name: tsc2007_poll
****************************************************************************/
#ifndef CONFIG_DISABLE_POLL
static int tsc2007_poll(FAR struct file *filep, FAR struct pollfd *fds,
bool setup)
{
@@ -1195,11 +1184,6 @@ errout:
nxsem_post(&priv->devsem);
return ret;
}
#endif
/****************************************************************************
* Public Functions
****************************************************************************/
/****************************************************************************
* Public Functions