hujun260 commented on code in PR #15648:
URL: https://github.com/apache/nuttx/pull/15648#discussion_r1925042811


##########
arch/arm/src/lc823450/lc823450_i2c.c:
##########
@@ -1028,10 +1032,12 @@ static int lc823450_i2c_transfer(struct i2c_master_s 
*dev,
         }
       else
         {
+          sched_lock();
           i2cerr("No need of timeout handling. "
                  "It may be done in irq handler\n");
 
-          leave_critical_section(irqs);
+          spin_unlock_irqrestore(&priv->spinlock, irqs);
+          sched_unlock();

Review Comment:
             spin_unlock_irqrestore(&priv->spinlock, irqs);
             i2cerr("No need of timeout handling. "
                    "It may be done in irq handler\n");



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