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



##########
File path: drivers/input/djoystick.c
##########
@@ -524,12 +459,7 @@ static ssize_t djoy_read(FAR struct file *filep, FAR char 
*buffer,
 
   /* Get exclusive access to the driver structure */
 
-  ret = djoy_takesem(&priv->du_exclsem);
-  if (ret < 0)
-    {
-      ierr("ERROR: djoy_takesem failed: %d\n", ret);
-      return ret;
-    }
+  flags = enter_critical_section();

Review comment:
       Yes, since dl_sample is already be called inside the critical secition 
in djoy_sample:
   
https://github.com/apache/incubator-nuttx/pull/5204/files#diff-cb78728fc9ab1e7ff74388d2382edcc0701a691fa0d737dcffce197a2eb8f8baR249-R254




-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to