You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by GitBox <gi...@apache.org> on 2022/01/26 20:29:00 UTC

[GitHub] [incubator-nuttx] pkarashchenko commented on a change in pull request #5347: register_driver: fix driver modes accross the code

pkarashchenko commented on a change in pull request #5347:
URL: https://github.com/apache/incubator-nuttx/pull/5347#discussion_r793021938



##########
File path: arch/arm/src/cxd56xx/cxd56_sph.c
##########
@@ -240,7 +240,7 @@ static inline int cxd56_sphdevinit(FAR const char *devname, int num)
 
   snprintf(fullpath, sizeof(fullpath), "/dev/%s%d", devname, num);
 
-  ret = register_driver(fullpath, &sph_fops, 0666, (FAR void *)priv);
+  ret = register_driver(fullpath, &sph_fops, 0000, (FAR void *)priv);

Review comment:
       Both `sph_fops.read` and `sph_fops.write` are `NULL` pointers. I do not think that read permission is needed. But maybe I'm lacking a vision of many things. `open` with mode `0` works perfectly, so this is not a limitation. I made this PR as draft and will initiate additional discussion over e-mail to get more input.




-- 
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-unsubscribe@nuttx.apache.org

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