jlaitine commented on code in PR #17010:
URL: https://github.com/apache/nuttx/pull/17010#discussion_r2349829225


##########
include/nuttx/fs/fs.h:
##########
@@ -1369,6 +1369,22 @@ int fdlist_close(FAR struct fdlist *list, int fd);
 
 int nx_close(int fd);
 
+/****************************************************************************
+ * Name: find_driver
+ *
+ * Description:
+ *   Returns the pointer of a registered driver specified by 'pathname'
+ *
+ * Input Parameters:
+ *   pathname - the full path to the driver's device node in file system
+ *
+ * Returned Value:
+ *   Pointer to driver's registered private pointer or NULL if not found.
+ *
+ ****************************************************************************/
+
+FAR void *find_driver(FAR const char *pathname);

Review Comment:
   No, this is wrong. find_blockdriver is used only inside fs, so that is fine. 
You just can't give inodes outside of fs (to drivers/usbdev) and expect to 
release the inodes there. I won't do that. You can do it yourself if you want 
it that way.
   
   Search for "release_inode" and see where the inodes are released now. 



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