You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by pk...@apache.org on 2023/01/04 07:30:31 UTC
[nuttx-apps] branch master updated: Remove the unnecessary NULL fields in global instance definition of file_operations
This is an automated email from the ASF dual-hosted git repository.
pkarashchenko pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/nuttx-apps.git
The following commit(s) were added to refs/heads/master by this push:
new 6e6df7dca Remove the unnecessary NULL fields in global instance definition of file_operations
6e6df7dca is described below
commit 6e6df7dca85d9aaeaae7d8d1b3404116b576dae6
Author: Xiang Xiao <xi...@xiaomi.com>
AuthorDate: Sun Jan 1 01:18:11 2023 +0800
Remove the unnecessary NULL fields in global instance definition of file_operations
Signed-off-by: Xiang Xiao <xi...@xiaomi.com>
---
examples/module/drivers/chardev/chardev.c | 9 ++-------
1 file changed, 2 insertions(+), 7 deletions(-)
diff --git a/examples/module/drivers/chardev/chardev.c b/examples/module/drivers/chardev/chardev.c
index 2bea20fb1..02d3e7b33 100644
--- a/examples/module/drivers/chardev/chardev.c
+++ b/examples/module/drivers/chardev/chardev.c
@@ -68,12 +68,6 @@ static const struct file_operations chardev_fops =
NULL, /* close */
chardev_read, /* read */
chardev_write, /* write */
- NULL, /* seek */
- NULL, /* ioctl */
- NULL /* poll */
-#ifndef CONFIG_DISABLE_PSEUDOFS_OPERATIONS
- , NULL /* unlink */
-#endif
};
/****************************************************************************
@@ -93,7 +87,8 @@ static ssize_t chardev_read(FAR struct file *filep, FAR char *buffer,
memcpy(buffer, g_read_string, ret);
syslog(LOG_INFO, "chardev_read: Returning %d bytes\n", (int)ret);
- lib_dumpbuffer("chardev_read: Returning", (FAR const uint8_t *)buffer, ret);
+ lib_dumpbuffer("chardev_read: Returning",
+ (FAR const uint8_t *)buffer, ret);
return ret;
}