fs: Add g_ prefix for all global file_operations instances
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
This commit is contained in:
parent
308b93b168
commit
51dc67ad5f
@ -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;
|
||||
|
@ -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 */
|
||||
|
@ -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 */
|
||||
|
||||
|
@ -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 */
|
||||
|
@ -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 */
|
||||
|
@ -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 */
|
||||
|
@ -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);
|
||||
|
@ -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 */
|
||||
|
@ -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 */
|
||||
|
@ -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);
|
||||
|
@ -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);
|
||||
|
@ -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);
|
||||
|
@ -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);
|
||||
|
@ -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);
|
||||
}
|
||||
|
@ -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);
|
||||
|
@ -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 */
|
||||
|
@ -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);
|
||||
}
|
||||
|
@ -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);
|
||||
}
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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);
|
||||
|
@ -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);
|
||||
|
@ -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);
|
||||
|
@ -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);
|
||||
|
@ -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);
|
||||
|
@ -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);
|
||||
|
@ -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);
|
||||
|
@ -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);
|
||||
|
@ -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);
|
||||
|
@ -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;
|
||||
}
|
||||
|
@ -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;
|
||||
|
@ -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);
|
||||
|
@ -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);
|
||||
|
@ -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);
|
||||
}
|
||||
|
@ -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);
|
||||
}
|
||||
|
@ -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);
|
||||
|
@ -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);
|
||||
|
@ -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:
|
||||
|
@ -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);
|
||||
}
|
||||
|
@ -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);
|
||||
|
@ -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);
|
||||
|
@ -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
|
||||
|
@ -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 */
|
||||
|
@ -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);
|
||||
|
@ -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)
|
||||
|
@ -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);
|
||||
|
@ -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);
|
||||
|
@ -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
|
||||
|
@ -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);
|
||||
|
@ -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);
|
||||
|
@ -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);
|
||||
|
@ -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;
|
||||
}
|
||||
|
@ -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 */
|
||||
|
@ -31,7 +31,7 @@
|
||||
* Public Data
|
||||
****************************************************************************/
|
||||
|
||||
extern const struct file_operations shmfs_operations;
|
||||
extern const struct file_operations g_shmfs_operations;
|
||||
|
||||
/****************************************************************************
|
||||
* Public Types
|
||||
|
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user