hartmannathan commented on a change in pull request #5718: URL: https://github.com/apache/incubator-nuttx/pull/5718#discussion_r824893325
########## File path: drivers/can/can.c ########## @@ -407,46 +406,48 @@ static int can_open(FAR struct file *filep) * for this device, then perform hardware initialization. */ - if (list_is_empty(&dev->cd_readers)) + caninfo("ocount: %u\n", dev->cd_crefs); + + if (dev->cd_crefs >= 255) { - caninfo("ocount: %d\n", 0); + /* Limit to no more than 255 opens */ Review comment: Ah yes I see that now. Still, this change is an improvement because it is becoming more consistent with the way other drivers are written. -- 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