examples/module: Add g_ prefix to chardev_fops

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
This commit is contained in:
Xiang Xiao 2023-04-24 15:05:11 +08:00 committed by Petro Karashchenko
parent fd42d811c2
commit 0786563bba

View File

@ -55,7 +55,7 @@ static ssize_t chardev_write(FAR struct file *filep, FAR const char *buffer,
* Private Data * Private Data
****************************************************************************/ ****************************************************************************/
static const struct file_operations chardev_fops = static const struct file_operations g_chardev_fops =
{ {
NULL, /* open */ NULL, /* open */
NULL, /* close */ NULL, /* close */
@ -130,5 +130,5 @@ int module_initialize(FAR struct mod_info_s *modinfo)
modinfo->exports = NULL; modinfo->exports = NULL;
modinfo->nexports = 0; modinfo->nexports = 0;
return register_driver("/dev/chardev", &chardev_fops, 0666, NULL); return register_driver("/dev/chardev", &g_chardev_fops, 0666, NULL);
} }