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/04/30 06:32:27 UTC

[nuttx-apps] branch master updated: examples/module: Add g_ prefix to chardev_fops

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 0786563bb examples/module: Add g_ prefix to chardev_fops
0786563bb is described below

commit 0786563bba5ebcc58fd88206589ebb576442fe7c
Author: Xiang Xiao <xi...@xiaomi.com>
AuthorDate: Mon Apr 24 15:05:11 2023 +0800

    examples/module: Add g_ prefix to chardev_fops
    
    Signed-off-by: Xiang Xiao <xi...@xiaomi.com>
---
 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);
 }