From 0786563bba5ebcc58fd88206589ebb576442fe7c Mon Sep 17 00:00:00 2001 From: Xiang Xiao Date: Mon, 24 Apr 2023 15:05:11 +0800 Subject: [PATCH] examples/module: Add g_ prefix to chardev_fops Signed-off-by: Xiang Xiao --- examples/module/drivers/chardev/chardev.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/examples/module/drivers/chardev/chardev.c b/examples/module/drivers/chardev/chardev.c index 7681df454..a96f397df 100644 --- a/examples/module/drivers/chardev/chardev.c +++ b/examples/module/drivers/chardev/chardev.c @@ -55,7 +55,7 @@ static ssize_t chardev_write(FAR struct file *filep, FAR const char *buffer, * Private Data ****************************************************************************/ -static const struct file_operations chardev_fops = +static const struct file_operations g_chardev_fops = { NULL, /* open */ NULL, /* close */ @@ -130,5 +130,5 @@ int module_initialize(FAR struct mod_info_s *modinfo) modinfo->exports = NULL; modinfo->nexports = 0; - return register_driver("/dev/chardev", &chardev_fops, 0666, NULL); + return register_driver("/dev/chardev", &g_chardev_fops, 0666, NULL); }