diff --git a/arch/arm/src/cxd56xx/cxd56_sph.c b/arch/arm/src/cxd56xx/cxd56_sph.c index 06a97bbf04..aafc5d3c47 100644 --- a/arch/arm/src/cxd56xx/cxd56_sph.c +++ b/arch/arm/src/cxd56xx/cxd56_sph.c @@ -87,7 +87,7 @@ static int cxd56_sphirqhandler(int irq, void *context, void *arg); * Private Data ****************************************************************************/ -static const struct file_operations sph_fops = +static const struct file_operations g_sph_fops = { .open = sph_open, .ioctl = sph_ioctl @@ -224,7 +224,7 @@ static inline int cxd56_sphdevinit(const char *devname, int num) snprintf(fullpath, sizeof(fullpath), "/dev/%s%d", devname, num); - ret = register_driver(fullpath, &sph_fops, 0666, (void *)priv); + ret = register_driver(fullpath, &g_sph_fops, 0666, (void *)priv); if (ret != 0) { return ERROR; diff --git a/arch/arm/src/stm32/stm32_bbsram.c b/arch/arm/src/stm32/stm32_bbsram.c index e6940511cc..4476dfdc72 100644 --- a/arch/arm/src/stm32/stm32_bbsram.c +++ b/arch/arm/src/stm32/stm32_bbsram.c @@ -130,7 +130,7 @@ static int stm32_bbsram_unlink(struct inode *inode); static uint8_t debug[STM32_BBSRAM_SIZE]; #endif -static const struct file_operations stm32_bbsram_fops = +static const struct file_operations g_stm32_bbsram_fops = { .open = stm32_bbsram_open, .close = stm32_bbsram_close, @@ -752,7 +752,8 @@ int stm32_bbsraminitialize(char *devpath, int *sizes) for (i = 0; i < fcnt && ret >= OK; i++) { snprintf(devname, sizeof(devname), "%s%d", devpath, i); - ret = register_driver(devname, &stm32_bbsram_fops, 0666, &g_bbsram[i]); + ret = register_driver(devname, &g_stm32_bbsram_fops, + 0666, &g_bbsram[i]); } /* Disallow Access */ diff --git a/arch/arm/src/stm32/stm32_hrtim.c b/arch/arm/src/stm32/stm32_hrtim.c index 847d0f8d0c..6e8553ce10 100644 --- a/arch/arm/src/stm32/stm32_hrtim.c +++ b/arch/arm/src/stm32/stm32_hrtim.c @@ -787,7 +787,7 @@ static int stm32_hrtimconfig(struct stm32_hrtim_s *priv); ****************************************************************************/ #ifndef CONFIG_STM32_HRTIM_DISABLE_CHARDRV -static const struct file_operations hrtim_fops = +static const struct file_operations g_hrtim_fops = { stm32_hrtim_open, /* open */ stm32_hrtim_close, /* close */ @@ -6013,7 +6013,7 @@ int hrtim_register(const char *path, struct hrtim_dev_s *dev) /* Register the HRTIM character driver */ - return register_driver(path, &hrtim_fops, 0444, dev); + return register_driver(path, &g_hrtim_fops, 0444, dev); } #endif /* CONFIG_STM32_HRTIM_DISABLE_CHARDRV */ diff --git a/arch/arm/src/stm32f7/stm32_bbsram.c b/arch/arm/src/stm32f7/stm32_bbsram.c index 7727ebd625..9166ee9660 100644 --- a/arch/arm/src/stm32f7/stm32_bbsram.c +++ b/arch/arm/src/stm32f7/stm32_bbsram.c @@ -130,7 +130,7 @@ static int stm32_bbsram_unlink(struct inode *inode); static uint8_t debug[STM32F7_BBSRAM_SIZE]; #endif -static const struct file_operations stm32_bbsram_fops = +static const struct file_operations g_stm32_bbsram_fops = { .open = stm32_bbsram_open, .close = stm32_bbsram_close, @@ -752,7 +752,8 @@ int stm32_bbsraminitialize(char *devpath, int *sizes) for (i = 0; i < fcnt && ret >= OK; i++) { snprintf(devname, sizeof(devname), "%s%d", devpath, i); - ret = register_driver(devname, &stm32_bbsram_fops, 0666, &g_bbsram[i]); + ret = register_driver(devname, &g_stm32_bbsram_fops, + 0666, &g_bbsram[i]); } /* Disallow Access */ diff --git a/arch/arm/src/stm32h7/stm32_bbsram.c b/arch/arm/src/stm32h7/stm32_bbsram.c index 3cb4190ece..1abb3df32a 100644 --- a/arch/arm/src/stm32h7/stm32_bbsram.c +++ b/arch/arm/src/stm32h7/stm32_bbsram.c @@ -151,7 +151,7 @@ static int stm32_bbsram_unlink(struct inode *inode); static uint8_t debug[STM32H7_BBSRAM_SIZE]; #endif -static const struct file_operations stm32_bbsram_fops = +static const struct file_operations g_stm32_bbsram_fops = { .open = stm32_bbsram_open, .close = stm32_bbsram_close, @@ -823,7 +823,8 @@ int stm32_bbsraminitialize(char *devpath, int *sizes) for (i = 0; i < fcnt && ret >= OK; i++) { snprintf(devname, sizeof(devname), "%s%d", devpath, i); - ret = register_driver(devname, &stm32_bbsram_fops, 0666, &g_bbsram[i]); + ret = register_driver(devname, &g_stm32_bbsram_fops, + 0666, &g_bbsram[i]); } /* Disallow Access */ diff --git a/arch/renesas/src/rx65n/rx65n_sbram.c b/arch/renesas/src/rx65n/rx65n_sbram.c index 41278712bb..61487af14a 100644 --- a/arch/renesas/src/rx65n/rx65n_sbram.c +++ b/arch/renesas/src/rx65n/rx65n_sbram.c @@ -123,7 +123,7 @@ static int rx65n_sbram_unlink(struct inode *inode); static uint8_t debug[RX65N_SBRAM_SIZE]; #endif -static const struct file_operations rx65n_sbram_fops = +static const struct file_operations g_rx65n_sbram_fops = { .open = rx65n_sbram_open, .close = rx65n_sbram_close, @@ -658,7 +658,7 @@ int rx65n_sbraminitialize(char *devpath, int *sizes) for (i = 0; i < fcnt && ret >= OK; i++) { snprintf(devname, sizeof(devname), "%s%d", devpath, i); - ret = register_driver(devname, &rx65n_sbram_fops, 0666, &g_sbram[i]); + ret = register_driver(devname, &g_rx65n_sbram_fops, 0666, &g_sbram[i]); } /* Disallow Access */ diff --git a/arch/xtensa/src/esp32/esp32_himem_chardev.c b/arch/xtensa/src/esp32/esp32_himem_chardev.c index 4f81d2504e..6d2bdd82db 100644 --- a/arch/xtensa/src/esp32/esp32_himem_chardev.c +++ b/arch/xtensa/src/esp32/esp32_himem_chardev.c @@ -233,7 +233,7 @@ static int himem_chardev_ioctl(struct file *filep, return 0; } -static const struct file_operations fops = +static const struct file_operations g_fops = { .open = himem_chardev_open, .close = himem_chardev_close, @@ -323,7 +323,7 @@ int himem_chardev_register(char *name, size_t size) return ret; } - ret = register_driver(dev->name, &fops, 0666, dev); + ret = register_driver(dev->name, &g_fops, 0666, dev); if (ret != 0) { merr("Failed to register driver. dev=%s\n", dev->name); diff --git a/boards/arm/kl/freedom-kl25z/src/kl_tsi.c b/boards/arm/kl/freedom-kl25z/src/kl_tsi.c index 8ccd3be3d0..4315d9f55c 100644 --- a/boards/arm/kl/freedom-kl25z/src/kl_tsi.c +++ b/boards/arm/kl/freedom-kl25z/src/kl_tsi.c @@ -81,7 +81,7 @@ static uint8_t const g_chsensor[NSENSORS] = /* Character driver operations */ -static const struct file_operations tsi_ops = +static const struct file_operations g_tsi_ops = { NULL, /* open */ NULL, /* close */ @@ -242,7 +242,7 @@ void kl_tsi_initialize(void) /* And finally register the TSI character driver */ - register_driver("/dev/tsi", &tsi_ops, 0444, NULL); + register_driver("/dev/tsi", &g_tsi_ops, 0444, NULL); } #endif /* CONFIG_KL_TSI */ diff --git a/boards/arm/kl/freedom-kl26z/src/kl_tsi.c b/boards/arm/kl/freedom-kl26z/src/kl_tsi.c index b9d7b99608..27b6432cc4 100644 --- a/boards/arm/kl/freedom-kl26z/src/kl_tsi.c +++ b/boards/arm/kl/freedom-kl26z/src/kl_tsi.c @@ -82,7 +82,7 @@ static uint8_t const g_chsensor[NSENSORS] = /* Character driver operations */ -static const struct file_operations tsi_ops = +static const struct file_operations g_tsi_ops = { NULL, /* open */ NULL, /* close */ @@ -243,7 +243,7 @@ void kl_tsi_initialize(void) /* And finally register the TSI character driver */ - register_driver("/dev/tsi", &tsi_ops, 0444, NULL); + register_driver("/dev/tsi", &g_tsi_ops, 0444, NULL); } #endif /* CONFIG_KL_TSI */ diff --git a/boards/arm/s32k1xx/rddrone-bms772/src/s32k1xx_smbus_sbd.c b/boards/arm/s32k1xx/rddrone-bms772/src/s32k1xx_smbus_sbd.c index 68f4841109..8db0640f30 100644 --- a/boards/arm/s32k1xx/rddrone-bms772/src/s32k1xx_smbus_sbd.c +++ b/boards/arm/s32k1xx/rddrone-bms772/src/s32k1xx_smbus_sbd.c @@ -88,7 +88,7 @@ static ssize_t smbus_sbd_write(struct file *filep, const char *buffer, * slave character device: */ -static const struct file_operations smbus_sbd_fops = +static const struct file_operations g_smbus_sbd_fops = { #ifndef CONFIG_DISABLE_PSEUDOFS_OPERATIONS smbus_sbd_open, /* open */ @@ -788,7 +788,7 @@ int smbus_sbd_initialize(int minor, struct i2c_slave_s *i2c_slave_dev) * the SMBus Smart Battery Data slave device structure. */ - ret = register_driver(dev_name, &smbus_sbd_fops, 0, smbus_sbd_dev); + ret = register_driver(dev_name, &g_smbus_sbd_fops, 0, smbus_sbd_dev); if (ret < 0) { ferr("register_driver failed: %d\n", -ret); diff --git a/boards/arm/stm32/mikroe-stm32f4/src/stm32_touchscreen.c b/boards/arm/stm32/mikroe-stm32f4/src/stm32_touchscreen.c index fc698f8e23..cf8db47afa 100644 --- a/boards/arm/stm32/mikroe-stm32f4/src/stm32_touchscreen.c +++ b/boards/arm/stm32/mikroe-stm32f4/src/stm32_touchscreen.c @@ -260,7 +260,7 @@ static int tc_poll(struct file *filep, struct pollfd *fds, bool setup); /* This the vtable that supports the character driver interface */ -static const struct file_operations tc_fops = +static const struct file_operations g_tc_fops = { tc_open, /* open */ tc_close, /* close */ @@ -1509,7 +1509,7 @@ int stm32_tsc_setup(int minor) snprintf(devname, sizeof(devname), DEV_FORMAT, minor); iinfo("Registering %s\n", devname); - ret = register_driver(devname, &tc_fops, 0666, priv); + ret = register_driver(devname, &g_tc_fops, 0666, priv); if (ret < 0) { ierr("ERROR: register_driver() failed: %d\n", ret); diff --git a/boards/mips/pic32mx/pic32mx7mmb/src/pic32_touchscreen.c b/boards/mips/pic32mx/pic32mx7mmb/src/pic32_touchscreen.c index 9047e176ae..570b68690e 100644 --- a/boards/mips/pic32mx/pic32mx7mmb/src/pic32_touchscreen.c +++ b/boards/mips/pic32mx/pic32mx7mmb/src/pic32_touchscreen.c @@ -241,7 +241,7 @@ static int tc_poll(struct file *filep, struct pollfd *fds, bool setup); /* This the vtable that supports the character driver interface */ -static const struct file_operations tc_fops = +static const struct file_operations g_tc_fops = { tc_open, /* open */ tc_close, /* close */ @@ -1373,7 +1373,7 @@ int pic32mx_tsc_setup(int minor) snprintf(devname, sizeof(devname), DEV_FORMAT, minor); iinfo("Registering %s\n", devname); - ret = register_driver(devname, &tc_fops, 0666, priv); + ret = register_driver(devname, &g_tc_fops, 0666, priv); if (ret < 0) { ierr("ERROR: register_driver() failed: %d\n", ret); diff --git a/drivers/analog/comp.c b/drivers/analog/comp.c index 35445b656c..b3ed1ddd99 100644 --- a/drivers/analog/comp.c +++ b/drivers/analog/comp.c @@ -57,7 +57,7 @@ static int comp_notify(FAR struct comp_dev_s *dev, uint8_t val); * Private Data ****************************************************************************/ -static const struct file_operations comp_fops = +static const struct file_operations g_comp_fops = { comp_open, /* open */ comp_close, /* close */ @@ -370,7 +370,7 @@ int comp_register(FAR const char *path, FAR struct comp_dev_s *dev) /* Register the COMP character driver */ - ret = register_driver(path, &comp_fops, 0444, dev); + ret = register_driver(path, &g_comp_fops, 0444, dev); if (ret < 0) { nxmutex_destroy(&dev->ad_lock); diff --git a/drivers/analog/dac.c b/drivers/analog/dac.c index 7de176aee5..d6aa153539 100644 --- a/drivers/analog/dac.c +++ b/drivers/analog/dac.c @@ -61,7 +61,7 @@ static int dac_ioctl(FAR struct file *filep, int cmd, unsigned long arg); * Private Data ****************************************************************************/ -static const struct file_operations dac_fops = +static const struct file_operations g_dac_fops = { dac_open, /* open */ dac_close, /* close */ @@ -501,5 +501,5 @@ int dac_register(FAR const char *path, FAR struct dac_dev_s *dev) dev->ad_ops->ao_reset(dev); - return register_driver(path, &dac_fops, 0222, dev); + return register_driver(path, &g_dac_fops, 0222, dev); } diff --git a/drivers/analog/opamp.c b/drivers/analog/opamp.c index ed60f49a95..ef64750943 100644 --- a/drivers/analog/opamp.c +++ b/drivers/analog/opamp.c @@ -49,7 +49,7 @@ static int opamp_ioctl(FAR struct file *filep, int cmd, unsigned long arg); * Private Data ****************************************************************************/ -static const struct file_operations opamp_fops = +static const struct file_operations g_opamp_fops = { opamp_open, /* open */ opamp_close, /* close */ @@ -209,7 +209,7 @@ int opamp_register(FAR const char *path, FAR struct opamp_dev_s *dev) /* Register the OPAMP character driver */ - ret = register_driver(path, &opamp_fops, 0444, dev); + ret = register_driver(path, &g_opamp_fops, 0444, dev); if (ret < 0) { nxmutex_destroy(&dev->ad_closelock); diff --git a/drivers/bch/bchdev_driver.c b/drivers/bch/bchdev_driver.c index 861c683ac4..98e730b84c 100644 --- a/drivers/bch/bchdev_driver.c +++ b/drivers/bch/bchdev_driver.c @@ -70,7 +70,7 @@ static int bch_unlink(FAR struct inode *inode); * Public Data ****************************************************************************/ -const struct file_operations bch_fops = +const struct file_operations g_bch_fops = { bch_open, /* open */ bch_close, /* close */ diff --git a/drivers/eeprom/i2c_xx24xx.c b/drivers/eeprom/i2c_xx24xx.c index 11472fb0c3..c806a71931 100644 --- a/drivers/eeprom/i2c_xx24xx.c +++ b/drivers/eeprom/i2c_xx24xx.c @@ -232,7 +232,7 @@ static const struct ee24xx_geom_s g_ee24xx_devices[] = /* Driver operations */ -static const struct file_operations ee24xx_fops = +static const struct file_operations g_ee24xx_fops = { ee24xx_open, /* open */ ee24xx_close, /* close */ @@ -243,7 +243,7 @@ static const struct file_operations ee24xx_fops = }; #ifdef CONFIG_AT24CS_UUID -static const struct file_operations at24cs_uuid_fops = +static const struct file_operations g_at24cs_uuid_fops = { ee24xx_open, /* piggyback on the ee24xx_open */ ee24xx_close, /* piggyback on the ee24xx_close */ @@ -891,7 +891,7 @@ int ee24xx_initialize(FAR struct i2c_master_s *bus, uint8_t devaddr, strlcpy(uuidname, devname, size); strlcat(uuidname, ".uuid", size); - ret = register_driver(uuidname, &at24cs_uuid_fops, 0444, eedev); + ret = register_driver(uuidname, &g_at24cs_uuid_fops, 0444, eedev); kmm_free(uuidname); @@ -902,5 +902,5 @@ int ee24xx_initialize(FAR struct i2c_master_s *bus, uint8_t devaddr, } #endif - return register_driver(devname, &ee24xx_fops, 0666, eedev); + return register_driver(devname, &g_ee24xx_fops, 0666, eedev); } diff --git a/drivers/eeprom/spi_xx25xx.c b/drivers/eeprom/spi_xx25xx.c index 39f446eab8..d20e375818 100644 --- a/drivers/eeprom/spi_xx25xx.c +++ b/drivers/eeprom/spi_xx25xx.c @@ -268,7 +268,7 @@ static const struct ee25xx_geom_s g_ee25xx_devices[] = /* Driver operations */ -static const struct file_operations ee25xx_fops = +static const struct file_operations g_ee25xx_fops = { ee25xx_open, /* open */ ee25xx_close, /* close */ @@ -828,5 +828,5 @@ int ee25xx_initialize(FAR struct spi_dev_s *dev, FAR char *devname, "%u per page, addrlen %u, readonly %d\n", devname, eedev->size, eedev->pgsize, eedev->addrlen, eedev->readonly); - return register_driver(devname, &ee25xx_fops, 0666, eedev); + return register_driver(devname, &g_ee25xx_fops, 0666, eedev); } diff --git a/drivers/i2c/i2c_driver.c b/drivers/i2c/i2c_driver.c index d6e05a4bde..7108330eda 100644 --- a/drivers/i2c/i2c_driver.c +++ b/drivers/i2c/i2c_driver.c @@ -86,7 +86,7 @@ static int i2cdrvr_unlink(FAR struct inode *inode); * Private Data ****************************************************************************/ -static const struct file_operations i2cdrvr_fops = +static const struct file_operations g_i2cdrvr_fops = { #ifndef CONFIG_DISABLE_PSEUDOFS_OPERATIONS i2cdrvr_open, /* open */ @@ -389,7 +389,7 @@ int i2c_register(FAR struct i2c_master_s *i2c, int bus) /* Create the character device name */ snprintf(devname, DEVNAME_FMTLEN, DEVNAME_FMT, bus); - ret = register_driver(devname, &i2cdrvr_fops, 0666, priv); + ret = register_driver(devname, &g_i2cdrvr_fops, 0666, priv); if (ret < 0) { /* Free the device structure if we failed to create the character diff --git a/drivers/i2s/i2schar.c b/drivers/i2s/i2schar.c index e7ec9880ea..1156ff152a 100644 --- a/drivers/i2s/i2schar.c +++ b/drivers/i2s/i2schar.c @@ -104,7 +104,7 @@ static int i2schar_ioctl(FAR struct file *filep, int cmd, unsigned long arg); * Private Data ****************************************************************************/ -static const struct file_operations i2schar_fops = +static const struct file_operations g_i2schar_fops = { NULL, /* open */ NULL, /* close */ @@ -425,7 +425,7 @@ int i2schar_register(FAR struct i2s_dev_s *i2s, int minor) /* Create the character device name */ snprintf(devname, DEVNAME_FMTLEN, DEVNAME_FMT, minor); - ret = register_driver(devname, &i2schar_fops, 0666, priv); + ret = register_driver(devname, &g_i2schar_fops, 0666, priv); if (ret < 0) { /* Free the device structure if we failed to create the character diff --git a/drivers/input/ads7843e.c b/drivers/input/ads7843e.c index bed02ac0cf..cd308955e7 100644 --- a/drivers/input/ads7843e.c +++ b/drivers/input/ads7843e.c @@ -114,7 +114,7 @@ static int ads7843e_poll(FAR struct file *filep, struct pollfd *fds, /* This the vtable that supports the character driver interface */ -static const struct file_operations ads7843e_fops = +static const struct file_operations g_ads7843e_fops = { ads7843e_open, /* open */ ads7843e_close, /* close */ @@ -1177,7 +1177,7 @@ int ads7843e_register(FAR struct spi_dev_s *spi, snprintf(devname, sizeof(devname), DEV_FORMAT, minor); iinfo("Registering %s\n", devname); - ret = register_driver(devname, &ads7843e_fops, 0666, priv); + ret = register_driver(devname, &g_ads7843e_fops, 0666, priv); if (ret < 0) { ierr("ERROR: register_driver() failed: %d\n", ret); diff --git a/drivers/input/ajoystick.c b/drivers/input/ajoystick.c index ae078f511e..63c048c275 100644 --- a/drivers/input/ajoystick.c +++ b/drivers/input/ajoystick.c @@ -127,7 +127,7 @@ static int ajoy_poll(FAR struct file *filep, FAR struct pollfd *fds, * Private Data ****************************************************************************/ -static const struct file_operations ajoy_fops = +static const struct file_operations g_ajoy_fops = { ajoy_open, /* open */ ajoy_close, /* close */ @@ -720,7 +720,7 @@ int ajoy_register(FAR const char *devname, /* And register the ajoystick driver */ - ret = register_driver(devname, &ajoy_fops, 0666, priv); + ret = register_driver(devname, &g_ajoy_fops, 0666, priv); if (ret < 0) { ierr("ERROR: register_driver failed: %d\n", ret); diff --git a/drivers/input/button_upper.c b/drivers/input/button_upper.c index d137211f59..76a5a7109b 100644 --- a/drivers/input/button_upper.c +++ b/drivers/input/button_upper.c @@ -125,7 +125,7 @@ static int btn_poll(FAR struct file *filep, FAR struct pollfd *fds, * Private Data ****************************************************************************/ -static const struct file_operations btn_fops = +static const struct file_operations g_btn_fops = { btn_open, /* open */ btn_close, /* close */ @@ -773,7 +773,7 @@ int btn_register(FAR const char *devname, /* And register the button driver */ - ret = register_driver(devname, &btn_fops, 0666, priv); + ret = register_driver(devname, &g_btn_fops, 0666, priv); if (ret < 0) { ierr("ERROR: register_driver failed: %d\n", ret); diff --git a/drivers/input/djoystick.c b/drivers/input/djoystick.c index 39b48a1686..80b1b39dfb 100644 --- a/drivers/input/djoystick.c +++ b/drivers/input/djoystick.c @@ -127,7 +127,7 @@ static int djoy_poll(FAR struct file *filep, FAR struct pollfd *fds, * Private Data ****************************************************************************/ -static const struct file_operations djoy_fops = +static const struct file_operations g_djoy_fops = { djoy_open, /* open */ djoy_close, /* close */ @@ -714,7 +714,7 @@ int djoy_register(FAR const char *devname, /* And register the djoystick driver */ - ret = register_driver(devname, &djoy_fops, 0666, priv); + ret = register_driver(devname, &g_djoy_fops, 0666, priv); if (ret < 0) { ierr("ERROR: register_driver failed: %d\n", ret); diff --git a/drivers/input/ft5x06.c b/drivers/input/ft5x06.c index aeea190c0a..54972ac887 100644 --- a/drivers/input/ft5x06.c +++ b/drivers/input/ft5x06.c @@ -168,7 +168,7 @@ static int ft5x06_poll(FAR struct file *filep, struct pollfd *fds, /* This the vtable that supports the character driver interface */ -static const struct file_operations ft5x06_fops = +static const struct file_operations g_ft5x06_fops = { ft5x06_open, /* open */ ft5x06_close, /* close */ @@ -1151,7 +1151,7 @@ int ft5x06_register(FAR struct i2c_master_s *i2c, snprintf(devname, sizeof(devname), DEV_FORMAT, minor); iinfo("Registering %s\n", devname); - ret = register_driver(devname, &ft5x06_fops, 0666, priv); + ret = register_driver(devname, &g_ft5x06_fops, 0666, priv); if (ret < 0) { ierr("ERROR: register_driver() failed: %d\n", ret); diff --git a/drivers/input/max11802.c b/drivers/input/max11802.c index a4aec28f79..e6e9ce1411 100644 --- a/drivers/input/max11802.c +++ b/drivers/input/max11802.c @@ -107,7 +107,7 @@ static int max11802_poll(FAR struct file *filep, struct pollfd *fds, /* This the vtable that supports the character driver interface */ -static const struct file_operations max11802_fops = +static const struct file_operations g_max11802_fops = { max11802_open, /* open */ max11802_close, /* close */ @@ -1211,7 +1211,7 @@ int max11802_register(FAR struct spi_dev_s *spi, snprintf(devname, sizeof(devname), DEV_FORMAT, minor); iinfo("Registering %s\n", devname); - ret = register_driver(devname, &max11802_fops, 0666, priv); + ret = register_driver(devname, &g_max11802_fops, 0666, priv); if (ret < 0) { ierr("ERROR: register_driver() failed: %d\n", ret); diff --git a/drivers/input/mxt.c b/drivers/input/mxt.c index 1ac9a7f88c..ca7620a46c 100644 --- a/drivers/input/mxt.c +++ b/drivers/input/mxt.c @@ -272,7 +272,7 @@ static int mxt_hwinitialize(FAR struct mxt_dev_s *priv); /* This the vtable that supports the character driver interface */ -static const struct file_operations mxt_fops = +static const struct file_operations g_mxt_fops = { mxt_open, /* open */ mxt_close, /* close */ @@ -1891,7 +1891,7 @@ int mxt_register(FAR struct i2c_master_s *i2c, snprintf(devname, sizeof(devname), DEV_FORMAT, minor); iinfo("Registering %s\n", devname); - ret = register_driver(devname, &mxt_fops, 0666, priv); + ret = register_driver(devname, &g_mxt_fops, 0666, priv); if (ret < 0) { ierr("ERROR: register_driver() failed: %d\n", ret); diff --git a/drivers/input/nunchuck.c b/drivers/input/nunchuck.c index 9f1c38a900..f0ee461a41 100644 --- a/drivers/input/nunchuck.c +++ b/drivers/input/nunchuck.c @@ -110,7 +110,7 @@ static int nunchuck_sample(FAR struct nunchuck_dev_s *priv, * Private Data ****************************************************************************/ -static const struct file_operations nunchuck_fops = +static const struct file_operations g_nunchuck_fops = { nunchuck_open, /* open */ nunchuck_close, /* close */ @@ -564,7 +564,7 @@ int nunchuck_register(FAR const char *devname, FAR struct i2c_master_s *i2c) /* And register the nunchuck driver */ - ret = register_driver(devname, &nunchuck_fops, 0666, priv); + ret = register_driver(devname, &g_nunchuck_fops, 0666, priv); if (ret < 0) { ierr("ERROR: register_driver failed: %d\n", ret); diff --git a/drivers/input/tsc2007.c b/drivers/input/tsc2007.c index 20c292b2fc..6a4c89fc20 100644 --- a/drivers/input/tsc2007.c +++ b/drivers/input/tsc2007.c @@ -201,7 +201,7 @@ static int tsc2007_poll(FAR struct file *filep, struct pollfd *fds, /* This the vtable that supports the character driver interface */ -static const struct file_operations tsc2007_fops = +static const struct file_operations g_tsc2007_fops = { tsc2007_open, /* open */ tsc2007_close, /* close */ @@ -1253,7 +1253,7 @@ int tsc2007_register(FAR struct i2c_master_s *dev, snprintf(devname, sizeof(devname), DEV_FORMAT, minor); iinfo("Registering %s\n", devname); - ret = register_driver(devname, &tsc2007_fops, 0666, priv); + ret = register_driver(devname, &g_tsc2007_fops, 0666, priv); if (ret < 0) { ierr("ERROR: register_driver() failed: %d\n", ret); diff --git a/drivers/ipcc/ipcc_register.c b/drivers/ipcc/ipcc_register.c index 61630cd048..d15564df12 100644 --- a/drivers/ipcc/ipcc_register.c +++ b/drivers/ipcc/ipcc_register.c @@ -48,7 +48,7 @@ * Private Data ****************************************************************************/ -static const struct file_operations ipcc_fops = +static const struct file_operations g_ipcc_fops = { #ifndef CONFIG_DISABLE_PSEUDOFS_OPERATIONS .unlink = ipcc_unlink, @@ -165,7 +165,7 @@ int ipcc_register(FAR struct ipcc_lower_s *ipcc) /* Create the character device name */ snprintf(devname, DEVNAME_FMTLEN, DEVNAME_FMT, ipcc->chan); - if ((ret = register_driver(devname, &ipcc_fops, 0666, priv))) + if ((ret = register_driver(devname, &g_ipcc_fops, 0666, priv))) { goto error; } diff --git a/drivers/lcd/lcd_dev.c b/drivers/lcd/lcd_dev.c index 57228cf4d9..45e1c39db5 100644 --- a/drivers/lcd/lcd_dev.c +++ b/drivers/lcd/lcd_dev.c @@ -66,7 +66,7 @@ static int lcddev_ioctl(FAR struct file *filep, int cmd, * Private Data ****************************************************************************/ -static const struct file_operations lcddev_fops = +static const struct file_operations g_lcddev_fops = { NULL, /* open */ NULL, /* close */ @@ -322,7 +322,7 @@ int lcddev_register(int devno) } snprintf(devname, sizeof(devname), "/dev/lcd%i", devno); - ret = register_driver(devname, &lcddev_fops, 0666, priv); + ret = register_driver(devname, &g_lcddev_fops, 0666, priv); if (ret < 0) { goto err; diff --git a/drivers/lcd/tda19988.c b/drivers/lcd/tda19988.c index a3fa9f9ca4..40bae6da32 100644 --- a/drivers/lcd/tda19988.c +++ b/drivers/lcd/tda19988.c @@ -162,7 +162,7 @@ static void tda19988_shutdown(FAR struct tda1988_dev_s *priv); * Private Data ****************************************************************************/ -static const struct file_operations tda19988_fops = +static const struct file_operations g_tda19988_fops = { tda19988_open, /* open */ tda19988_close, /* close */ @@ -1684,7 +1684,7 @@ TDA19988_HANDLE tda19988_register(FAR const char *devpath, /* Register the driver */ - ret = register_driver(devpath, &tda19988_fops, 0666, NULL); + ret = register_driver(devpath, &g_tda19988_fops, 0666, NULL); if (ret < 0) { lcderr("ERROR: register_driver() failed: %d\n", ret); diff --git a/drivers/leds/userled_upper.c b/drivers/leds/userled_upper.c index 6f90ec4841..c9edc12880 100644 --- a/drivers/leds/userled_upper.c +++ b/drivers/leds/userled_upper.c @@ -97,7 +97,7 @@ static int userled_ioctl(FAR struct file *filep, int cmd, * Private Data ****************************************************************************/ -static const struct file_operations userled_fops = +static const struct file_operations g_userled_fops = { userled_open, /* open */ userled_close, /* close */ @@ -531,7 +531,7 @@ int userled_register(FAR const char *devname, /* And register the LED driver */ - ret = register_driver(devname, &userled_fops, 0666, priv); + ret = register_driver(devname, &g_userled_fops, 0666, priv); if (ret < 0) { lederr("ERROR: register_driver failed: %d\n", ret); diff --git a/drivers/misc/dev_null.c b/drivers/misc/dev_null.c index 6f1b78fc54..83a8270e38 100644 --- a/drivers/misc/dev_null.c +++ b/drivers/misc/dev_null.c @@ -49,7 +49,7 @@ static int devnull_poll(FAR struct file *filep, FAR struct pollfd *fds, * Private Data ****************************************************************************/ -static const struct file_operations devnull_fops = +static const struct file_operations g_devnull_fops = { NULL, /* open */ NULL, /* close */ @@ -124,5 +124,5 @@ static int devnull_poll(FAR struct file *filep, FAR struct pollfd *fds, void devnull_register(void) { - register_driver("/dev/null", &devnull_fops, 0666, NULL); + register_driver("/dev/null", &g_devnull_fops, 0666, NULL); } diff --git a/drivers/misc/dev_zero.c b/drivers/misc/dev_zero.c index 59720922f5..ebc072c420 100644 --- a/drivers/misc/dev_zero.c +++ b/drivers/misc/dev_zero.c @@ -49,7 +49,7 @@ static int devzero_poll(FAR struct file *filep, FAR struct pollfd *fds, * Private Data ****************************************************************************/ -static const struct file_operations devzero_fops = +static const struct file_operations g_devzero_fops = { NULL, /* open */ NULL, /* close */ @@ -123,5 +123,5 @@ static int devzero_poll(FAR struct file *filep, FAR struct pollfd *fds, void devzero_register(void) { - register_driver("/dev/zero", &devzero_fops, 0666, NULL); + register_driver("/dev/zero", &g_devzero_fops, 0666, NULL); } diff --git a/drivers/modem/u-blox.c b/drivers/modem/u-blox.c index dbcbb55137..ad1fb8f6e6 100644 --- a/drivers/modem/u-blox.c +++ b/drivers/modem/u-blox.c @@ -106,7 +106,7 @@ static int ubxmdm_poll (FAR struct file * filep, * Private Data ****************************************************************************/ -static const struct file_operations ubxmdm_fops = +static const struct file_operations g_ubxmdm_fops = { NULL, /* open */ NULL, /* close */ @@ -293,7 +293,7 @@ FAR void * ubxmdm_register(FAR const char * path, goto errout_with_upper; } - ret = register_driver(path, &ubxmdm_fops, 0666, upper); + ret = register_driver(path, &g_ubxmdm_fops, 0666, upper); if (ret < 0) { m_err("ERROR: register_driver failed: %d\n", ret); diff --git a/drivers/motor/motor.c b/drivers/motor/motor.c index eadedf4b0d..ffa975dfa1 100644 --- a/drivers/motor/motor.c +++ b/drivers/motor/motor.c @@ -72,7 +72,7 @@ static int motor_ioctl(FAR struct file *filep, int cmd, * Private Data ****************************************************************************/ -static const struct file_operations motor_fops = +static const struct file_operations g_motor_fops = { motor_open, /* open */ motor_close, /* close */ @@ -585,7 +585,7 @@ int motor_register(FAR const char *path, /* Register the motor character driver */ - ret = register_driver(path, &motor_fops, 0666, upper); + ret = register_driver(path, &g_motor_fops, 0666, upper); if (ret < 0) { nxmutex_destroy(&upper->closelock); diff --git a/drivers/mtd/mtd_config.c b/drivers/mtd/mtd_config.c index 662abcf059..d089758690 100644 --- a/drivers/mtd/mtd_config.c +++ b/drivers/mtd/mtd_config.c @@ -112,7 +112,7 @@ static int mtdconfig_poll(FAR struct file *filep, FAR struct pollfd *fds, * Private Data ****************************************************************************/ -static const struct file_operations mtdconfig_fops = +static const struct file_operations g_mtdconfig_fops = { mtdconfig_open, /* open */ mtdconfig_close, /* close */ @@ -1776,7 +1776,7 @@ int mtdconfig_register(FAR struct mtd_dev_s *mtd) } nxmutex_init(&dev->lock); - register_driver("/dev/config", &mtdconfig_fops, 0666, dev); + register_driver("/dev/config", &g_mtdconfig_fops, 0666, dev); } errout: diff --git a/drivers/note/notectl_driver.c b/drivers/note/notectl_driver.c index c873870721..1769c1cfbd 100644 --- a/drivers/note/notectl_driver.c +++ b/drivers/note/notectl_driver.c @@ -44,7 +44,7 @@ static int notectl_ioctl(struct file *filep, int cmd, unsigned long arg); * Private Data ****************************************************************************/ -static const struct file_operations notectl_fops = +static const struct file_operations g_notectl_fops = { NULL, /* open */ NULL, /* close */ @@ -233,5 +233,5 @@ static int notectl_ioctl(struct file *filep, int cmd, unsigned long arg) int notectl_register(void) { - return register_driver("/dev/notectl", ¬ectl_fops, 0666, NULL); + return register_driver("/dev/notectl", &g_notectl_fops, 0666, NULL); } diff --git a/drivers/power/supply/powerled.c b/drivers/power/supply/powerled.c index 140ea1bdf5..92278bcc2c 100644 --- a/drivers/power/supply/powerled.c +++ b/drivers/power/supply/powerled.c @@ -53,7 +53,7 @@ static int powerled_ioctl(FAR struct file *filep, int cmd, * Private Data ****************************************************************************/ -static const struct file_operations powerled_fops = +static const struct file_operations g_powerled_fops = { powerled_open, /* open */ powerled_close, /* close */ @@ -412,7 +412,7 @@ int powerled_register(FAR const char *path, FAR struct powerled_dev_s *dev, /* Register the POWERLED character driver */ - ret = register_driver(path, &powerled_fops, 0666, dev); + ret = register_driver(path, &g_powerled_fops, 0666, dev); if (ret < 0) { nxmutex_destroy(&dev->closelock); diff --git a/drivers/power/supply/smps.c b/drivers/power/supply/smps.c index d10bc96d6e..b20a15c237 100644 --- a/drivers/power/supply/smps.c +++ b/drivers/power/supply/smps.c @@ -57,7 +57,7 @@ static int smps_ioctl(FAR struct file *filep, int cmd, * Private Data ****************************************************************************/ -static const struct file_operations smps_fops = +static const struct file_operations g_smps_fops = { smps_open, /* open */ smps_close, /* close */ @@ -509,7 +509,7 @@ int smps_register(FAR const char *path, FAR struct smps_dev_s *dev, /* Register the SMPS character driver */ - ret = register_driver(path, &smps_fops, 0666, dev); + ret = register_driver(path, &g_smps_fops, 0666, dev); if (ret < 0) { nxmutex_destroy(&dev->closelock); diff --git a/drivers/spi/spi_driver.c b/drivers/spi/spi_driver.c index 7dadf3f4aa..6fa63345b9 100644 --- a/drivers/spi/spi_driver.c +++ b/drivers/spi/spi_driver.c @@ -86,7 +86,7 @@ static int spidrvr_unlink(FAR struct inode *inode); * Private Data ****************************************************************************/ -static const struct file_operations spidrvr_fops = +static const struct file_operations g_spidrvr_fops = { #ifndef CONFIG_DISABLE_PSEUDOFS_OPERATIONS spidrvr_open, /* open */ @@ -374,7 +374,7 @@ int spi_register(FAR struct spi_dev_s *spi, int bus) /* Create the character device name */ snprintf(devname, DEVNAME_FMTLEN, DEVNAME_FMT, bus); - ret = register_driver(devname, &spidrvr_fops, 0666, priv); + ret = register_driver(devname, &g_spidrvr_fops, 0666, priv); if (ret < 0) { /* Free the device structure if we failed to create the character diff --git a/drivers/syslog/syslog_chardev.c b/drivers/syslog/syslog_chardev.c index bec352226c..bee43b4a61 100644 --- a/drivers/syslog/syslog_chardev.c +++ b/drivers/syslog/syslog_chardev.c @@ -48,7 +48,7 @@ static ssize_t syslog_chardev_write(FAR struct file *filep, * Private Data ****************************************************************************/ -static const struct file_operations syslog_fops = +static const struct file_operations g_syslog_fops = { NULL, /* open */ NULL, /* close */ @@ -91,7 +91,7 @@ static ssize_t syslog_chardev_write(FAR struct file *filep, void syslog_register(void) { - register_driver("/dev/log", &syslog_fops, 0222, NULL); + register_driver("/dev/log", &g_syslog_fops, 0222, NULL); } #endif /* CONFIG_SYSLOG_CHARDEV */ diff --git a/drivers/timers/rtc.c b/drivers/timers/rtc.c index 2f71afa299..e375cfa64f 100644 --- a/drivers/timers/rtc.c +++ b/drivers/timers/rtc.c @@ -116,7 +116,7 @@ static int rtc_unlink(FAR struct inode *inode); * Private Data ****************************************************************************/ -static const struct file_operations rtc_fops = +static const struct file_operations g_rtc_fops = { #ifndef CONFIG_DISABLE_PSEUDOFS_OPERATIONS rtc_open, /* open */ @@ -852,7 +852,7 @@ int rtc_initialize(int minor, FAR struct rtc_lowerhalf_s *lower) /* And, finally, register the new RTC driver */ - ret = register_driver(devpath, &rtc_fops, 0666, upper); + ret = register_driver(devpath, &g_rtc_fops, 0666, upper); if (ret < 0) { nxmutex_destroy(&upper->lock); diff --git a/drivers/usbhost/usbhost_cdcmbim.c b/drivers/usbhost/usbhost_cdcmbim.c index d4919c0f67..29e0ffb196 100644 --- a/drivers/usbhost/usbhost_cdcmbim.c +++ b/drivers/usbhost/usbhost_cdcmbim.c @@ -339,7 +339,7 @@ static struct usbhost_registry_s g_cdcmbim = /* File operations for control channel */ -static const struct file_operations cdcwdm_fops = +static const struct file_operations g_cdcwdm_fops = { NULL, /* open */ NULL, /* close */ @@ -1574,7 +1574,7 @@ static inline int usbhost_devinit(FAR struct usbhost_cdcmbim_s *priv) uinfo("Register character driver\n"); usbhost_mkdevname(priv, devname); - ret = register_driver(devname, &cdcwdm_fops, 0666, priv); + ret = register_driver(devname, &g_cdcwdm_fops, 0666, priv); } if (priv->intin) diff --git a/drivers/video/fb.c b/drivers/video/fb.c index a1b2877b7a..d9300d3142 100644 --- a/drivers/video/fb.c +++ b/drivers/video/fb.c @@ -84,7 +84,7 @@ static int fb_poll(FAR struct file *filep, FAR struct pollfd *fds, * Private Data ****************************************************************************/ -static const struct file_operations fb_fops = +static const struct file_operations g_fb_fops = { NULL, /* open */ NULL, /* close */ @@ -942,7 +942,7 @@ int fb_register(int display, int plane) snprintf(devname, 16, "/dev/fb%d.%d", display, plane); } - ret = register_driver(devname, &fb_fops, 0666, (FAR void *)fb); + ret = register_driver(devname, &g_fb_fops, 0666, (FAR void *)fb); if (ret < 0) { gerr("ERROR: register_driver() failed: %d\n", ret); diff --git a/drivers/video/mipidsi/mipi_dsi_device_driver.c b/drivers/video/mipidsi/mipi_dsi_device_driver.c index 1dffb8787d..1f3f240c40 100644 --- a/drivers/video/mipidsi/mipi_dsi_device_driver.c +++ b/drivers/video/mipidsi/mipi_dsi_device_driver.c @@ -65,7 +65,7 @@ static int dsi_dev_ioctl(FAR struct file *filep, int cmd, * Private Data ****************************************************************************/ -static const struct file_operations dsi_dev_fops = +static const struct file_operations g_dsi_dev_fops = { NULL, /* open */ NULL, /* close */ @@ -223,7 +223,7 @@ int mipi_dsi_device_driver_register(FAR struct mipi_dsi_device *device) snprintf(devpath, sizeof(devpath), MIPI_DSI_DEVNAME_FMT, host->bus, device->channel, device->name); - ret = register_driver(devpath, &dsi_dev_fops, 0666, priv); + ret = register_driver(devpath, &g_dsi_dev_fops, 0666, priv); if (ret < 0) { nxmutex_destroy(&priv->lock); diff --git a/drivers/video/mipidsi/mipi_dsi_host_driver.c b/drivers/video/mipidsi/mipi_dsi_host_driver.c index dbc445e36e..da9f0fc971 100644 --- a/drivers/video/mipidsi/mipi_dsi_host_driver.c +++ b/drivers/video/mipidsi/mipi_dsi_host_driver.c @@ -67,7 +67,7 @@ static int dsi_host_ioctl(FAR struct file *filep, int cmd, * Private Data ****************************************************************************/ -static const struct file_operations dsi_host_fops = +static const struct file_operations g_dsi_host_fops = { NULL, /* open */ NULL, /* close */ @@ -194,7 +194,7 @@ int mipi_dsi_host_driver_register(FAR struct mipi_dsi_host *host) #endif snprintf(name, sizeof(name), MIPI_DSI_HOSTNAME_FMT, host->bus); - ret = register_driver(name, &dsi_host_fops, 0666, priv); + ret = register_driver(name, &g_dsi_host_fops, 0666, priv); if (ret < 0) { #ifndef CONFIG_DISABLE_PSEUDOFS_OPERATIONS diff --git a/drivers/wireless/lpwan/sx127x/sx127x.c b/drivers/wireless/lpwan/sx127x/sx127x.c index 1915ed0db0..47ede790f7 100644 --- a/drivers/wireless/lpwan/sx127x/sx127x.c +++ b/drivers/wireless/lpwan/sx127x/sx127x.c @@ -443,7 +443,7 @@ static struct sx127x_dev_s g_sx127x_devices[1]; /* File ops */ -static const struct file_operations sx127x_fops = +static const struct file_operations g_sx127x_fops = { sx127x_open, /* open */ sx127x_close, /* close */ @@ -4607,7 +4607,7 @@ int sx127x_register(FAR struct spi_dev_s *spi, wlinfo("Registering " SX127X_DEV_NAME "\n"); - ret = register_driver(SX127X_DEV_NAME, &sx127x_fops, 0666, dev); + ret = register_driver(SX127X_DEV_NAME, &g_sx127x_fops, 0666, dev); if (ret < 0) { wlerr("ERROR: register_driver() failed: %d\n", ret); diff --git a/drivers/wireless/nrf24l01.c b/drivers/wireless/nrf24l01.c index 9eea16cc99..dd80db384f 100644 --- a/drivers/wireless/nrf24l01.c +++ b/drivers/wireless/nrf24l01.c @@ -231,7 +231,7 @@ static int nrf24l01_poll(FAR struct file *filep, FAR struct pollfd *fds, * Private Data ****************************************************************************/ -static const struct file_operations nrf24l01_fops = +static const struct file_operations g_nrf24l01_fops = { nrf24l01_open, /* open */ nrf24l01_close, /* close */ @@ -1507,7 +1507,7 @@ int nrf24l01_register(FAR struct spi_dev_s *spi, wlinfo("Registering " DEV_NAME "\n"); - ret = register_driver(DEV_NAME, &nrf24l01_fops, 0666, dev); + ret = register_driver(DEV_NAME, &g_nrf24l01_fops, 0666, dev); if (ret < 0) { wlerr("ERROR: register_driver() failed: %d\n", ret); diff --git a/fs/mount/fs_automount.c b/fs/mount/fs_automount.c index 997c8e1a9e..da19108e9d 100644 --- a/fs/mount/fs_automount.c +++ b/fs/mount/fs_automount.c @@ -136,7 +136,7 @@ static int automount_interrupt(FAR const struct automount_lower_s *lower, ****************************************************************************/ #ifdef CONFIG_FS_AUTOMOUNTER_DRIVER -static const struct file_operations automount_fops = +static const struct file_operations g_automount_fops = { automount_open, /* open */ automount_close, /* close */ @@ -859,7 +859,7 @@ FAR void *automount_initialize(FAR const struct automount_lower_s *lower) sprintf(devpath, CONFIG_FS_AUTOMOUNTER_VFS_PATH "%s", lower->mountpoint); - ret = register_driver(devpath, &automount_fops, 0444, priv); + ret = register_driver(devpath, &g_automount_fops, 0444, priv); if (ret < 0) { ferr("ERROR: Failed to register automount driver: %d\n", ret); diff --git a/fs/shm/shm_open.c b/fs/shm/shm_open.c index 7e9ddc72b9..d10f8366d6 100644 --- a/fs/shm/shm_open.c +++ b/fs/shm/shm_open.c @@ -134,7 +134,7 @@ static int file_shm_open(FAR struct file *shm, FAR const char *name, } INODE_SET_SHM(inode); - inode->u.i_ops = &shmfs_operations; + inode->u.i_ops = &g_shmfs_operations; inode->i_private = NULL; inode->i_crefs = 1; } diff --git a/fs/shm/shmfs.c b/fs/shm/shmfs.c index 059775f993..21197f47a2 100644 --- a/fs/shm/shmfs.c +++ b/fs/shm/shmfs.c @@ -62,7 +62,7 @@ static int shmfs_munmap(FAR struct task_group_s *group, * Public Data ****************************************************************************/ -const struct file_operations shmfs_operations = +const struct file_operations g_shmfs_operations = { NULL, /* open */ shmfs_close, /* close */ diff --git a/fs/shm/shmfs.h b/fs/shm/shmfs.h index 4c4c50cf42..5a4e7d3fe6 100644 --- a/fs/shm/shmfs.h +++ b/fs/shm/shmfs.h @@ -31,7 +31,7 @@ * Public Data ****************************************************************************/ -extern const struct file_operations shmfs_operations; +extern const struct file_operations g_shmfs_operations; /**************************************************************************** * Public Types diff --git a/wireless/ieee802154/mac802154_device.c b/wireless/ieee802154/mac802154_device.c index 5c0f405e56..5965e20289 100644 --- a/wireless/ieee802154/mac802154_device.c +++ b/wireless/ieee802154/mac802154_device.c @@ -136,7 +136,7 @@ static int mac802154dev_ioctl(FAR struct file *filep, int cmd, * Private Data ****************************************************************************/ -static const struct file_operations mac802154dev_fops = +static const struct file_operations g_mac802154dev_fops = { mac802154dev_open, /* open */ mac802154dev_close, /* close */ @@ -862,7 +862,7 @@ int mac802154dev_register(MACHANDLE mac, int minor) /* Register the mac character driver */ - ret = register_driver(devname, &mac802154dev_fops, 0666, dev); + ret = register_driver(devname, &g_mac802154dev_fops, 0666, dev); if (ret < 0) { wlerr("ERROR: register_driver failed: %d\n", ret);