xiaoxiang781216 commented on a change in pull request #5624:
URL: https://github.com/apache/incubator-nuttx/pull/5624#discussion_r816869186



##########
File path: drivers/input/ajoystick.c
##########
@@ -194,19 +194,8 @@ static void ajoy_enable(FAR struct ajoy_upperhalf_s *priv)
 
   for (opriv = priv->au_open; opriv; opriv = opriv->ao_flink)
     {
-      /* Are there any poll waiters? */
-
-      for (i = 0; i < CONFIG_INPUT_AJOYSTICK_NPOLLWAITERS; i++)
-        {
-          if (opriv->ao_fds[i])
-            {
-              /* Yes.. OR in the poll event buttons */
-
-              press   |= opriv->ao_pollevents.ap_press;
-              release |= opriv->ao_pollevents.ap_release;
-              break;
-            }
-        }
+      press   |= opriv->ao_pollevents.ap_press;

Review comment:
       Yes, if the user config the monitor setting through AJOYIOC_POLLEVENTS. 
Otherwise, the event happen before user call poll/select will lose.




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscr...@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Reply via email to