Remove the unnecessary NULL fields in global instance definition of file_operations

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
This commit is contained in:
Xiang Xiao 2023-01-01 01:18:11 +08:00 committed by Petro Karashchenko
parent a610b633d2
commit 6e6df7dca8

View File

@ -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;
}