diff --git a/arch/arm/src/cxd56xx/cxd56_adc.c b/arch/arm/src/cxd56xx/cxd56_adc.c index 1e2fb2988ab..b58f94de0d0 100644 --- a/arch/arm/src/cxd56xx/cxd56_adc.c +++ b/arch/arm/src/cxd56xx/cxd56_adc.c @@ -202,11 +202,12 @@ static const struct file_operations g_adcops = cxd56_adc_open, /* open */ cxd56_adc_close, /* close */ cxd56_adc_read, /* read */ - 0, /* write */ - 0, /* seek */ + NULL, /* write */ + NULL, /* seek */ cxd56_adc_ioctl, /* ioctl */ -#ifndef CONFIG_DISABLE_POLL - 0, /* poll */ + NULL /* poll */ +#ifndef CONFIG_DISABLE_PSEUDOFS_OPERATIONS + , NULL /* unlink */ #endif }; diff --git a/arch/arm/src/cxd56xx/cxd56_charger.c b/arch/arm/src/cxd56xx/cxd56_charger.c index 2b5d74e88de..d69dbecab11 100644 --- a/arch/arm/src/cxd56xx/cxd56_charger.c +++ b/arch/arm/src/cxd56xx/cxd56_charger.c @@ -96,11 +96,9 @@ static const struct file_operations g_chargerops = charger_close, /* close */ charger_read, /* read */ charger_write, /* write */ - 0, /* seek */ - charger_ioctl /* ioctl */ -#ifndef CONFIG_DISABLE_POLL - , NULL /* poll */ -#endif + NULL, /* seek */ + charger_ioctl, /* ioctl */ + NULL /* poll */ #ifndef CONFIG_DISABLE_PSEUDOFS_OPERATIONS , NULL /* unlink */ #endif diff --git a/arch/arm/src/cxd56xx/cxd56_gauge.c b/arch/arm/src/cxd56xx/cxd56_gauge.c index 51b0bceb19d..157d0e9730c 100644 --- a/arch/arm/src/cxd56xx/cxd56_gauge.c +++ b/arch/arm/src/cxd56xx/cxd56_gauge.c @@ -81,11 +81,9 @@ static const struct file_operations g_gaugeops = gauge_close, /* close */ gauge_read, /* read */ gauge_write, /* write */ - 0, /* seek */ - gauge_ioctl /* ioctl */ -#ifndef CONFIG_DISABLE_POLL - , NULL /* poll */ -#endif + NULL, /* seek */ + gauge_ioctl, /* ioctl */ + NULL /* poll */ #ifndef CONFIG_DISABLE_PSEUDOFS_OPERATIONS , NULL /* unlink */ #endif diff --git a/arch/arm/src/cxd56xx/cxd56_geofence.c b/arch/arm/src/cxd56xx/cxd56_geofence.c index 0bea0b59e01..b9c0447859d 100644 --- a/arch/arm/src/cxd56xx/cxd56_geofence.c +++ b/arch/arm/src/cxd56xx/cxd56_geofence.c @@ -76,11 +76,9 @@ static ssize_t cxd56_geofence_read(FAR struct file *filep, static int cxd56_geofence_ioctl(FAR struct file *filep, int cmd, unsigned long arg); -#ifndef CONFIG_DISABLE_POLL static int cxd56_geofence_poll(FAR struct file *filep, FAR struct pollfd *fds, bool setup); -#endif /* ioctl command functions */ @@ -106,11 +104,12 @@ static const struct file_operations g_geofencefops = cxd56_geofence_open, /* open */ cxd56_geofence_close, /* close */ cxd56_geofence_read, /* read */ - 0, /* write */ - 0, /* seek */ + NULL, /* write */ + NULL, /* seek */ cxd56_geofence_ioctl, /* ioctl */ -#ifndef CONFIG_DISABLE_POLL - cxd56_geofence_poll, /* poll */ + cxd56_geofence_poll /* poll */ +#ifndef CONFIG_DISABLE_PSEUDOFS_OPERATIONS + , NULL /* unlink */ #endif }; @@ -607,7 +606,6 @@ static int cxd56_geofence_ioctl(FAR struct file *filep, int cmd, * ****************************************************************************/ -#ifndef CONFIG_DISABLE_POLL static int cxd56_geofence_poll(FAR struct file *filep, FAR struct pollfd *fds, bool setup) @@ -674,7 +672,6 @@ errout: nxsem_post(&priv->devsem); return ret; } -#endif /**************************************************************************** * Name: cxd56_geofence_register diff --git a/arch/arm/src/cxd56xx/cxd56_gnss.c b/arch/arm/src/cxd56xx/cxd56_gnss.c index 6a893659cae..eadea751211 100644 --- a/arch/arm/src/cxd56xx/cxd56_gnss.c +++ b/arch/arm/src/cxd56xx/cxd56_gnss.c @@ -293,10 +293,8 @@ static ssize_t cxd56_gnss_write(FAR struct file *filep, FAR const char *buffer, size_t buflen); static int cxd56_gnss_ioctl(FAR struct file *filep, int cmd, unsigned long arg); -#ifndef CONFIG_DISABLE_POLL static int cxd56_gnss_poll(FAR struct file *filep, FAR struct pollfd *fds, bool setup); -#endif static int8_t cxd56_gnss_select_notifytype(off_t fpos, uint32_t *offset); static int cxd56_gnss_cpufifo_api(FAR struct file *filep, @@ -315,10 +313,11 @@ static const struct file_operations g_gnssfops = cxd56_gnss_close, /* close */ cxd56_gnss_read, /* read */ cxd56_gnss_write, /* write */ - 0, /* seek */ + NULL, /* seek */ cxd56_gnss_ioctl, /* ioctl */ -#ifndef CONFIG_DISABLE_POLL - cxd56_gnss_poll, /* poll */ + cxd56_gnss_poll /* poll */ +#ifndef CONFIG_DISABLE_PSEUDOFS_OPERATIONS + , NULL /* unlink */ #endif }; @@ -2899,7 +2898,6 @@ static int cxd56_gnss_ioctl(FAR struct file *filep, int cmd, * ****************************************************************************/ -#ifndef CONFIG_DISABLE_POLL static int cxd56_gnss_poll(FAR struct file *filep, FAR struct pollfd *fds, bool setup) { @@ -2965,7 +2963,6 @@ errout: nxsem_post(&priv->devsem); return ret; } -#endif /**************************************************************************** * Name: cxd56_gnss_register diff --git a/arch/x86_64/src/intel64/intel64_rng.c b/arch/x86_64/src/intel64/intel64_rng.c index b7b565c9cc2..0771be13a82 100644 --- a/arch/x86_64/src/intel64/intel64_rng.c +++ b/arch/x86_64/src/intel64/intel64_rng.c @@ -66,17 +66,15 @@ static struct rng_dev_s g_rngdev; static const struct file_operations g_rngops = { - 0, /* open */ - 0, /* close */ + NULL, /* open */ + NULL, /* close */ x86_rngread, /* read */ - 0, /* write */ - 0, /* seek */ - 0 /* ioctl */ -#ifndef CONFIG_DISABLE_POLL - , 0 /* poll */ -#endif + NULL, /* write */ + NULL, /* seek */ + NULL, /* ioctl */ + NULL /* poll */ #ifndef CONFIG_DISABLE_PSEUDOFS_OPERATIONS - , 0 /* unlink */ + , NULL /* unlink */ #endif }; diff --git a/audio/audio.c b/audio/audio.c index 6c86439d6a3..bf3016d1ffd 100644 --- a/audio/audio.c +++ b/audio/audio.c @@ -122,6 +122,9 @@ static const struct file_operations g_audioops = NULL, /* seek */ audio_ioctl, /* ioctl */ NULL /* poll */ +#ifndef CONFIG_DISABLE_PSEUDOFS_OPERATIONS + , NULL /* unlink */ +#endif }; /**************************************************************************** diff --git a/boards/arm/cxd56xx/drivers/sensors/ak09912_scu.c b/boards/arm/cxd56xx/drivers/sensors/ak09912_scu.c index 8ce669bf7e6..c8f68f04f1e 100644 --- a/boards/arm/cxd56xx/drivers/sensors/ak09912_scu.c +++ b/boards/arm/cxd56xx/drivers/sensors/ak09912_scu.c @@ -171,12 +171,12 @@ static const struct file_operations g_ak09912fops = ak09912_close, /* close */ ak09912_read, /* read */ ak09912_write, /* write */ - 0, /* seek */ + NULL, /* seek */ ak09912_ioctl, /* ioctl */ -#ifndef CONFIG_DISABLE_POLL - 0, /* poll */ + NULL /* poll */ +#ifndef CONFIG_DISABLE_PSEUDOFS_OPERATIONS + , NULL /* unlink */ #endif - 0 /* unlink */ }; /* Take XYZ data, temperature and Status 2 register. diff --git a/boards/arm/cxd56xx/drivers/sensors/apds9930_scu.c b/boards/arm/cxd56xx/drivers/sensors/apds9930_scu.c index 128290c78f6..b3d99dbe7c7 100644 --- a/boards/arm/cxd56xx/drivers/sensors/apds9930_scu.c +++ b/boards/arm/cxd56xx/drivers/sensors/apds9930_scu.c @@ -181,12 +181,12 @@ static const struct file_operations g_apds9930alsfops = apds9930_close_als, /* close */ apds9930_read_als, /* read */ apds9930_write, /* write */ - 0, /* seek */ + NULL, /* seek */ apds9930_ioctl_als, /* ioctl */ -#ifndef CONFIG_DISABLE_POLL - 0, /* poll */ + NULL /* poll */ +#ifndef CONFIG_DISABLE_PSEUDOFS_OPERATIONS + , NULL /* unlink */ #endif - 0 /* unlink */ }; /* Proximity sensor */ @@ -197,12 +197,12 @@ static const struct file_operations g_apds9930psfops = apds9930_close_ps, /* close */ apds9930_read_ps, /* read */ apds9930_write, /* write */ - 0, /* seek */ + NULL, /* seek */ apds9930_ioctl_ps, /* ioctl */ -#ifndef CONFIG_DISABLE_POLL - 0, /* poll */ + NULL /* poll */ +#ifndef CONFIG_DISABLE_PSEUDOFS_OPERATIONS + , NULL /* unlink */ #endif - 0 /* unlink */ }; /* SCU instructions for pick ambient light sensing data. */ diff --git a/boards/arm/cxd56xx/drivers/sensors/bh1721fvc_scu.c b/boards/arm/cxd56xx/drivers/sensors/bh1721fvc_scu.c index 1a916f3e198..de9327ab695 100644 --- a/boards/arm/cxd56xx/drivers/sensors/bh1721fvc_scu.c +++ b/boards/arm/cxd56xx/drivers/sensors/bh1721fvc_scu.c @@ -103,12 +103,12 @@ static const struct file_operations g_bh1721fvcfops = bh1721fvc_close, /* close */ bh1721fvc_read, /* read */ bh1721fvc_write, /* write */ - 0, /* seek */ + NULL, /* seek */ bh1721fvc_ioctl, /* ioctl */ -#ifndef CONFIG_DISABLE_POLL - 0, /* poll */ + NULL /* poll */ +#ifndef CONFIG_DISABLE_PSEUDOFS_OPERATIONS + , NULL /* unlink */ #endif - 0 /* unlink */ }; /* Take ambient light data. */ diff --git a/boards/arm/cxd56xx/drivers/sensors/bh1745nuc_scu.c b/boards/arm/cxd56xx/drivers/sensors/bh1745nuc_scu.c index b47ebfd8fd0..c15d6f4249a 100644 --- a/boards/arm/cxd56xx/drivers/sensors/bh1745nuc_scu.c +++ b/boards/arm/cxd56xx/drivers/sensors/bh1745nuc_scu.c @@ -126,12 +126,12 @@ static const struct file_operations g_bh1745nucfops = bh1745nuc_close, /* close */ bh1745nuc_read, /* read */ bh1745nuc_write, /* write */ - 0, /* seek */ + NULL, /* seek */ bh1745nuc_ioctl, /* ioctl */ -#ifndef CONFIG_DISABLE_POLL - 0, /* poll */ + NULL /* poll */ +#ifndef CONFIG_DISABLE_PSEUDOFS_OPERATIONS + , NULL /* unlink */ #endif - 0 /* unlink */ }; /* Take color data. */ diff --git a/boards/arm/cxd56xx/drivers/sensors/bm1383glv_scu.c b/boards/arm/cxd56xx/drivers/sensors/bm1383glv_scu.c index b5d5f8cb934..00dedc6fee5 100644 --- a/boards/arm/cxd56xx/drivers/sensors/bm1383glv_scu.c +++ b/boards/arm/cxd56xx/drivers/sensors/bm1383glv_scu.c @@ -125,12 +125,12 @@ static const struct file_operations g_bm1383glvfops = bm1383glv_close, /* close */ bm1383glv_read, /* read */ bm1383glv_write, /* write */ - 0, /* seek */ + NULL, /* seek */ bm1383glv_ioctl, /* ioctl */ -#ifndef CONFIG_DISABLE_POLL - 0, /* poll */ + NULL /* poll */ +#ifndef CONFIG_DISABLE_PSEUDOFS_OPERATIONS + , NULL /* unlink */ #endif - 0 /* unlink */ }; /* Device is not BM1383AGLV but BM1383GLV */ diff --git a/boards/arm/cxd56xx/drivers/sensors/bm1422gmv_scu.c b/boards/arm/cxd56xx/drivers/sensors/bm1422gmv_scu.c index 2d8b0f6f115..ec514f8c11f 100644 --- a/boards/arm/cxd56xx/drivers/sensors/bm1422gmv_scu.c +++ b/boards/arm/cxd56xx/drivers/sensors/bm1422gmv_scu.c @@ -139,12 +139,12 @@ static const struct file_operations g_bm1422gmvfops = bm1422gmv_close, /* close */ bm1422gmv_read, /* read */ bm1422gmv_write, /* write */ - 0, /* seek */ + NULL, /* seek */ bm1422gmv_ioctl, /* ioctl */ -#ifndef CONFIG_DISABLE_POLL - 0, /* poll */ + NULL /* poll */ +#ifndef CONFIG_DISABLE_PSEUDOFS_OPERATIONS + , NULL /* unlink */ #endif - 0 /* unlink */ }; /* Take XYZ data. */ diff --git a/boards/arm/cxd56xx/drivers/sensors/kx022_scu.c b/boards/arm/cxd56xx/drivers/sensors/kx022_scu.c index 39eaa998ee3..1ff3d093b1c 100644 --- a/boards/arm/cxd56xx/drivers/sensors/kx022_scu.c +++ b/boards/arm/cxd56xx/drivers/sensors/kx022_scu.c @@ -130,12 +130,12 @@ static const struct file_operations g_kx022fops = kx022_close, /* close */ kx022_read, /* read */ kx022_write, /* write */ - 0, /* seek */ + NULL, /* seek */ kx022_ioctl, /* ioctl */ -#ifndef CONFIG_DISABLE_POLL - 0, /* poll */ + NULL /* poll */ +#ifndef CONFIG_DISABLE_PSEUDOFS_OPERATIONS + , NULL /* unlink */ #endif - 0 /* unlink */ }; /* Take XYZ data. */ diff --git a/boards/arm/cxd56xx/drivers/sensors/lt1pa01_scu.c b/boards/arm/cxd56xx/drivers/sensors/lt1pa01_scu.c index 7e943061935..e2b242e691c 100644 --- a/boards/arm/cxd56xx/drivers/sensors/lt1pa01_scu.c +++ b/boards/arm/cxd56xx/drivers/sensors/lt1pa01_scu.c @@ -176,12 +176,12 @@ static const struct file_operations g_lt1pa01alsfops = lt1pa01_close_als, /* close */ lt1pa01_read_als, /* read */ lt1pa01_write, /* write */ - 0, /* seek */ + NULL, /* seek */ lt1pa01_ioctl_als, /* ioctl */ -#ifndef CONFIG_DISABLE_POLL - 0, /* poll */ + NULL /* poll */ +#ifndef CONFIG_DISABLE_PSEUDOFS_OPERATIONS + , NULL /* unlink */ #endif - 0 /* unlink */ }; /* Proximity sensor */ @@ -192,12 +192,12 @@ static const struct file_operations g_lt1pa01proxfops = lt1pa01_close_prox, /* close */ lt1pa01_read_prox, /* read */ lt1pa01_write, /* write */ - 0, /* seek */ + NULL, /* seek */ lt1pa01_ioctl_prox, /* ioctl */ -#ifndef CONFIG_DISABLE_POLL - 0, /* poll */ + NULL /* poll */ +#ifndef CONFIG_DISABLE_PSEUDOFS_OPERATIONS + , NULL /* unlink */ #endif - 0 /* unlink */ }; /* SCU instructions for pick ambient light sensing data. */ diff --git a/boards/arm/cxd56xx/drivers/sensors/rpr0521rs_scu.c b/boards/arm/cxd56xx/drivers/sensors/rpr0521rs_scu.c index a34fe4e8538..33500e50469 100644 --- a/boards/arm/cxd56xx/drivers/sensors/rpr0521rs_scu.c +++ b/boards/arm/cxd56xx/drivers/sensors/rpr0521rs_scu.c @@ -164,12 +164,12 @@ static const struct file_operations g_rpr0521rsalsfops = rpr0521rs_close_als, /* close */ rpr0521rs_read_als, /* read */ rpr0521rs_write, /* write */ - 0, /* seek */ + NULL, /* seek */ rpr0521rs_ioctl_als, /* ioctl */ -#ifndef CONFIG_DISABLE_POLL - 0, /* poll */ + NULL /* poll */ +#ifndef CONFIG_DISABLE_PSEUDOFS_OPERATIONS + , NULL /* unlink */ #endif - 0 /* unlink */ }; /* Proximity sensor */ @@ -180,12 +180,12 @@ static const struct file_operations g_rpr0521rspsfops = rpr0521rs_close_ps, /* close */ rpr0521rs_read_ps, /* read */ rpr0521rs_write, /* write */ - 0, /* seek */ + NULL, /* seek */ rpr0521rs_ioctl_ps, /* ioctl */ -#ifndef CONFIG_DISABLE_POLL - 0, /* poll */ + NULL /* poll */ +#ifndef CONFIG_DISABLE_PSEUDOFS_OPERATIONS + , NULL /* unlink */ #endif - 0 /* unlink */ }; /* SCU instructions for pick ambient light sensing data. */ diff --git a/drivers/analog/adc.c b/drivers/analog/adc.c index db91a332510..962eb78d403 100644 --- a/drivers/analog/adc.c +++ b/drivers/analog/adc.c @@ -91,8 +91,8 @@ static const struct file_operations g_adc_fops = adc_open, /* open */ adc_close, /* close */ adc_read, /* read */ - 0, /* write */ - 0, /* seek */ + NULL, /* write */ + NULL, /* seek */ adc_ioctl, /* ioctl */ adc_poll /* poll */ #ifndef CONFIG_DISABLE_PSEUDOFS_OPERATIONS diff --git a/drivers/analog/ads1242.c b/drivers/analog/ads1242.c index e0c53d4415e..e4f82ac305f 100644 --- a/drivers/analog/ads1242.c +++ b/drivers/analog/ads1242.c @@ -101,13 +101,16 @@ static int ads1242_ioctl(FAR struct file *filep, int cmd, static const struct file_operations g_ads1242_fops = { - ads1242_open, - ads1242_close, - ads1242_read, - ads1242_write, - NULL, - ads1242_ioctl, - NULL + ads1242_open, /* open */ + ads1242_close, /* close */ + ads1242_read, /* read */ + ads1242_write, /* write */ + NULL, /* seek */ + ads1242_ioctl, /* ioctl */ + NULL /* poll */ +#ifndef CONFIG_DISABLE_PSEUDOFS_OPERATIONS + , NULL /* unlink */ +#endif }; /**************************************************************************** diff --git a/drivers/analog/dac.c b/drivers/analog/dac.c index d2911e93097..e8d3b3ead78 100644 --- a/drivers/analog/dac.c +++ b/drivers/analog/dac.c @@ -86,13 +86,16 @@ static int dac_ioctl(FAR struct file *filep, int cmd, unsigned long arg); static const struct file_operations dac_fops = { - dac_open, - dac_close, - dac_read, - dac_write, - NULL, - dac_ioctl, - NULL + dac_open, /* open */ + dac_close, /* close */ + dac_read, /* read */ + dac_write, /* write */ + NULL, /* seek */ + dac_ioctl, /* ioctl */ + NULL /* poll */ +#ifndef CONFIG_DISABLE_PSEUDOFS_OPERATIONS + , NULL /* unlink */ +#endif }; /**************************************************************************** diff --git a/drivers/contactless/mfrc522.c b/drivers/contactless/mfrc522.c index 78c256510ea..a3030cb65d3 100644 --- a/drivers/contactless/mfrc522.c +++ b/drivers/contactless/mfrc522.c @@ -108,15 +108,15 @@ static inline int mfrc522_attachirq(FAR struct mfrc522_dev_s *dev, static const struct file_operations g_mfrc522fops = { - mfrc522_open, - mfrc522_close, - mfrc522_read, - mfrc522_write, - NULL, - mfrc522_ioctl, - NULL + mfrc522_open, /* open */ + mfrc522_close, /* close */ + mfrc522_read, /* read */ + mfrc522_write, /* write */ + NULL, /* seek */ + mfrc522_ioctl, /* ioctl */ + NULL /* poll */ #ifndef CONFIG_DISABLE_PSEUDOFS_OPERATIONS - , NULL + , NULL /* unlink */ #endif }; diff --git a/drivers/contactless/pn532.c b/drivers/contactless/pn532.c index f15f3324d9c..e48ea4707d9 100644 --- a/drivers/contactless/pn532.c +++ b/drivers/contactless/pn532.c @@ -104,15 +104,15 @@ static inline int pn532_attachirq(FAR struct pn532_dev_s *dev, xcpt_t isr); static const struct file_operations g_pn532fops = { - _open, - _close, - _read, - _write, - NULL, - _ioctl, - NULL + _open, /* open */ + _close, /* close */ + _read, /* read */ + _write, /* write */ + NULL, /* seek */ + _ioctl, /* ioctl */ + NULL /* poll */ #ifndef CONFIG_DISABLE_PSEUDOFS_OPERATIONS - , NULL + , NULL /* unlink */ #endif }; diff --git a/drivers/eeprom/i2c_xx24xx.c b/drivers/eeprom/i2c_xx24xx.c index 71d969db6a5..a8d4862003c 100644 --- a/drivers/eeprom/i2c_xx24xx.c +++ b/drivers/eeprom/i2c_xx24xx.c @@ -239,6 +239,9 @@ static const struct file_operations ee24xx_fops = ee24xx_seek, /* seek */ ee24xx_ioctl, /* ioctl */ NULL /* poll */ +#ifndef CONFIG_DISABLE_PSEUDOFS_OPERATIONS + , NULL /* unlink */ +#endif }; #ifdef CONFIG_AT24CS_UUID @@ -251,6 +254,9 @@ static const struct file_operations at24cs_uuid_fops = NULL, /* seek */ NULL, /* ioctl */ NULL /* poll */ +#ifndef CONFIG_DISABLE_PSEUDOFS_OPERATIONS + , NULL /* unlink */ +#endif }; #endif diff --git a/drivers/eeprom/spi_xx25xx.c b/drivers/eeprom/spi_xx25xx.c index ff485da0965..521458b4c89 100644 --- a/drivers/eeprom/spi_xx25xx.c +++ b/drivers/eeprom/spi_xx25xx.c @@ -276,6 +276,9 @@ static const struct file_operations ee25xx_fops = ee25xx_seek, /* seek */ ee25xx_ioctl, /* ioctl */ NULL /* poll */ +#ifndef CONFIG_DISABLE_PSEUDOFS_OPERATIONS + , NULL /* unlink */ +#endif }; /**************************************************************************** diff --git a/drivers/efuse/efuse.c b/drivers/efuse/efuse.c index d200fc47c4c..65d6342728a 100644 --- a/drivers/efuse/efuse.c +++ b/drivers/efuse/efuse.c @@ -88,6 +88,9 @@ static const struct file_operations g_efuseops = NULL, /* seek */ efuse_ioctl, /* ioctl */ NULL /* poll */ +#ifndef CONFIG_DISABLE_PSEUDOFS_OPERATIONS + , NULL /* unlink */ +#endif }; /**************************************************************************** diff --git a/drivers/i2s/i2schar.c b/drivers/i2s/i2schar.c index 934fe5aa334..c02df019e14 100644 --- a/drivers/i2s/i2schar.c +++ b/drivers/i2s/i2schar.c @@ -111,7 +111,10 @@ static const struct file_operations i2schar_fops = i2schar_write, /* write */ NULL, /* seek */ i2schar_ioctl, /* ioctl */ - NULL, /* poll */ + NULL /* poll */ +#ifndef CONFIG_DISABLE_PSEUDOFS_OPERATIONS + , NULL /* unlink */ +#endif }; /**************************************************************************** diff --git a/drivers/input/ads7843e.c b/drivers/input/ads7843e.c index 1217dc879f2..2df8be1987a 100644 --- a/drivers/input/ads7843e.c +++ b/drivers/input/ads7843e.c @@ -119,10 +119,13 @@ static const struct file_operations ads7843e_fops = ads7843e_open, /* open */ ads7843e_close, /* close */ ads7843e_read, /* read */ - 0, /* write */ - 0, /* seek */ + NULL, /* write */ + NULL, /* seek */ ads7843e_ioctl, /* ioctl */ ads7843e_poll /* poll */ +#ifndef CONFIG_DISABLE_PSEUDOFS_OPERATIONS + , NULL /* unlink */ +#endif }; /* If only a single ADS7843E device is supported, then the driver state diff --git a/drivers/input/ajoystick.c b/drivers/input/ajoystick.c index 33e428a4379..64ed1c52abb 100644 --- a/drivers/input/ajoystick.c +++ b/drivers/input/ajoystick.c @@ -142,10 +142,13 @@ static const struct file_operations ajoy_fops = ajoy_open, /* open */ ajoy_close, /* close */ ajoy_read, /* read */ - 0, /* write */ - 0, /* seek */ + NULL, /* write */ + NULL, /* seek */ ajoy_ioctl, /* ioctl */ ajoy_poll /* poll */ +#ifndef CONFIG_DISABLE_PSEUDOFS_OPERATIONS + , NULL /* unlink */ +#endif }; /**************************************************************************** diff --git a/drivers/input/button_upper.c b/drivers/input/button_upper.c index 1a948c16992..4107f5a4535 100644 --- a/drivers/input/button_upper.c +++ b/drivers/input/button_upper.c @@ -142,6 +142,9 @@ static const struct file_operations btn_fops = NULL, /* seek */ btn_ioctl, /* ioctl */ btn_poll /* poll */ +#ifndef CONFIG_DISABLE_PSEUDOFS_OPERATIONS + , NULL /* unlink */ +#endif }; /**************************************************************************** diff --git a/drivers/input/cypress_mbr3108.c b/drivers/input/cypress_mbr3108.c index f9e55fd2eac..f52873fec62 100644 --- a/drivers/input/cypress_mbr3108.c +++ b/drivers/input/cypress_mbr3108.c @@ -225,6 +225,9 @@ static const struct file_operations g_mbr3108_fileops = NULL, /* seek */ NULL, /* ioctl */ mbr3108_poll /* poll */ +#ifndef CONFIG_DISABLE_PSEUDOFS_OPERATIONS + , NULL /* unlink */ +#endif }; /**************************************************************************** diff --git a/drivers/input/djoystick.c b/drivers/input/djoystick.c index 4dabf23fb5e..e7f95840a22 100644 --- a/drivers/input/djoystick.c +++ b/drivers/input/djoystick.c @@ -142,10 +142,13 @@ static const struct file_operations djoy_fops = djoy_open, /* open */ djoy_close, /* close */ djoy_read, /* read */ - 0, /* write */ - 0, /* seek */ + NULL, /* write */ + NULL, /* seek */ djoy_ioctl, /* ioctl */ djoy_poll /* poll */ +#ifndef CONFIG_DISABLE_PSEUDOFS_OPERATIONS + , NULL /* unlink */ +#endif }; /**************************************************************************** diff --git a/drivers/input/max11802.c b/drivers/input/max11802.c index 0a1e00b737f..579d97ae339 100644 --- a/drivers/input/max11802.c +++ b/drivers/input/max11802.c @@ -112,12 +112,12 @@ static const struct file_operations max11802_fops = max11802_open, /* open */ max11802_close, /* close */ max11802_read, /* read */ - 0, /* write */ - 0, /* seek */ + NULL, /* write */ + NULL, /* seek */ max11802_ioctl, /* ioctl */ max11802_poll /* poll */ #ifndef CONFIG_DISABLE_PSEUDOFS_OPERATIONS - , 0 /* unlink */ + , NULL /* unlink */ #endif }; diff --git a/drivers/input/mxt.c b/drivers/input/mxt.c index 81a1c3ac193..0bd3a40dea5 100644 --- a/drivers/input/mxt.c +++ b/drivers/input/mxt.c @@ -276,10 +276,13 @@ static const struct file_operations mxt_fops = mxt_open, /* open */ mxt_close, /* close */ mxt_read, /* read */ - 0, /* write */ - 0, /* seek */ + NULL, /* write */ + NULL, /* seek */ mxt_ioctl, /* ioctl */ mxt_poll /* poll */ +#ifndef CONFIG_DISABLE_PSEUDOFS_OPERATIONS + , NULL /* unlink */ +#endif }; /**************************************************************************** diff --git a/drivers/input/spq10kbd.c b/drivers/input/spq10kbd.c index 65a8ae57fbb..6f13ba6a76e 100644 --- a/drivers/input/spq10kbd.c +++ b/drivers/input/spq10kbd.c @@ -248,13 +248,16 @@ static int spq10kbd_poll(FAR struct file *filep, FAR struct pollfd *fds, static const struct file_operations g_hidkbd_fops = { - spq10kbd_open, /* open */ - spq10kbd_close, /* close */ - spq10kbd_read, /* read */ - spq10kbd_write, /* write */ - NULL, /* seek */ - NULL, /* ioctl */ - spq10kbd_poll /* poll */ + spq10kbd_open, /* open */ + spq10kbd_close, /* close */ + spq10kbd_read, /* read */ + spq10kbd_write, /* write */ + NULL, /* seek */ + NULL, /* ioctl */ + spq10kbd_poll /* poll */ +#ifndef CONFIG_DISABLE_PSEUDOFS_OPERATIONS + , NULL /* unlink */ +#endif }; /**************************************************************************** diff --git a/drivers/input/stmpe811_tsc.c b/drivers/input/stmpe811_tsc.c index 74962410978..e48c9cb9362 100644 --- a/drivers/input/stmpe811_tsc.c +++ b/drivers/input/stmpe811_tsc.c @@ -125,6 +125,9 @@ static const struct file_operations g_stmpe811fops = NULL, /* seek */ stmpe811_ioctl, /* ioctl */ stmpe811_poll /* poll */ +#ifndef CONFIG_DISABLE_PSEUDOFS_OPERATIONS + , NULL /* unlink */ +#endif }; /**************************************************************************** diff --git a/drivers/input/touchscreen_upper.c b/drivers/input/touchscreen_upper.c index 1298f03e8aa..e1a53f03d50 100644 --- a/drivers/input/touchscreen_upper.c +++ b/drivers/input/touchscreen_upper.c @@ -87,13 +87,16 @@ static int touch_poll(FAR struct file *filep, FAR struct pollfd *fds, static const struct file_operations g_touch_fops = { - touch_open, - touch_close, - touch_read, - NULL, - NULL, - touch_ioctl, - touch_poll + touch_open, /* open */ + touch_close, /* close */ + touch_read, /* read */ + NULL, /* write */ + NULL, /* seek */ + touch_ioctl, /* ioctl */ + touch_poll /* poll */ +#ifndef CONFIG_DISABLE_PSEUDOFS_OPERATIONS + , NULL /* unlink */ +#endif }; /**************************************************************************** diff --git a/drivers/input/tsc2007.c b/drivers/input/tsc2007.c index 947d453da3c..0a7089ad90d 100644 --- a/drivers/input/tsc2007.c +++ b/drivers/input/tsc2007.c @@ -205,10 +205,13 @@ static const struct file_operations tsc2007_fops = tsc2007_open, /* open */ tsc2007_close, /* close */ tsc2007_read, /* read */ - 0, /* write */ - 0, /* seek */ + NULL, /* write */ + NULL, /* seek */ tsc2007_ioctl, /* ioctl */ tsc2007_poll /* poll */ +#ifndef CONFIG_DISABLE_PSEUDOFS_OPERATIONS + , NULL /* unlink */ +#endif }; /* If only a single TSC2007 device is supported, then the driver state diff --git a/drivers/lcd/ht16k33_14seg.c b/drivers/lcd/ht16k33_14seg.c index 460d9c6d871..375059770c1 100644 --- a/drivers/lcd/ht16k33_14seg.c +++ b/drivers/lcd/ht16k33_14seg.c @@ -160,9 +160,9 @@ static const struct file_operations g_ht16k33fops = ht16k33_write, /* write */ ht16k33_seek, /* seek */ ht16k33_ioctl, /* ioctl */ - NULL, /* poll */ + NULL /* poll */ #ifndef CONFIG_DISABLE_PSEUDOFS_OPERATIONS - NULL /* unlink */ + , NULL /* unlink */ #endif }; diff --git a/drivers/lcd/pcf8574_lcd_backpack.c b/drivers/lcd/pcf8574_lcd_backpack.c index 5574517ce42..a915483913f 100644 --- a/drivers/lcd/pcf8574_lcd_backpack.c +++ b/drivers/lcd/pcf8574_lcd_backpack.c @@ -123,9 +123,9 @@ static const struct file_operations g_pcf8574_lcd_fops = pcf8574_lcd_write, /* write */ pcf8574_lcd_seek, /* seek */ pcf8574_lcd_ioctl, /* ioctl */ - pcf8574lcd_poll, /* poll */ + pcf8574lcd_poll /* poll */ #ifndef CONFIG_DISABLE_PSEUDOFS_OPERATIONS - pcf8574_lcd_unlink /* unlink */ + , pcf8574_lcd_unlink /* unlink */ #endif }; diff --git a/drivers/lcd/st7032.c b/drivers/lcd/st7032.c index 8d51dff1ff1..42d72925dcc 100644 --- a/drivers/lcd/st7032.c +++ b/drivers/lcd/st7032.c @@ -116,9 +116,9 @@ static const struct file_operations g_st7032fops = st7032_write, /* write */ st7032_seek, /* seek */ st7032_ioctl, /* ioctl */ - NULL, /* poll */ + NULL /* poll */ #ifndef CONFIG_DISABLE_PSEUDOFS_OPERATIONS - NULL /* unlink */ + , NULL /* unlink */ #endif }; diff --git a/drivers/leds/max7219.c b/drivers/leds/max7219.c index da38b88453c..2a5ed6035d5 100644 --- a/drivers/leds/max7219.c +++ b/drivers/leds/max7219.c @@ -89,9 +89,9 @@ static const struct file_operations g_max7219fops = max7219_write, /* write */ NULL, /* seek */ NULL, /* ioctl */ - NULL, /* poll */ + NULL /* poll */ #ifndef CONFIG_DISABLE_PSEUDOFS_OPERATIONS - NULL /* unlink */ + , NULL /* unlink */ #endif }; diff --git a/drivers/leds/ncp5623c.c b/drivers/leds/ncp5623c.c index e387f6bbd3d..794aa3070b0 100644 --- a/drivers/leds/ncp5623c.c +++ b/drivers/leds/ncp5623c.c @@ -86,9 +86,12 @@ static const struct file_operations g_ncp5623c_fileops = ncp5623c_close, /* close */ ncp5623c_read, /* read */ ncp5623c_write, /* write */ - 0, /* seek */ + NULL, /* seek */ ncp5623c_ioctl, /* ioctl */ - 0 /* poll */ + NULL /* poll */ +#ifndef CONFIG_DISABLE_PSEUDOFS_OPERATIONS + , NULL /* unlink */ +#endif }; /**************************************************************************** diff --git a/drivers/leds/pca9635pw.c b/drivers/leds/pca9635pw.c index dcd3afd6b9e..d087695ca61 100644 --- a/drivers/leds/pca9635pw.c +++ b/drivers/leds/pca9635pw.c @@ -68,11 +68,14 @@ static const struct file_operations g_pca9635pw_fileops = { pca9635pw_open, /* open */ pca9635pw_close, /* close */ - 0, /* read */ - 0, /* write */ - 0, /* seek */ + NULL, /* read */ + NULL, /* write */ + NULL, /* seek */ pca9635pw_ioctl, /* ioctl */ - 0 /* poll */ + NULL /* poll */ +#ifndef CONFIG_DISABLE_PSEUDOFS_OPERATIONS + , NULL /* unlink */ +#endif }; /**************************************************************************** diff --git a/drivers/leds/ws2812.c b/drivers/leds/ws2812.c index 7c7b667290a..2e581321f71 100644 --- a/drivers/leds/ws2812.c +++ b/drivers/leds/ws2812.c @@ -131,9 +131,9 @@ static const struct file_operations g_ws2812fops = ws2812_write, /* write */ ws2812_seek, /* seek */ NULL, /* ioctl */ - NULL, /* poll */ + NULL /* poll */ #ifndef CONFIG_DISABLE_PSEUDOFS_OPERATIONS - NULL /* unlink */ + , NULL /* unlink */ #endif }; diff --git a/drivers/loop/loop.c b/drivers/loop/loop.c index bb5b6ed30fd..a0554da3129 100644 --- a/drivers/loop/loop.c +++ b/drivers/loop/loop.c @@ -58,6 +58,9 @@ static const struct file_operations g_loop_fops = NULL, /* seek */ loop_ioctl, /* ioctl */ NULL /* poll */ +#ifndef CONFIG_DISABLE_PSEUDOFS_OPERATIONS + , NULL /* unlink */ +#endif }; /**************************************************************************** diff --git a/drivers/lwl_console.c b/drivers/lwl_console.c index ff6bdd8a310..29ad0860a71 100644 --- a/drivers/lwl_console.c +++ b/drivers/lwl_console.c @@ -139,8 +139,7 @@ static const struct file_operations g_consoleops = lwlconsole_ioctl, /* ioctl */ NULL /* poll */ #ifndef CONFIG_DISABLE_PSEUDOFS_OPERATIONS - , - NULL /* unlink */ + , NULL /* unlink */ #endif }; diff --git a/drivers/math/cordic.c b/drivers/math/cordic.c index ae6fe2d1fa1..08943034ac2 100644 --- a/drivers/math/cordic.c +++ b/drivers/math/cordic.c @@ -82,6 +82,9 @@ static const struct file_operations g_cordicops = NULL, /* seek */ cordic_ioctl, /* ioctl */ NULL /* poll */ +#ifndef CONFIG_DISABLE_PSEUDOFS_OPERATIONS + , NULL /* unlink */ +#endif }; /**************************************************************************** diff --git a/drivers/modem/altair/altmdm.c b/drivers/modem/altair/altmdm.c index 7dcfdaf26b2..84ecf266837 100644 --- a/drivers/modem/altair/altmdm.c +++ b/drivers/modem/altair/altmdm.c @@ -62,8 +62,12 @@ static const struct file_operations g_altmdmfops = altmdm_close, /* close */ altmdm_read, /* read */ altmdm_write, /* write */ - 0, /* seek */ + NULL, /* seek */ altmdm_ioctl, /* ioctl */ + NULL /* poll */ +#ifndef CONFIG_DISABLE_PSEUDOFS_OPERATIONS + , NULL /* unlink */ +#endif }; /**************************************************************************** diff --git a/drivers/modem/u-blox.c b/drivers/modem/u-blox.c index 3628df7c1c3..ecb8df0b80a 100644 --- a/drivers/modem/u-blox.c +++ b/drivers/modem/u-blox.c @@ -108,13 +108,16 @@ static int ubxmdm_poll (FAR struct file * filep, static const struct file_operations ubxmdm_fops = { - 0, /* open */ - 0, /* close */ + NULL, /* open */ + NULL, /* close */ ubxmdm_read, /* read */ ubxmdm_write, /* write */ - 0, /* seek */ + NULL, /* seek */ ubxmdm_ioctl, /* ioctl */ ubxmdm_poll /* poll */ +#ifndef CONFIG_DISABLE_PSEUDOFS_OPERATIONS + , NULL /* unlink */ +#endif }; /**************************************************************************** diff --git a/drivers/mtd/mtd_config.c b/drivers/mtd/mtd_config.c index 48ab8e200f5..75ad692f54d 100644 --- a/drivers/mtd/mtd_config.c +++ b/drivers/mtd/mtd_config.c @@ -119,10 +119,13 @@ static const struct file_operations mtdconfig_fops = mtdconfig_open, /* open */ mtdconfig_close, /* close */ mtdconfig_read, /* read */ - 0, /* write */ - 0, /* seek */ + NULL, /* write */ + NULL, /* seek */ mtdconfig_ioctl, /* ioctl */ mtdconfig_poll /* poll */ +#ifndef CONFIG_DISABLE_PSEUDOFS_OPERATIONS + , NULL /* unlink */ +#endif }; /**************************************************************************** diff --git a/drivers/mtd/smart.c b/drivers/mtd/smart.c index 5a414232b3c..d8054ad5a12 100644 --- a/drivers/mtd/smart.c +++ b/drivers/mtd/smart.c @@ -462,6 +462,9 @@ static const struct file_operations g_fops = NULL, /* seek */ smart_loop_ioctl, /* ioctl */ NULL /* poll */ +#ifndef CONFIG_DISABLE_PSEUDOFS_OPERATIONS + , NULL /* unlink */ +#endif }; #endif /* CONFIG_SMART_DEV_LOOP */ @@ -2676,7 +2679,9 @@ err_out: static void smart_erase_block_if_empty(FAR struct smart_struct_s *dev, uint16_t block, uint8_t forceerase) { - uint16_t freecount, releasecount, prerelease; + uint16_t freecount; + uint16_t releasecount; + uint16_t prerelease; #ifdef CONFIG_MTD_SMART_PACK_COUNTS releasecount = smart_get_count(dev, dev->releasecount, block); @@ -2771,10 +2776,15 @@ static void smart_erase_block_if_empty(FAR struct smart_struct_s *dev, static int smart_relocate_static_data(FAR struct smart_struct_s *dev, uint16_t block) { - uint16_t freecount, x, sector, minblock; - uint16_t nextsector, newsector, mincount; - int ret; - FAR struct smart_sect_header_s *header; + uint16_t freecount; + uint16_t x; + uint16_t sector; + uint16_t minblock; + uint16_t nextsector; + uint16_t newsector; + uint16_t mincount; + int ret; + FAR struct smart_sect_header_s *header; #ifdef CONFIG_MTD_SMART_ENABLE_CRC FAR struct smart_allocsector_s *allocsector; #endif @@ -3012,7 +3022,7 @@ errout: #ifdef CONFIG_MTD_SMART_ENABLE_CRC static crc_t smart_calc_sector_crc(FAR struct smart_struct_s *dev) { - crc_t crc = 0; + crc_t crc = 0; #ifdef CONFIG_SMART_CRC_8 @@ -3085,12 +3095,13 @@ static crc_t smart_calc_sector_crc(FAR struct smart_struct_s *dev) static inline int smart_llformat(FAR struct smart_struct_s *dev, unsigned long arg) { - FAR struct smart_sect_header_s *sectorheader; - size_t wrcount; - int x; - int ret; - uint8_t sectsize, prerelease; - uint16_t sectorsize; + FAR struct smart_sect_header_s *sectorheader; + size_t wrcount; + int x; + int ret; + uint8_t sectsize; + uint8_t prerelease; + uint16_t sectorsize; finfo("Entry\n"); @@ -3305,12 +3316,12 @@ static inline int smart_llformat(FAR struct smart_struct_s *dev, ****************************************************************************/ static int smart_relocate_sector(FAR struct smart_struct_s *dev, - uint16_t oldsector, uint16_t newsector) + uint16_t oldsector, uint16_t newsector) { - size_t offset; - FAR struct smart_sect_header_s *header; - uint8_t newstatus; - int ret; + size_t offset; + FAR struct smart_sect_header_s *header; + uint8_t newstatus; + int ret; header = (FAR struct smart_sect_header_s *) dev->rwbuffer; @@ -3445,14 +3456,15 @@ errout: static int smart_relocate_block(FAR struct smart_struct_s *dev, uint16_t block) { - uint16_t newsector, oldrelease; - int x; - int ret; - FAR struct smart_sect_header_s *header; - uint8_t prerelease; - uint16_t freecount; + uint16_t newsector; + uint16_t oldrelease; + int x; + int ret; + FAR struct smart_sect_header_s *header; + uint8_t prerelease; + uint16_t freecount; #if defined(CONFIG_SMART_LOCAL_CHECKFREE) && defined(CONFIG_DEBUG_FS) - uint16_t releasecount; + uint16_t releasecount; #endif #ifdef CONFIG_MTD_SMART_ENABLE_CRC FAR struct smart_allocsector_s *allocsector; @@ -3704,18 +3716,22 @@ errout: static int smart_findfreephyssector(FAR struct smart_struct_s *dev, uint8_t canrelocate) { - uint16_t count, allocfreecount, allocblock; + uint16_t count; + uint16_t allocfreecount; + uint16_t allocblock; #ifdef CONFIG_MTD_SMART_WEAR_LEVEL - uint16_t wornfreecount, wornblock; - uint8_t wearlevel, wornlevel; - uint8_t maxwearlevel; + uint16_t wornfreecount; + uint16_t wornblock; + uint8_t wearlevel; + uint8_t wornlevel; + uint8_t maxwearlevel; #endif - uint16_t physicalsector; - uint16_t block; - uint32_t readaddr; - struct smart_sect_header_s header; - int ret; - uint16_t i; + uint16_t physicalsector; + uint16_t block; + uint32_t readaddr; + struct smart_sect_header_s header; + int ret; + uint16_t i; /* Determine which erase block we should allocate the new * sector from. This is based on the number of free sectors @@ -3982,13 +3998,13 @@ retry: static int smart_garbagecollect(FAR struct smart_struct_s *dev) { - uint16_t collectblock; - uint16_t releasemax; - bool collect = TRUE; - int x; - int ret; + uint16_t collectblock; + uint16_t releasemax; + bool collect = TRUE; + int x; + int ret; #ifdef CONFIG_MTD_SMART_PACK_COUNTS - uint8_t count; + uint8_t count; #endif while (collect) @@ -4115,11 +4131,13 @@ errout: #ifdef CONFIG_MTD_SMART_WEAR_LEVEL static int smart_write_wearstatus(struct smart_struct_s *dev) { - uint16_t sector; - uint16_t remaining, towrite; + uint16_t sector; + uint16_t remaining; + uint16_t towrite; struct smart_read_write_s req; - int ret; - uint8_t buffer[8], write_buffer = 0; + int ret; + uint8_t buffer[8]; + uint8_t write_buffer = 0; sector = 0; remaining = dev->geo.neraseblocks >> 1; @@ -4235,8 +4253,10 @@ errout: static inline int smart_read_wearstatus(FAR struct smart_struct_s *dev) { struct smart_read_write_s req; - uint16_t sector, physsector; - uint16_t remaining, toread; + uint16_t sector; + uint16_t physsector; + uint16_t remaining; + uint16_t toread; uint8_t buffer[8]; int ret; @@ -4385,9 +4405,9 @@ errout: static int smart_write_alloc_sector(FAR struct smart_struct_s *dev, uint16_t logical, uint16_t physical) { - int ret = 1; - uint8_t sectsize; - FAR struct smart_sect_header_s *header; + int ret = 1; + uint8_t sectsize; + FAR struct smart_sect_header_s *header; memset(dev->rwbuffer, CONFIG_SMARTFS_ERASEDSTATE, dev->sectorsize); header = (FAR struct smart_sect_header_s *) dev->rwbuffer; @@ -4464,8 +4484,8 @@ static int smart_write_alloc_sector(FAR struct smart_struct_s *dev, #ifdef CONFIG_MTD_SMART_ENABLE_CRC static int smart_validate_crc(FAR struct smart_struct_s *dev) { - crc_t crc; - FAR struct smart_sect_header_s *header; + crc_t crc; + FAR struct smart_sect_header_s *header; /* Calculate CRC on data region of the sector */ @@ -4519,19 +4539,21 @@ static int smart_validate_crc(FAR struct smart_struct_s *dev) static int smart_writesector(FAR struct smart_struct_s *dev, unsigned long arg) { - int ret; - bool needsrelocate = FALSE; - uint32_t mtdblock; - uint16_t physsector, oldphyssector, block; - FAR struct smart_read_write_s *req; - FAR struct smart_sect_header_s *header; - size_t offset; - uint8_t byte; + int ret; + bool needsrelocate = FALSE; + uint32_t mtdblock; + uint16_t physsector; + uint16_t oldphyssector; + uint16_t block; + FAR struct smart_read_write_s *req; + FAR struct smart_sect_header_s *header; + size_t offset; + uint8_t byte; #if defined(CONFIG_MTD_SMART_WEAR_LEVEL) || !defined(CONFIG_MTD_SMART_ENABLE_CRC) - uint16_t x; + uint16_t x; #endif #ifdef CONFIG_MTD_SMART_ENABLE_CRC - FAR struct smart_allocsector_s *allocsector; + FAR struct smart_allocsector_s *allocsector; #endif finfo("Entry\n"); @@ -4932,15 +4954,15 @@ errout: static int smart_readsector(FAR struct smart_struct_s *dev, unsigned long arg) { - int ret; - uint16_t physsector; + int ret; + uint16_t physsector; FAR struct smart_read_write_s *req; #ifdef CONFIG_MTD_SMART_ENABLE_CRC #if SMART_STATUS_VERSION == 1 FAR struct smart_sect_header_s *header; #endif #else - uint32_t readaddr; + uint32_t readaddr; struct smart_sect_header_s header; #endif @@ -5085,12 +5107,12 @@ errout: static inline int smart_allocsector(FAR struct smart_struct_s *dev, unsigned long requested) { - uint16_t logsector = 0xffff; /* Logical sector number selected */ - uint16_t physicalsector; /* The selected physical sector */ + uint16_t logsector = 0xffff; /* Logical sector number selected */ + uint16_t physicalsector; /* The selected physical sector */ #ifndef CONFIG_MTD_SMART_ENABLE_CRC - int ret; + int ret; #endif - int x; + int x; /* Validate that we have enough sectors available to perform an * allocation. We have to ensure we keep enough reserved sectors @@ -5334,12 +5356,12 @@ static inline int smart_allocsector(FAR struct smart_struct_s *dev, static inline int smart_freesector(FAR struct smart_struct_s *dev, unsigned long logicalsector) { - int ret; - int readaddr; - uint16_t physsector; - uint16_t block; - struct smart_sect_header_s header; - size_t offset; + int ret; + int readaddr; + uint16_t physsector; + uint16_t block; + struct smart_sect_header_s header; + size_t offset; /* Check if the logical sector is within bounds */ @@ -5445,7 +5467,7 @@ errout: static int smart_ioctl(FAR struct inode *inode, int cmd, unsigned long arg) { - FAR struct smart_struct_s *dev ; + FAR struct smart_struct_s *dev; int ret; #if defined(CONFIG_FS_PROCFS) && !defined(CONFIG_FS_PROCFS_EXCLUDE_SMARTFS) FAR struct mtd_smart_procfs_data_s *procfs_data; @@ -5647,15 +5669,15 @@ static int smart_fsck_crc(FAR struct smart_struct_s *dev, static int smart_fsck_file(FAR struct smart_struct_s *dev, FAR uint8_t *checkmap, uint16_t logsector) { - int ret = OK; - ssize_t size; - uint32_t readaddress; - FAR struct smart_sect_header_s *header; - FAR struct smart_chain_header_s *chain; - FAR uint8_t *usedmap; - size_t mapsize; - uint16_t physsector; - int i; + int ret = OK; + ssize_t size; + uint32_t readaddress; + FAR struct smart_sect_header_s *header; + FAR struct smart_chain_header_s *chain; + FAR uint8_t *usedmap; + size_t mapsize; + uint16_t physsector; + int i; if (logsector >= dev->totalsectors) { @@ -5770,22 +5792,22 @@ static int smart_fsck_file(FAR struct smart_struct_s *dev, static int smart_fsck_directory(FAR struct smart_struct_s *dev, FAR uint8_t *checkmap, uint16_t logsector) { - int ret = OK; - int relocate = 0; - ssize_t size; - FAR uint8_t *rwbuffer; - FAR struct smart_sect_header_s *header; - FAR struct smart_chain_header_s *chain; - FAR struct smart_entry_header_s *entry; - uint16_t entrysector; - uint16_t physsector; - uint16_t nextsector; - uint16_t newsector; - int entrysize; - FAR uint8_t *bottom; - FAR uint8_t *cur; + int ret = OK; + int relocate = 0; + ssize_t size; + FAR uint8_t *rwbuffer; + FAR struct smart_sect_header_s *header; + FAR struct smart_chain_header_s *chain; + FAR struct smart_entry_header_s *entry; + uint16_t entrysector; + uint16_t physsector; + uint16_t nextsector; + uint16_t newsector; + int entrysize; + FAR uint8_t *bottom; + FAR uint8_t *cur; #ifdef CONFIG_DEBUG_FS_INFO - char entryname[dev->namesize + 1]; + char entryname[dev->namesize + 1]; #endif if ((logsector < SMART_FIRST_DIR_SECTOR) || @@ -6027,14 +6049,14 @@ errout: static int smart_fsck(FAR struct smart_struct_s *dev) { - uint16_t logsector; + uint16_t logsector; #ifndef CONFIG_MTD_SMART_MINIMIZE_RAM - uint16_t physsector; + uint16_t physsector; #endif - FAR uint8_t *checkmap; - size_t mapsize; - uint8_t rootdirentries; - int x; + FAR uint8_t *checkmap; + size_t mapsize; + uint8_t rootdirentries; + int x; finfo("Entry\n"); @@ -6118,7 +6140,7 @@ int smart_initialize(int minor, FAR struct mtd_dev_s *mtd, { FAR struct smart_struct_s *dev; int ret = -ENOMEM; - uint32_t totalsectors; + uint32_t totalsectors; #ifdef CONFIG_SMARTFS_MULTI_ROOT_DIRS FAR struct smart_multiroot_device_s *rootdirdev = NULL; #endif @@ -6310,9 +6332,10 @@ static int smart_losetup(int minor, FAR const char *filename, int sectsize, int erasesize, off_t offset, bool readonly) { FAR struct mtd_dev_s *mtd; - struct stat sb; - int x, ret; - char devpath[20]; + struct stat sb; + int x; + int ret; + char devpath[20]; /* Try to create a filemtd device using the filename provided */ diff --git a/drivers/net/tun.c b/drivers/net/tun.c index c83741dfc66..4e488505eb8 100644 --- a/drivers/net/tun.c +++ b/drivers/net/tun.c @@ -237,9 +237,9 @@ static const struct file_operations g_tun_file_ops = tun_write, /* write */ NULL, /* seek */ tun_ioctl, /* ioctl */ - tun_poll, /* poll */ + tun_poll /* poll */ #ifndef CONFIG_DISABLE_PSEUDOFS_OPERATIONS - NULL, /* unlink */ + , NULL /* unlink */ #endif }; diff --git a/drivers/note/notectl_driver.c b/drivers/note/notectl_driver.c index 35157c32d06..e911e6dd16d 100644 --- a/drivers/note/notectl_driver.c +++ b/drivers/note/notectl_driver.c @@ -54,7 +54,7 @@ static const struct file_operations notectl_fops = notectl_ioctl, /* ioctl */ NULL /* poll */ #ifndef CONFIG_DISABLE_PSEUDOFS_OPERATIONS - , 0 /* unlink */ + , NULL /* unlink */ #endif }; diff --git a/drivers/note/noteram_driver.c b/drivers/note/noteram_driver.c index 7598fe199f2..800ee25c53d 100644 --- a/drivers/note/noteram_driver.c +++ b/drivers/note/noteram_driver.c @@ -88,7 +88,7 @@ static const struct file_operations g_noteram_fops = noteram_ioctl, /* ioctl */ NULL /* poll */ #ifndef CONFIG_DISABLE_PSEUDOFS_OPERATIONS - , 0 /* unlink */ + , NULL /* unlink */ #endif }; diff --git a/drivers/pipes/fifo.c b/drivers/pipes/fifo.c index ef0fd6484f3..f629c6e3dac 100644 --- a/drivers/pipes/fifo.c +++ b/drivers/pipes/fifo.c @@ -41,15 +41,15 @@ static const struct file_operations fifo_fops = { - pipecommon_open, /* open */ - pipecommon_close, /* close */ - pipecommon_read, /* read */ - pipecommon_write, /* write */ - 0, /* seek */ - pipecommon_ioctl, /* ioctl */ - pipecommon_poll, /* poll */ + pipecommon_open, /* open */ + pipecommon_close, /* close */ + pipecommon_read, /* read */ + pipecommon_write, /* write */ + NULL, /* seek */ + pipecommon_ioctl, /* ioctl */ + pipecommon_poll /* poll */ #ifndef CONFIG_DISABLE_PSEUDOFS_OPERATIONS - pipecommon_unlink /* unlink */ + , pipecommon_unlink /* unlink */ #endif }; diff --git a/drivers/pipes/pipe.c b/drivers/pipes/pipe.c index 2032d32f027..a77ce796db3 100644 --- a/drivers/pipes/pipe.c +++ b/drivers/pipes/pipe.c @@ -61,15 +61,15 @@ static int pipe_close(FAR struct file *filep); static const struct file_operations pipe_fops = { - pipecommon_open, /* open */ - pipe_close, /* close */ - pipecommon_read, /* read */ - pipecommon_write, /* write */ - 0, /* seek */ - pipecommon_ioctl, /* ioctl */ - pipecommon_poll, /* poll */ + pipecommon_open, /* open */ + pipe_close, /* close */ + pipecommon_read, /* read */ + pipecommon_write, /* write */ + NULL, /* seek */ + pipecommon_ioctl, /* ioctl */ + pipecommon_poll /* poll */ #ifndef CONFIG_DISABLE_PSEUDOFS_OPERATIONS - pipecommon_unlink /* unlink */ + , pipecommon_unlink /* unlink */ #endif }; diff --git a/drivers/power/battery_charger.c b/drivers/power/battery_charger.c index 6c022b74956..db238287166 100644 --- a/drivers/power/battery_charger.c +++ b/drivers/power/battery_charger.c @@ -85,13 +85,16 @@ static int bat_charger_poll(FAR struct file *filep, static const struct file_operations g_batteryops = { - bat_charger_open, - bat_charger_close, - bat_charger_read, - bat_charger_write, - NULL, - bat_charger_ioctl, - bat_charger_poll, + bat_charger_open, /* open */ + bat_charger_close, /* close */ + bat_charger_read, /* read */ + bat_charger_write, /* write */ + NULL, /* seek */ + bat_charger_ioctl, /* ioctl */ + bat_charger_poll /* poll */ +#ifndef CONFIG_DISABLE_PSEUDOFS_OPERATIONS + , NULL /* unlink */ +#endif }; /**************************************************************************** diff --git a/drivers/power/battery_gauge.c b/drivers/power/battery_gauge.c index eed9b3b8963..00c27975888 100644 --- a/drivers/power/battery_gauge.c +++ b/drivers/power/battery_gauge.c @@ -87,13 +87,16 @@ static int bat_gauge_poll(FAR struct file *filep, static const struct file_operations g_batteryops = { - bat_gauge_open, - bat_gauge_close, - bat_gauge_read, - bat_gauge_write, - NULL, - bat_gauge_ioctl, - bat_gauge_poll + bat_gauge_open, /* open */ + bat_gauge_close, /* close */ + bat_gauge_read, /* read */ + bat_gauge_write, /* write */ + NULL, /* seek */ + bat_gauge_ioctl, /* ioctl */ + bat_gauge_poll /* poll */ +#ifndef CONFIG_DISABLE_PSEUDOFS_OPERATIONS + , NULL /* unlink */ +#endif }; /**************************************************************************** diff --git a/drivers/power/battery_monitor.c b/drivers/power/battery_monitor.c index 2a6ddec37bc..d03dd41ffe2 100644 --- a/drivers/power/battery_monitor.c +++ b/drivers/power/battery_monitor.c @@ -86,13 +86,16 @@ static int bat_monitor_poll(FAR struct file *filep, static const struct file_operations g_batteryops = { - bat_monitor_open, - bat_monitor_close, - bat_monitor_read, - bat_monitor_write, - NULL, - bat_monitor_ioctl, - bat_monitor_poll + bat_monitor_open, /* open */ + bat_monitor_close, /* close */ + bat_monitor_read, /* read */ + bat_monitor_write, /* write */ + NULL, /* seek */ + bat_monitor_ioctl, /* ioctl */ + bat_monitor_poll /* poll */ +#ifndef CONFIG_DISABLE_PSEUDOFS_OPERATIONS + , NULL /* unlink */ +#endif }; /**************************************************************************** diff --git a/drivers/rc/lirc_dev.c b/drivers/rc/lirc_dev.c index da36f2b8f42..dc5249378d8 100644 --- a/drivers/rc/lirc_dev.c +++ b/drivers/rc/lirc_dev.c @@ -97,13 +97,16 @@ static ssize_t lirc_read(FAR struct file *filep, FAR char *buffer, static const struct file_operations g_lirc_fops = { - lirc_open, /* open */ + lirc_open, /* open */ lirc_close, /* close */ - lirc_read, /* read */ + lirc_read, /* read */ lirc_write, /* write */ - NULL, /* seek */ + NULL, /* seek */ lirc_ioctl, /* ioctl */ - lirc_poll, /* poll */ + lirc_poll /* poll */ +#ifndef CONFIG_DISABLE_PSEUDOFS_OPERATIONS + , NULL /* unlink */ +#endif }; /**************************************************************************** diff --git a/drivers/rf/dat-31r5-sp.c b/drivers/rf/dat-31r5-sp.c index f68e32e24a9..5c9aa9f786a 100644 --- a/drivers/rf/dat-31r5-sp.c +++ b/drivers/rf/dat-31r5-sp.c @@ -79,13 +79,16 @@ static int dat31r5sp_ioctl(FAR struct file *filep, int cmd, static const struct file_operations g_dat31r5sp_fops = { - dat31r5sp_open, - dat31r5sp_close, - dat31r5sp_read, - dat31r5sp_write, - NULL, - dat31r5sp_ioctl, - NULL + dat31r5sp_open, /* open */ + dat31r5sp_close, /* close */ + dat31r5sp_read, /* read */ + dat31r5sp_write, /* write */ + NULL, /* seek */ + dat31r5sp_ioctl, /* ioctl */ + NULL /* poll */ +#ifndef CONFIG_DISABLE_PSEUDOFS_OPERATIONS + , NULL /* unlink */ +#endif }; /**************************************************************************** diff --git a/drivers/rptun/rptun.c b/drivers/rptun/rptun.c index a4502765d1a..df07bcc89bb 100644 --- a/drivers/rptun/rptun.c +++ b/drivers/rptun/rptun.c @@ -153,7 +153,16 @@ static struct remoteproc_ops g_rptun_ops = static const struct file_operations g_rptun_devops = { - .ioctl = rptun_dev_ioctl, + NULL, /* open */ + NULL, /* close */ + NULL, /* read */ + NULL, /* write */ + NULL, /* seek */ + rptun_dev_ioctl, /* ioctl */ + NULL /* poll */ +#ifndef CONFIG_DISABLE_PSEUDOFS_OPERATIONS + , NULL /* unlink */ +#endif }; #ifdef CONFIG_RPTUN_LOADER diff --git a/drivers/sensors/adt7320.c b/drivers/sensors/adt7320.c index 924c09f4a52..fd0e8c77e04 100644 --- a/drivers/sensors/adt7320.c +++ b/drivers/sensors/adt7320.c @@ -101,13 +101,16 @@ static int adt7320_ioctl(FAR struct file *filep, int cmd, unsigned long arg); static const struct file_operations g_adt7320fops = { - adt7320_open, - adt7320_close, - adt7320_read, - adt7320_write, - NULL, - adt7320_ioctl, - NULL + adt7320_open, /* open */ + adt7320_close, /* close */ + adt7320_read, /* read */ + adt7320_write, /* write */ + NULL, /* seek */ + adt7320_ioctl, /* ioctl */ + NULL /* poll */ +#ifndef CONFIG_DISABLE_PSEUDOFS_OPERATIONS + , NULL /* unlink */ +#endif }; /**************************************************************************** diff --git a/drivers/sensors/adxl345_base.c b/drivers/sensors/adxl345_base.c index 03ff01204e3..02a652baa2e 100644 --- a/drivers/sensors/adxl345_base.c +++ b/drivers/sensors/adxl345_base.c @@ -65,9 +65,13 @@ static const struct file_operations g_adxl345fops = adxl345_open, /* open */ adxl345_close, /* close */ adxl345_read, /* read */ - 0, /* write */ - 0, /* seek */ - 0, /* ioctl */ + NULL, /* write */ + NULL, /* seek */ + NULL, /* ioctl */ + NULL /* poll */ +#ifndef CONFIG_DISABLE_PSEUDOFS_OPERATIONS + , NULL /* unlink */ +#endif }; /**************************************************************************** diff --git a/drivers/sensors/adxl372.c b/drivers/sensors/adxl372.c index 96236fa5be4..be7d9fe05e1 100644 --- a/drivers/sensors/adxl372.c +++ b/drivers/sensors/adxl372.c @@ -119,15 +119,15 @@ static void adxl372_dvr_exchange(FAR void *instance, static const struct file_operations g_adxl372_fops = { - adxl372_open, - adxl372_close, - adxl372_read, - adxl372_write, - adxl372_seek, - adxl372_ioctl, - NULL + adxl372_open, /* open */ + adxl372_close, /* close */ + adxl372_read, /* read */ + adxl372_write, /* write */ + adxl372_seek, /* seek */ + adxl372_ioctl, /* ioctl */ + NULL /* poll */ #ifndef CONFIG_DISABLE_PSEUDOFS_OPERATIONS - , NULL + , NULL /* unlink */ #endif }; diff --git a/drivers/sensors/ak09912.c b/drivers/sensors/ak09912.c index aaeef86fb41..9ed5b52d44c 100644 --- a/drivers/sensors/ak09912.c +++ b/drivers/sensors/ak09912.c @@ -178,12 +178,12 @@ static const struct file_operations g_ak09912fops = ak09912_close, /* close */ ak09912_read, /* read */ ak09912_write, /* write */ - 0, /* seek */ + NULL, /* seek */ ak09912_ioctl, /* ioctl */ -#ifndef CONFIG_DISABLE_POLL - 0, /* poll */ + NULL /* poll */ +#ifndef CONFIG_DISABLE_PSEUDOFS_OPERATIONS + , NULL /* unlink */ #endif - 0 /* unlink */ }; /**************************************************************************** diff --git a/drivers/sensors/bmg160.c b/drivers/sensors/bmg160.c index bb8abb2ac15..75005bbab78 100644 --- a/drivers/sensors/bmg160.c +++ b/drivers/sensors/bmg160.c @@ -95,15 +95,15 @@ static int bmg160_ioctl(FAR struct file *filep, int cmd, unsigned long arg); static const struct file_operations g_bmg160_fops = { - bmg160_open, - bmg160_close, - bmg160_read, - bmg160_write, - NULL, - bmg160_ioctl, - NULL + bmg160_open, /* open */ + bmg160_close, /* close */ + bmg160_read, /* read */ + bmg160_write, /* write */ + NULL, /* seek */ + bmg160_ioctl, /* ioctl */ + NULL /* poll */ #ifndef CONFIG_DISABLE_PSEUDOFS_OPERATIONS - , NULL + , NULL /* unlink */ #endif }; diff --git a/drivers/sensors/bmi160.c b/drivers/sensors/bmi160.c index b340cadf21c..7a220737a92 100644 --- a/drivers/sensors/bmi160.c +++ b/drivers/sensors/bmi160.c @@ -258,12 +258,16 @@ static int bmi160_checkid(FAR struct bmi160_dev_s *priv); static const struct file_operations g_bmi160fops = { - bmi160_open, /* open */ - bmi160_close, /* close */ - bmi160_read, /* read */ - 0, /* write */ - 0, /* seek */ - bmi160_ioctl, /* ioctl */ + bmi160_open, /* open */ + bmi160_close, /* close */ + bmi160_read, /* read */ + NULL, /* write */ + NULL, /* seek */ + bmi160_ioctl, /* ioctl */ + NULL /* poll */ +#ifndef CONFIG_DISABLE_PSEUDOFS_OPERATIONS + , NULL /* unlink */ +#endif }; /**************************************************************************** diff --git a/drivers/sensors/fxos8700cq.c b/drivers/sensors/fxos8700cq.c index a7b39af89f3..5044b652446 100644 --- a/drivers/sensors/fxos8700cq.c +++ b/drivers/sensors/fxos8700cq.c @@ -107,12 +107,16 @@ static int fxos8700cq_checkid(FAR struct fxos8700cq_dev_s *priv); static const struct file_operations g_fxos8700cqfops = { - fxos8700cq_open, - fxos8700cq_close, - fxos8700cq_read, - 0, /* write */ - 0, /* seek */ - 0, /* ioctl */ + fxos8700cq_open, /* open */ + fxos8700cq_close, /* close */ + fxos8700cq_read, /* read */ + NULL, /* write */ + NULL, /* seek */ + NULL, /* ioctl */ + NULL /* poll */ +#ifndef CONFIG_DISABLE_PSEUDOFS_OPERATIONS + , NULL /* unlink */ +#endif }; /**************************************************************************** diff --git a/drivers/sensors/hall3ph.c b/drivers/sensors/hall3ph.c index 52cc973ba17..48ccc9c8e12 100644 --- a/drivers/sensors/hall3ph.c +++ b/drivers/sensors/hall3ph.c @@ -78,9 +78,12 @@ static const struct file_operations g_hall3ops = hall3_close, /* close */ hall3_read, /* read */ hall3_write, /* write */ - NULL , /* seek */ + NULL, /* seek */ hall3_ioctl, /* ioctl */ NULL /* poll */ +#ifndef CONFIG_DISABLE_PSEUDOFS_OPERATIONS + , NULL /* unlink */ +#endif }; /**************************************************************************** diff --git a/drivers/sensors/ina219.c b/drivers/sensors/ina219.c index cc0cd485166..dcda54add3f 100644 --- a/drivers/sensors/ina219.c +++ b/drivers/sensors/ina219.c @@ -113,15 +113,15 @@ static int ina219_ioctl(FAR struct file *filep, int cmd, static const struct file_operations g_ina219fops = { - ina219_open, - ina219_close, - ina219_read, - ina219_write, - NULL, - ina219_ioctl, - NULL + ina219_open, /* open */ + ina219_close, /* close */ + ina219_read, /* read */ + ina219_write, /* write */ + NULL, /* seek */ + ina219_ioctl, /* ioctl */ + NULL /* poll */ #ifndef CONFIG_DISABLE_PSEUDOFS_OPERATIONS - , NULL + , NULL /* unlink */ #endif }; diff --git a/drivers/sensors/ina226.c b/drivers/sensors/ina226.c index ea40cf4a477..93d62b90e99 100644 --- a/drivers/sensors/ina226.c +++ b/drivers/sensors/ina226.c @@ -95,15 +95,15 @@ static int ina226_ioctl(FAR struct file *filep, int cmd, static const struct file_operations g_ina226fops = { - ina226_open, - ina226_close, - ina226_read, - ina226_write, - NULL, - ina226_ioctl, - NULL + ina226_open, /* open */ + ina226_close, /* close */ + ina226_read, /* read */ + ina226_write, /* write */ + NULL, /* seek */ + ina226_ioctl, /* ioctl */ + NULL /* poll */ #ifndef CONFIG_DISABLE_PSEUDOFS_OPERATIONS - , NULL + , NULL /* unlink */ #endif }; diff --git a/drivers/sensors/ina3221.c b/drivers/sensors/ina3221.c index 4fde7c36289..3064eab74c1 100644 --- a/drivers/sensors/ina3221.c +++ b/drivers/sensors/ina3221.c @@ -118,15 +118,15 @@ static int ina3221_ioctl(FAR struct file *filep, int cmd, static const struct file_operations g_ina3221fops = { - ina3221_open, - ina3221_close, - ina3221_read, - ina3221_write, - NULL, - ina3221_ioctl, - NULL + ina3221_open, /* open */ + ina3221_close, /* close */ + ina3221_read, /* read */ + ina3221_write, /* write */ + NULL, /* seek */ + ina3221_ioctl, /* ioctl */ + NULL /* poll */ #ifndef CONFIG_DISABLE_PSEUDOFS_OPERATIONS - , NULL + , NULL /* unlink */ #endif }; diff --git a/drivers/sensors/isl29023.c b/drivers/sensors/isl29023.c index 4c730d65c54..b1e145def4b 100644 --- a/drivers/sensors/isl29023.c +++ b/drivers/sensors/isl29023.c @@ -130,6 +130,9 @@ static const struct file_operations g_isl29023fops = NULL, /* seek */ isl29023_ioctl, /* ioctl */ NULL /* poll */ +#ifndef CONFIG_DISABLE_PSEUDOFS_OPERATIONS + , NULL /* unlink */ +#endif }; /**************************************************************************** diff --git a/drivers/sensors/kxtj9.c b/drivers/sensors/kxtj9.c index 7b5a8fb10a1..bc071bde267 100644 --- a/drivers/sensors/kxtj9.c +++ b/drivers/sensors/kxtj9.c @@ -161,15 +161,15 @@ static int kxtj9_ioctl(FAR struct file *filep, int cmd, static const struct file_operations g_fops = { - kxtj9_open, - kxtj9_close, - kxtj9_read, - kxtj9_write, - NULL, - kxtj9_ioctl, - NULL, + kxtj9_open, /* open */ + kxtj9_close, /* close */ + kxtj9_read, /* read */ + kxtj9_write, /* write */ + NULL, /* seek */ + kxtj9_ioctl, /* ioctl */ + NULL /* poll */ #ifndef CONFIG_DISABLE_PSEUDOFS_OPERATIONS - NULL, + , NULL /* unlink */ #endif }; diff --git a/drivers/sensors/lis3dh.c b/drivers/sensors/lis3dh.c index 321f58215ae..c8eeff960c2 100644 --- a/drivers/sensors/lis3dh.c +++ b/drivers/sensors/lis3dh.c @@ -120,15 +120,15 @@ static int lis3dh_ioctl(FAR struct file *filep, int cmd, unsigned long arg); static const struct file_operations g_lis3dh_fops = { - lis3dh_open, - lis3dh_close, - lis3dh_read, - lis3dh_write, - NULL, - lis3dh_ioctl, - NULL + lis3dh_open, /* open */ + lis3dh_close, /* close */ + lis3dh_read, /* read */ + lis3dh_write, /* write */ + NULL, /* seek */ + lis3dh_ioctl, /* ioctl */ + NULL /* poll */ #ifndef CONFIG_DISABLE_PSEUDOFS_OPERATIONS - , NULL + , NULL /* unlink */ #endif }; diff --git a/drivers/sensors/lis3dsh.c b/drivers/sensors/lis3dsh.c index 9e6e10ea540..ca3e337dcc0 100644 --- a/drivers/sensors/lis3dsh.c +++ b/drivers/sensors/lis3dsh.c @@ -100,15 +100,15 @@ static int lis3dsh_ioctl(FAR struct file *filep, int cmd, unsigned long arg); static const struct file_operations g_lis3dsh_fops = { - lis3dsh_open, - lis3dsh_close, - lis3dsh_read, - lis3dsh_write, - NULL, - lis3dsh_ioctl, - NULL + lis3dsh_open, /* open */ + lis3dsh_close, /* close */ + lis3dsh_read, /* read */ + lis3dsh_write, /* write */ + NULL, /* seek */ + lis3dsh_ioctl, /* ioctl */ + NULL /* poll */ #ifndef CONFIG_DISABLE_PSEUDOFS_OPERATIONS - , NULL + , NULL /* unlink */ #endif }; diff --git a/drivers/sensors/lis3mdl.c b/drivers/sensors/lis3mdl.c index 2e526e1df08..e28f7232077 100644 --- a/drivers/sensors/lis3mdl.c +++ b/drivers/sensors/lis3mdl.c @@ -101,15 +101,15 @@ static int lis3mdl_ioctl(FAR struct file *filep, static const struct file_operations g_lis3mdl_fops = { - lis3mdl_open, - lis3mdl_close, - lis3mdl_read, - lis3mdl_write, - NULL, - lis3mdl_ioctl, - NULL + lis3mdl_open, /* open */ + lis3mdl_close, /* close */ + lis3mdl_read, /* read */ + lis3mdl_write, /* write */ + NULL, /* seek */ + lis3mdl_ioctl, /* ioctl */ + NULL /* poll */ #ifndef CONFIG_DISABLE_PSEUDOFS_OPERATIONS - , NULL + , NULL /* unlink */ #endif }; diff --git a/drivers/sensors/lm75.c b/drivers/sensors/lm75.c index 7efb17a0b49..f18b54a107c 100644 --- a/drivers/sensors/lm75.c +++ b/drivers/sensors/lm75.c @@ -98,13 +98,16 @@ static int lm75_ioctl(FAR struct file *filep, int cmd, static const struct file_operations g_lm75fops = { - lm75_open, - lm75_close, - lm75_read, - lm75_write, - NULL, - lm75_ioctl, - NULL + lm75_open, /* open */ + lm75_close, /* close */ + lm75_read, /* read */ + lm75_write, /* write */ + NULL, /* seek */ + lm75_ioctl, /* ioctl */ + NULL /* poll */ +#ifndef CONFIG_DISABLE_PSEUDOFS_OPERATIONS + , NULL /* unlink */ +#endif }; /**************************************************************************** diff --git a/drivers/sensors/lm92.c b/drivers/sensors/lm92.c index f033cf928cc..dc6cd75db1b 100644 --- a/drivers/sensors/lm92.c +++ b/drivers/sensors/lm92.c @@ -97,13 +97,16 @@ static int lm92_ioctl(FAR struct file *filep, static const struct file_operations g_lm92fops = { - lm92_open, - lm92_close, - lm92_read, - lm92_write, - NULL, - lm92_ioctl, - NULL + lm92_open, /* open */ + lm92_close, /* close */ + lm92_read, /* read */ + lm92_write, /* write */ + NULL, /* seek */ + lm92_ioctl, /* ioctl */ + NULL /* poll */ +#ifndef CONFIG_DISABLE_PSEUDOFS_OPERATIONS + , NULL /* unlink */ +#endif }; /**************************************************************************** diff --git a/drivers/sensors/lsm303agr.c b/drivers/sensors/lsm303agr.c index 0566c1d8dd6..19f9ecfbc20 100644 --- a/drivers/sensors/lsm303agr.c +++ b/drivers/sensors/lsm303agr.c @@ -126,15 +126,15 @@ static double g_magnetofactor = 0; static const struct file_operations g_fops = { - lsm303agr_open, - lsm303agr_close, - lsm303agr_read, - lsm303agr_write, - NULL, - lsm303agr_ioctl, - NULL + lsm303agr_open, /* open */ + lsm303agr_close, /* close */ + lsm303agr_read, /* read */ + lsm303agr_write, /* write */ + NULL, /* seek */ + lsm303agr_ioctl, /* ioctl */ + NULL /* poll */ #ifndef CONFIG_DISABLE_PSEUDOFS_OPERATIONS - , NULL + , NULL /* unlink */ #endif }; diff --git a/drivers/sensors/lsm330_spi.c b/drivers/sensors/lsm330_spi.c index 61ecd01e05f..a257b783086 100644 --- a/drivers/sensors/lsm330_spi.c +++ b/drivers/sensors/lsm330_spi.c @@ -144,29 +144,29 @@ static void lsm330_dvr_exchange(FAR void *instance_handle, static const struct file_operations g_lsm330a_fops = { - lsm330acl_open, - lsm330acl_close, - lsm330acl_read, - lsm330acl_write, - lsm330acl_seek, - lsm330_ioctl, - NULL + lsm330acl_open, /* open */ + lsm330acl_close, /* close */ + lsm330acl_read, /* read */ + lsm330acl_write, /* write */ + lsm330acl_seek, /* seek */ + lsm330_ioctl, /* ioctl */ + NULL /* poll */ #ifndef CONFIG_DISABLE_PSEUDOFS_OPERATIONS - , NULL + , NULL /* unlink */ #endif }; static const struct file_operations g_lsm330g_fops = { - lsm330gyro_open, - lsm330gyro_close, - lsm330gyro_read, - lsm330gyro_write, - lsm330gyro_seek, - lsm330_ioctl, - NULL + lsm330gyro_open, /* open */ + lsm330gyro_close, /* close */ + lsm330gyro_read, /* read */ + lsm330gyro_write, /* write */ + lsm330gyro_seek, /* seek */ + lsm330_ioctl, /* ioctl */ + NULL /* poll */ #ifndef CONFIG_DISABLE_PSEUDOFS_OPERATIONS - , NULL + , NULL /* unlink */ #endif }; diff --git a/drivers/sensors/lsm6dsl.c b/drivers/sensors/lsm6dsl.c index 018e298cd91..adfde3659cc 100644 --- a/drivers/sensors/lsm6dsl.c +++ b/drivers/sensors/lsm6dsl.c @@ -134,16 +134,16 @@ static double g_gyrofactor = 0; static const struct file_operations g_fops = { - lsm6dsl_open, - lsm6dsl_close, - lsm6dsl_read, - lsm6dsl_write, - NULL, - lsm6dsl_ioctl, - NULL + lsm6dsl_open, /* open */ + lsm6dsl_close, /* close */ + lsm6dsl_read, /* read */ + lsm6dsl_write, /* write */ + NULL, /* seek */ + lsm6dsl_ioctl, /* ioctl */ + NULL /* poll */ #ifndef CONFIG_DISABLE_PSEUDOFS_OPERATIONS - , NULL -# endif + , NULL /* unlink */ +#endif }; static const struct lsm6dsl_ops_s g_lsm6dsl_sensor_ops = diff --git a/drivers/sensors/lsm9ds1.c b/drivers/sensors/lsm9ds1.c index 9ea6565527a..2acb355368a 100644 --- a/drivers/sensors/lsm9ds1.c +++ b/drivers/sensors/lsm9ds1.c @@ -584,15 +584,15 @@ static int lsm9ds1_register(FAR const char *devpath, static const struct file_operations g_fops = { - lsm9ds1_open, - lsm9ds1_close, - lsm9ds1_read, - lsm9ds1_write, - NULL, - lsm9ds1_ioctl, - NULL, + lsm9ds1_open, /* open */ + lsm9ds1_close, /* close */ + lsm9ds1_read, /* read */ + lsm9ds1_write, /* write */ + NULL, /* seek */ + lsm9ds1_ioctl, /* ioctl */ + NULL /* poll */ #ifndef CONFIG_DISABLE_PSEUDOFS_OPERATIONS - NULL, + , NULL /* unlink */ #endif }; diff --git a/drivers/sensors/ltc4151.c b/drivers/sensors/ltc4151.c index df64c3af140..085ca15aad4 100644 --- a/drivers/sensors/ltc4151.c +++ b/drivers/sensors/ltc4151.c @@ -105,15 +105,15 @@ static int ltc4151_ioctl(FAR struct file *filep, int cmd, static const struct file_operations g_ltc4151fops = { - ltc4151_open, - ltc4151_close, - ltc4151_read, - ltc4151_write, - NULL, - ltc4151_ioctl, - NULL + ltc4151_open, /* open */ + ltc4151_close, /* close */ + ltc4151_read, /* read */ + ltc4151_write, /* write */ + NULL, /* seek */ + ltc4151_ioctl, /* ioctl */ + NULL /* poll */ #ifndef CONFIG_DISABLE_PSEUDOFS_OPERATIONS - , NULL + , NULL /* unlink */ #endif }; diff --git a/drivers/sensors/max31855.c b/drivers/sensors/max31855.c index e6e39d5dc64..c05a7aeb40e 100644 --- a/drivers/sensors/max31855.c +++ b/drivers/sensors/max31855.c @@ -90,13 +90,16 @@ static ssize_t max31855_write(FAR struct file *filep, FAR const char *buffer, static const struct file_operations g_max31855fops = { - max31855_open, - max31855_close, - max31855_read, - max31855_write, - NULL, - NULL, - NULL + max31855_open, /* open */ + max31855_close, /* close */ + max31855_read, /* read */ + max31855_write, /* write */ + NULL, /* seek */ + NULL, /* ioctl */ + NULL /* poll */ +#ifndef CONFIG_DISABLE_PSEUDOFS_OPERATIONS + , NULL /* unlink */ +#endif }; /**************************************************************************** diff --git a/drivers/sensors/max6675.c b/drivers/sensors/max6675.c index fc1986f9dae..7e57d33bf6e 100644 --- a/drivers/sensors/max6675.c +++ b/drivers/sensors/max6675.c @@ -85,13 +85,16 @@ static ssize_t max6675_write(FAR struct file *filep, FAR const char *buffer, static const struct file_operations g_max6675fops = { - max6675_open, - max6675_close, - max6675_read, - max6675_write, - NULL, - NULL, - NULL + max6675_open, /* open */ + max6675_close, /* close */ + max6675_read, /* read */ + max6675_write, /* write */ + NULL, /* seek */ + NULL, /* ioctl */ + NULL /* poll */ +#ifndef CONFIG_DISABLE_PSEUDOFS_OPERATIONS + , NULL /* unlink */ +#endif }; /**************************************************************************** diff --git a/drivers/sensors/mb7040.c b/drivers/sensors/mb7040.c index 210b3e4801a..4bc22b01f34 100644 --- a/drivers/sensors/mb7040.c +++ b/drivers/sensors/mb7040.c @@ -83,15 +83,15 @@ static int mb7040_ioctl(FAR struct file *filep, int cmd, static const struct file_operations g_fops = { - mb7040_open, - mb7040_close, - mb7040_read, - mb7040_write, - NULL, - mb7040_ioctl, - NULL + mb7040_open, /* open */ + mb7040_close, /* close */ + mb7040_read, /* read */ + mb7040_write, /* write */ + NULL, /* seek */ + mb7040_ioctl, /* ioctl */ + NULL /* poll */ #ifndef CONFIG_DISABLE_PSEUDOFS_OPERATIONS - , NULL + , NULL /* unlink */ #endif }; diff --git a/drivers/sensors/mcp9844.c b/drivers/sensors/mcp9844.c index 26502f0c138..da8bf9c7e3e 100644 --- a/drivers/sensors/mcp9844.c +++ b/drivers/sensors/mcp9844.c @@ -82,13 +82,16 @@ static int mcp9844_ioctl(FAR struct file *filep, int cmd, static const struct file_operations g_mcp9844_fops = { - mcp9844_open, - mcp9844_close, - mcp9844_read, - mcp9844_write, - NULL, - mcp9844_ioctl, - NULL + mcp9844_open, /* open */ + mcp9844_close, /* close */ + mcp9844_read, /* read */ + mcp9844_write, /* write */ + NULL, /* seek */ + mcp9844_ioctl, /* ioctl */ + NULL /* poll */ +#ifndef CONFIG_DISABLE_PSEUDOFS_OPERATIONS + , NULL /* unlink */ +#endif }; /**************************************************************************** diff --git a/drivers/sensors/mlx90393.c b/drivers/sensors/mlx90393.c index 97b166c9d75..bd94328e42d 100644 --- a/drivers/sensors/mlx90393.c +++ b/drivers/sensors/mlx90393.c @@ -101,15 +101,15 @@ static int mlx90393_ioctl(FAR struct file *filep, static const struct file_operations g_mlx90393_fops = { - mlx90393_open, - mlx90393_close, - mlx90393_read, - mlx90393_write, - NULL, - mlx90393_ioctl, - NULL + mlx90393_open, /* open */ + mlx90393_close, /* close */ + mlx90393_read, /* read */ + mlx90393_write, /* write */ + NULL, /* seek */ + mlx90393_ioctl, /* ioctl */ + NULL /* poll */ #ifndef CONFIG_DISABLE_PSEUDOFS_OPERATIONS - , NULL + , NULL /* unlink */ #endif }; diff --git a/drivers/sensors/mpl115a.c b/drivers/sensors/mpl115a.c index 7c6a2ee7603..b8593857261 100644 --- a/drivers/sensors/mpl115a.c +++ b/drivers/sensors/mpl115a.c @@ -91,9 +91,9 @@ static const struct file_operations g_mpl115afops = mpl115a_write, /* write */ NULL, /* seek */ NULL, /* ioctl */ - NULL, /* poll */ + NULL /* poll */ #ifndef CONFIG_DISABLE_PSEUDOFS_OPERATIONS - NULL /* unlink */ + , NULL /* unlink */ #endif }; diff --git a/drivers/sensors/mpu60x0.c b/drivers/sensors/mpu60x0.c index 5ecf6c760b7..c0ed310cfff 100644 --- a/drivers/sensors/mpu60x0.c +++ b/drivers/sensors/mpu60x0.c @@ -263,15 +263,15 @@ static int mpu_ioctl(FAR struct file *filep, int cmd, unsigned long arg); static const struct file_operations g_mpu_fops = { - mpu_open, - mpu_close, - mpu_read, - mpu_write, - mpu_seek, - mpu_ioctl, - NULL + mpu_open, /* open */ + mpu_close, /* close */ + mpu_read, /* read */ + mpu_write, /* write */ + mpu_seek, /* seek */ + mpu_ioctl, /* ioctl */ + NULL /* poll */ #ifndef CONFIG_DISABLE_PSEUDOFS_OPERATIONS - , NULL + , NULL /* unlink */ #endif }; diff --git a/drivers/sensors/ms58xx.c b/drivers/sensors/ms58xx.c index 8b74fa2ce39..cec6122bb93 100644 --- a/drivers/sensors/ms58xx.c +++ b/drivers/sensors/ms58xx.c @@ -160,15 +160,15 @@ static int ms58xx_ioctl(FAR struct file *filep, int cmd, static const struct file_operations g_fops = { - ms58xx_open, - ms58xx_close, - ms58xx_read, - ms58xx_write, - NULL, - ms58xx_ioctl, - NULL + ms58xx_open, /* open */ + ms58xx_close, /* close */ + ms58xx_read, /* read */ + ms58xx_write, /* write */ + NULL, /* seek */ + ms58xx_ioctl, /* ioctl */ + NULL /* poll */ #ifndef CONFIG_DISABLE_PSEUDOFS_OPERATIONS - , NULL + , NULL /* unlink */ #endif }; diff --git a/drivers/sensors/msa301.c b/drivers/sensors/msa301.c index af9b7f0799e..87828386919 100644 --- a/drivers/sensors/msa301.c +++ b/drivers/sensors/msa301.c @@ -110,17 +110,16 @@ static int msa301_register(FAR const char * devpath, static const struct file_operations g_fops = { - msa301_open, - msa301_close, - msa301_read, - msa301_write, - NULL, - msa301_ioctl, - NULL -# ifndef CONFIG_DISABLE_PSEUDOFS_OPERATIONS - , - NULL -# endif + msa301_open, /* open */ + msa301_close, /* close */ + msa301_read, /* read */ + msa301_write, /* write */ + NULL, /* seek */ + msa301_ioctl, /* ioctl */ + NULL /* poll */ +#ifndef CONFIG_DISABLE_PSEUDOFS_OPERATIONS + , NULL /* unlink */ +#endif }; static const struct msa301_ops_s g_msa301_sensor_ops = diff --git a/drivers/sensors/qencoder.c b/drivers/sensors/qencoder.c index 0925eb12211..34acbebecf2 100644 --- a/drivers/sensors/qencoder.c +++ b/drivers/sensors/qencoder.c @@ -89,6 +89,9 @@ static const struct file_operations g_qeops = NULL, /* seek */ qe_ioctl, /* ioctl */ NULL /* poll */ +#ifndef CONFIG_DISABLE_PSEUDOFS_OPERATIONS + , NULL /* unlink */ +#endif }; /**************************************************************************** diff --git a/drivers/sensors/sensor.c b/drivers/sensors/sensor.c index 9d936662ad0..cb3031bf3d4 100644 --- a/drivers/sensors/sensor.c +++ b/drivers/sensors/sensor.c @@ -141,6 +141,9 @@ static const struct file_operations g_sensor_fops = NULL, /* seek */ sensor_ioctl, /* ioctl */ sensor_poll /* poll */ +#ifndef CONFIG_DISABLE_PSEUDOFS_OPERATIONS + , NULL /* unlink */ +#endif }; /**************************************************************************** diff --git a/drivers/sensors/sht3x.c b/drivers/sensors/sht3x.c index aac1b16d14a..f9898edff22 100644 --- a/drivers/sensors/sht3x.c +++ b/drivers/sensors/sht3x.c @@ -168,12 +168,10 @@ static const struct file_operations g_sht3xfops = sht3x_read, /* read */ sht3x_write, /* write */ NULL, /* seek */ - sht3x_ioctl /* ioctl */ -#ifndef CONFIG_DISABLE_POLL - , NULL /* poll */ -#endif + sht3x_ioctl, /* ioctl */ + NULL /* poll */ #ifndef CONFIG_DISABLE_PSEUDOFS_OPERATIONS - , sht3x_unlink /* unlink */ + , sht3x_unlink /* unlink */ #endif }; diff --git a/drivers/sensors/vl53l1x.c b/drivers/sensors/vl53l1x.c index 89d1913d207..15205e500d9 100644 --- a/drivers/sensors/vl53l1x.c +++ b/drivers/sensors/vl53l1x.c @@ -250,11 +250,9 @@ static const struct file_operations g_vl53l1xfops = vl53l1x_write, /* write */ NULL, /* seek */ vl53l1x_ioctl, /* ioctl */ -#ifndef CONFIG_DISABLE_POLL - NULL, /* poll */ -#endif + NULL /* poll */ #ifndef CONFIG_DISABLE_PSEUDOFS_OPERATIONS - NULL, /* unlink */ + , NULL /* unlink */ #endif }; diff --git a/drivers/sensors/zerocross.c b/drivers/sensors/zerocross.c index b9b9247f5e9..5b733f7d3ab 100644 --- a/drivers/sensors/zerocross.c +++ b/drivers/sensors/zerocross.c @@ -115,7 +115,7 @@ static const struct file_operations g_zcops = zc_ioctl, /* ioctl */ NULL /* poll */ #ifndef CONFIG_DISABLE_PSEUDOFS_OPERATIONS - , 0 /* unlink */ + , NULL /* unlink */ #endif }; diff --git a/drivers/serial/serial.c b/drivers/serial/serial.c index c1864363a22..73261a6e809 100644 --- a/drivers/serial/serial.c +++ b/drivers/serial/serial.c @@ -127,7 +127,7 @@ static const struct file_operations g_serialops = uart_close, /* close */ uart_read, /* read */ uart_write, /* write */ - 0, /* seek */ + NULL, /* seek */ uart_ioctl, /* ioctl */ uart_poll /* poll */ #ifndef CONFIG_DISABLE_PSEUDOFS_OPERATIONS diff --git a/drivers/serial/uart_bth4.c b/drivers/serial/uart_bth4.c index c1acd35c598..fd496dc3a5b 100644 --- a/drivers/serial/uart_bth4.c +++ b/drivers/serial/uart_bth4.c @@ -83,12 +83,16 @@ static int uart_bth4_poll (FAR struct file *filep, static const struct file_operations g_uart_bth4_ops = { - .open = uart_bth4_open, - .close = uart_bth4_close, - .read = uart_bth4_read, - .write = uart_bth4_write, - .ioctl = uart_bth4_ioctl, - .poll = uart_bth4_poll + uart_bth4_open, /* open */ + uart_bth4_close, /* cose */ + uart_bth4_read, /* read */ + uart_bth4_write, /* write */ + NULL, /* seek */ + uart_bth4_ioctl, /* ioctl */ + uart_bth4_poll /* poll */ +#ifndef CONFIG_DISABLE_PSEUDOFS_OPERATIONS + , NULL /* unlink */ +#endif }; /**************************************************************************** diff --git a/drivers/syslog/syslog_console.c b/drivers/syslog/syslog_console.c index f04408e4555..c9edeb3ea20 100644 --- a/drivers/syslog/syslog_console.c +++ b/drivers/syslog/syslog_console.c @@ -58,6 +58,9 @@ static const struct file_operations g_consoleops = NULL, /* seek */ syslog_console_ioctl, /* ioctl */ NULL /* poll */ +#ifndef CONFIG_DISABLE_PSEUDOFS_OPERATIONS + , NULL /* unlink */ +#endif }; /**************************************************************************** diff --git a/drivers/timers/pwm.c b/drivers/timers/pwm.c index 8652e3ff841..0efcfc53f65 100644 --- a/drivers/timers/pwm.c +++ b/drivers/timers/pwm.c @@ -101,6 +101,9 @@ static const struct file_operations g_pwmops = NULL, /* seek */ pwm_ioctl, /* ioctl */ NULL /* poll */ +#ifndef CONFIG_DISABLE_PSEUDOFS_OPERATIONS + , NULL /* unlink */ +#endif }; /**************************************************************************** diff --git a/drivers/timers/rtc.c b/drivers/timers/rtc.c index 727301a3943..d92b13009f0 100644 --- a/drivers/timers/rtc.c +++ b/drivers/timers/rtc.c @@ -129,9 +129,9 @@ static const struct file_operations rtc_fops = rtc_write, /* write */ NULL, /* seek */ rtc_ioctl, /* ioctl */ - NULL, /* poll */ + NULL /* poll */ #ifndef CONFIG_DISABLE_PSEUDOFS_OPERATIONS - rtc_unlink /* unlink */ + , rtc_unlink /* unlink */ #endif }; diff --git a/drivers/timers/watchdog.c b/drivers/timers/watchdog.c index 8e76ad506aa..debb276b6ee 100644 --- a/drivers/timers/watchdog.c +++ b/drivers/timers/watchdog.c @@ -118,6 +118,9 @@ static const struct file_operations g_wdogops = NULL, /* seek */ wdog_ioctl, /* ioctl */ NULL /* poll */ +#ifndef CONFIG_DISABLE_PSEUDOFS_OPERATIONS + , NULL /* unlink */ +#endif }; /**************************************************************************** diff --git a/drivers/usbdev/adb.c b/drivers/usbdev/adb.c index f87402bba80..3d374507790 100644 --- a/drivers/usbdev/adb.c +++ b/drivers/usbdev/adb.c @@ -236,12 +236,12 @@ static void adb_char_on_connect(FAR struct usbdev_adb_s *priv, int connect); static const struct usbdevclass_driverops_s g_adb_driverops = { - usbclass_bind, /* bind */ - usbclass_unbind, /* unbind */ - usbclass_setup, /* setup */ + usbclass_bind, /* bind */ + usbclass_unbind, /* unbind */ + usbclass_setup, /* setup */ usbclass_disconnect, /* disconnect */ - usbclass_suspend, /* suspend */ - usbclass_resume /* resume */ + usbclass_suspend, /* suspend */ + usbclass_resume /* resume */ }; /* Char device **************************************************************/ @@ -252,9 +252,12 @@ static const struct file_operations g_adb_fops = adb_char_close, /* close */ adb_char_read, /* read */ adb_char_write, /* write */ - 0, /* seek */ + NULL, /* seek */ adb_char_ioctl, /* ioctl */ adb_char_poll /* poll */ +#ifndef CONFIG_DISABLE_PSEUDOFS_OPERATIONS + , NULL /* unlink */ +#endif }; /* USB descriptor ***********************************************************/ diff --git a/drivers/usbhost/usbhost_cdcmbim.c b/drivers/usbhost/usbhost_cdcmbim.c index d153767e214..664a8661a14 100644 --- a/drivers/usbhost/usbhost_cdcmbim.c +++ b/drivers/usbhost/usbhost_cdcmbim.c @@ -331,21 +331,21 @@ static void cdcmbim_txpoll_work(void *arg); static const struct usbhost_id_s g_id = { - USB_CLASS_CDC, /* base */ + USB_CLASS_CDC, /* base */ CDC_SUBCLASS_MBIM, /* subclass */ - 0, /* proto */ - 0, /* vid */ - 0 /* pid */ + 0, /* proto */ + 0, /* vid */ + 0 /* pid */ }; /* This is the USB host storage class's registry entry */ static struct usbhost_registry_s g_cdcmbim = { - NULL, /* flink */ - usbhost_create, /* create */ - 1, /* nids */ - &g_id /* id[] */ + NULL, /* flink */ + usbhost_create, /* create */ + 1, /* nids */ + &g_id /* id[] */ }; /* File operations for control channel */ diff --git a/drivers/usbhost/usbhost_hidkbd.c b/drivers/usbhost/usbhost_hidkbd.c index 4e27d83fd31..84b1862291b 100644 --- a/drivers/usbhost/usbhost_hidkbd.c +++ b/drivers/usbhost/usbhost_hidkbd.c @@ -329,32 +329,35 @@ static int usbhost_poll(FAR struct file *filep, FAR struct pollfd *fds, static const struct usbhost_id_s g_hidkbd_id = { - USB_CLASS_HID, /* base */ + USB_CLASS_HID, /* base */ USBHID_SUBCLASS_BOOTIF, /* subclass */ - USBHID_PROTOCOL_KEYBOARD, /* proto */ - 0, /* vid */ - 0 /* pid */ + USBHID_PROTOCOL_KEYBOARD, /* proto */ + 0, /* vid */ + 0 /* pid */ }; /* This is the USB host storage class's registry entry */ static struct usbhost_registry_s g_hidkbd = { - NULL, /* flink */ - usbhost_create, /* create */ - 1, /* nids */ - &g_hidkbd_id /* id[] */ + NULL, /* flink */ + usbhost_create, /* create */ + 1, /* nids */ + &g_hidkbd_id /* id[] */ }; static const struct file_operations g_hidkbd_fops = { - usbhost_open, /* open */ - usbhost_close, /* close */ - usbhost_read, /* read */ - usbhost_write, /* write */ - NULL, /* seek */ - NULL, /* ioctl */ - usbhost_poll /* poll */ + usbhost_open, /* open */ + usbhost_close, /* close */ + usbhost_read, /* read */ + usbhost_write, /* write */ + NULL, /* seek */ + NULL, /* ioctl */ + usbhost_poll /* poll */ +#ifndef CONFIG_DISABLE_PSEUDOFS_OPERATIONS + , NULL /* unlink */ +#endif }; /* This is a bitmap that is used to allocate device names /dev/kbda-z. */ diff --git a/drivers/usbhost/usbhost_hidmouse.c b/drivers/usbhost/usbhost_hidmouse.c index 92eebef2fab..f4957f04a67 100644 --- a/drivers/usbhost/usbhost_hidmouse.c +++ b/drivers/usbhost/usbhost_hidmouse.c @@ -380,32 +380,35 @@ static int usbhost_poll(FAR struct file *filep, FAR struct pollfd *fds, static const struct usbhost_id_s g_hidmouse_id = { - USB_CLASS_HID, /* base */ + USB_CLASS_HID, /* base */ USBHID_SUBCLASS_BOOTIF, /* subclass */ - USBHID_PROTOCOL_MOUSE, /* proto */ - 0, /* vid */ - 0 /* pid */ + USBHID_PROTOCOL_MOUSE, /* proto */ + 0, /* vid */ + 0 /* pid */ }; /* This is the USB host storage class's registry entry */ static struct usbhost_registry_s g_hidmouse = { - NULL, /* flink */ - usbhost_create, /* create */ - 1, /* nids */ - &g_hidmouse_id /* id[] */ + NULL, /* flink */ + usbhost_create, /* create */ + 1, /* nids */ + &g_hidmouse_id /* id[] */ }; static const struct file_operations g_hidmouse_fops = { - usbhost_open, /* open */ - usbhost_close, /* close */ - usbhost_read, /* read */ - usbhost_write, /* write */ - NULL, /* seek */ - NULL, /* ioctl */ - usbhost_poll /* poll */ + usbhost_open, /* open */ + usbhost_close, /* close */ + usbhost_read, /* read */ + usbhost_write, /* write */ + NULL, /* seek */ + NULL, /* ioctl */ + usbhost_poll /* poll */ +#ifndef CONFIG_DISABLE_PSEUDOFS_OPERATIONS + , NULL /* unlink */ +#endif }; /* This is a bitmap that is used to allocate device names /dev/mouse0-31. */ diff --git a/drivers/usbhost/usbhost_xboxcontroller.c b/drivers/usbhost/usbhost_xboxcontroller.c index 78d51a60ae2..f7ef5f5b65b 100644 --- a/drivers/usbhost/usbhost_xboxcontroller.c +++ b/drivers/usbhost/usbhost_xboxcontroller.c @@ -307,6 +307,9 @@ static const struct file_operations g_xboxcontroller_fops = NULL, /* seek */ usbhost_ioctl, /* ioctl */ usbhost_poll /* poll */ +#ifndef CONFIG_DISABLE_PSEUDOFS_OPERATIONS + , NULL /* unlink */ +#endif }; /* This is a bitmap that is used to allocate device names /dev/xboxa-z. */ diff --git a/drivers/video/max7456.c b/drivers/video/max7456.c index 82f8b4e9725..f04a983fa13 100644 --- a/drivers/video/max7456.c +++ b/drivers/video/max7456.c @@ -336,15 +336,16 @@ static ssize_t mx7_debug_write(FAR struct file *filep, static const struct file_operations g_mx7_fops = { - .poll = NULL, + mx7_open, /* open */ + mx7_close, /* close */ + mx7_read, /* read */ + mx7_write, /* write */ + NULL, /* seek */ + mx7_ioctl, /* ioctl */ + NULL /* poll */ #ifndef CONFIG_DISABLE_PSEUDOFS_OPERATIONS - .unlink = NULL, + , NULL /* unlink */ #endif - .open = mx7_open, - .close = mx7_close, - .read = mx7_read, - .write = mx7_write, - .ioctl = mx7_ioctl }; #if defined(DEBUG) @@ -353,14 +354,16 @@ static const struct file_operations g_mx7_fops = static const struct file_operations g_mx7_debug_fops = { - .poll = NULL, + mx7_debug_open, /* open */ + mx7_debug_close, /* close */ + mx7_debug_read, /* read */ + mx7_debug_write, /* write */ + NULL, /* seek */ + NULL, /* ioctl */ + NULL /* poll */ #ifndef CONFIG_DISABLE_PSEUDOFS_OPERATIONS - .unlink = NULL, + , NULL /* unlink */ #endif - .open = mx7_debug_open, - .close = mx7_debug_close, - .read = mx7_debug_read, - .write = mx7_debug_write, }; #endif diff --git a/drivers/video/video.c b/drivers/video/video.c index e5bb203d0ae..a3c8b99648e 100644 --- a/drivers/video/video.c +++ b/drivers/video/video.c @@ -265,14 +265,14 @@ static const struct file_operations g_video_fops = { video_open, /* open */ video_close, /* close */ - 0, /* read */ - 0, /* write */ - 0, /* seek */ + NULL, /* read */ + NULL, /* write */ + NULL, /* seek */ video_ioctl, /* ioctl */ -#ifndef CONFIG_DISABLE_POLL - 0, /* poll */ + NULL /* poll */ +#ifndef CONFIG_DISABLE_PSEUDOFS_OPERATIONS + , NULL /* unlink */ #endif - 0 /* unlink */ }; static bool is_initialized = false; diff --git a/drivers/wireless/cc1101.c b/drivers/wireless/cc1101.c index bac4c14e2c4..d511b390ff9 100644 --- a/drivers/wireless/cc1101.c +++ b/drivers/wireless/cc1101.c @@ -306,8 +306,7 @@ static const struct file_operations g_cc1101ops = NULL, /* ioctl */ cc1101_file_poll /* poll */ #ifndef CONFIG_DISABLE_PSEUDOFS_OPERATIONS - , - NULL /* unlink */ + , NULL /* unlink */ #endif }; diff --git a/drivers/wireless/gs2200m.c b/drivers/wireless/gs2200m.c index ca6163f6a2e..8e761387a8a 100644 --- a/drivers/wireless/gs2200m.c +++ b/drivers/wireless/gs2200m.c @@ -233,8 +233,10 @@ static const struct file_operations g_gs2200m_fops = gs2200m_write, /* write */ NULL, /* seek */ gs2200m_ioctl, /* ioctl */ - gs2200m_poll, /* poll */ - NULL /* unlink */ + gs2200m_poll /* poll */ +#ifndef CONFIG_DISABLE_PSEUDOFS_OPERATIONS + , NULL /* unlink */ +#endif }; static struct evt_code_s _evt_table[] = diff --git a/fs/mqueue/mq_open.c b/fs/mqueue/mq_open.c index c5f50182785..f47ea16d5f7 100644 --- a/fs/mqueue/mq_open.c +++ b/fs/mqueue/mq_open.c @@ -60,9 +60,9 @@ static const struct file_operations g_nxmq_fileops = NULL, /* write */ NULL, /* seek */ NULL, /* ioctl */ - nxmq_file_poll, /* poll */ + nxmq_file_poll /* poll */ #ifndef CONFIG_DISABLE_PSEUDOFS_OPERATIONS - NULL, /* unlink */ + , NULL /* unlink */ #endif }; diff --git a/fs/socket/socket.c b/fs/socket/socket.c index b2edba9c87a..c714cad98c4 100644 --- a/fs/socket/socket.c +++ b/fs/socket/socket.c @@ -64,9 +64,9 @@ static const struct file_operations g_sock_fileops = sock_file_write, /* write */ NULL, /* seek */ sock_file_ioctl, /* ioctl */ - sock_file_poll, /* poll */ + sock_file_poll /* poll */ #ifndef CONFIG_DISABLE_PSEUDOFS_OPERATIONS - NULL, /* unlink */ + , NULL /* unlink */ #endif }; diff --git a/fs/vfs/fs_epoll.c b/fs/vfs/fs_epoll.c index 745aebc3d4a..6c2f9833f4a 100644 --- a/fs/vfs/fs_epoll.c +++ b/fs/vfs/fs_epoll.c @@ -67,8 +67,16 @@ static int epoll_do_poll(FAR struct file *filep, static const struct file_operations g_epoll_ops = { - .close = epoll_do_close, - .poll = epoll_do_poll + NULL, /* open */ + epoll_do_close, /* close */ + NULL, /* read */ + NULL, /* write */ + NULL, /* seek */ + NULL, /* ioctl */ + epoll_do_poll /* poll */ +#ifndef CONFIG_DISABLE_PSEUDOFS_OPERATIONS + , NULL /* unlink */ +#endif }; /**************************************************************************** diff --git a/fs/vfs/fs_eventfd.c b/fs/vfs/fs_eventfd.c index 86e022b4732..6cd41477437 100644 --- a/fs/vfs/fs_eventfd.c +++ b/fs/vfs/fs_eventfd.c @@ -120,9 +120,14 @@ static const struct file_operations g_eventfd_fops = eventfd_do_read, /* read */ eventfd_do_write, /* write */ NULL, /* seek */ - NULL /* ioctl */ + NULL, /* ioctl */ #ifdef CONFIG_EVENT_FD_POLL - , eventfd_do_poll /* poll */ + eventfd_do_poll /* poll */ +#else + NULL /* poll */ +#endif +#ifndef CONFIG_DISABLE_PSEUDOFS_OPERATIONS + , NULL /* unlink */ #endif }; diff --git a/fs/vfs/fs_timerfd.c b/fs/vfs/fs_timerfd.c index de90cb9d0d1..ff300caff40 100644 --- a/fs/vfs/fs_timerfd.c +++ b/fs/vfs/fs_timerfd.c @@ -132,9 +132,14 @@ static const struct file_operations g_timerfd_fops = timerfd_read, /* read */ NULL, /* write */ NULL, /* seek */ - NULL /* ioctl */ + NULL, /* ioctl */ #ifdef CONFIG_TIMER_FD_POLL - , timerfd_poll /* poll */ + timerfd_poll /* poll */ +#else + NULL /* poll */ +#endif +#ifndef CONFIG_DISABLE_PSEUDOFS_OPERATIONS + , NULL /* unlink */ #endif }; diff --git a/graphics/nxterm/nxterm_driver.c b/graphics/nxterm/nxterm_driver.c index a30c770d74b..1172293923d 100644 --- a/graphics/nxterm/nxterm_driver.c +++ b/graphics/nxterm/nxterm_driver.c @@ -60,16 +60,15 @@ static int nxterm_unlink(FAR struct inode *inode); const struct file_operations g_nxterm_drvrops = { - nxterm_open, /* open */ - nxterm_close, /* close */ - nxterm_read, /* read */ - nxterm_write, /* write */ - NULL, /* seek */ - nxterm_ioctl, /* ioctl */ - nxterm_poll /* poll */ + nxterm_open, /* open */ + nxterm_close, /* close */ + nxterm_read, /* read */ + nxterm_write, /* write */ + NULL, /* seek */ + nxterm_ioctl, /* ioctl */ + nxterm_poll /* poll */ #ifndef CONFIG_DISABLE_PSEUDOFS_OPERATIONS - , - nxterm_unlink /* unlink */ + , nxterm_unlink /* unlink */ #endif }; @@ -77,16 +76,15 @@ const struct file_operations g_nxterm_drvrops = const struct file_operations g_nxterm_drvrops = { - nxterm_open, /* open */ - nxterm_close, /* close */ - NULL, /* read */ - nxterm_write, /* write */ - NULL, /* seek */ - nxterm_ioctl, /* ioctl */ - NULL /* poll */ + nxterm_open, /* open */ + nxterm_close, /* close */ + NULL, /* read */ + nxterm_write, /* write */ + NULL, /* seek */ + nxterm_ioctl, /* ioctl */ + NULL /* poll */ #ifndef CONFIG_DISABLE_PSEUDOFS_OPERATIONS - , - nxterm_unlink /* unlink */ + , nxterm_unlink /* unlink */ #endif }; diff --git a/sched/Kconfig b/sched/Kconfig index bdccbe5c591..ef88a70e8f0 100644 --- a/sched/Kconfig +++ b/sched/Kconfig @@ -693,7 +693,7 @@ config PTHREAD_CLEANUP_STACKSIZE The maximum number of cleanup actions that may be pushed by pthread_clean_push(). This setting will increase the size of EVERY pthread task control block by about n * CONFIG_PTHREAD_CLEANUP_STACKSIZE - where n is the size of a pointer, 2* sizeof(uintptr_t), this would be + where n is the size of a pointer, 2 * sizeof(uintptr_t), this would be 8 for a CPU with 32-bit addressing and 4 for a CPU with 16-bit addressing.