file_operations: get back C89 compatible initializer

Signed-off-by: Petro Karashchenko <petro.karashchenko@gmail.com>
This commit is contained in:
Petro Karashchenko 2022-01-10 16:51:17 +02:00 committed by Xiang Xiao
parent 2447b7bd9a
commit a743fed63d
120 changed files with 868 additions and 675 deletions

View file

@ -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
};

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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
};

View file

@ -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
};
/****************************************************************************

View file

@ -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.

View file

@ -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. */

View file

@ -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. */

View file

@ -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. */

View file

@ -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 */

View file

@ -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. */

View file

@ -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. */

View file

@ -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. */

View file

@ -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. */

View file

@ -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

View file

@ -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
};
/****************************************************************************

View file

@ -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
};
/****************************************************************************

View file

@ -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
};

View file

@ -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
};

View file

@ -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

View file

@ -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
};
/****************************************************************************

View file

@ -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
};
/****************************************************************************

View file

@ -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
};
/****************************************************************************

View file

@ -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

View file

@ -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
};
/****************************************************************************

View file

@ -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
};
/****************************************************************************

View file

@ -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
};
/****************************************************************************

View file

@ -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
};
/****************************************************************************

View file

@ -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
};

View file

@ -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
};
/****************************************************************************

View file

@ -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
};
/****************************************************************************

View file

@ -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
};
/****************************************************************************

View file

@ -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
};
/****************************************************************************

View file

@ -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

View file

@ -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
};

View file

@ -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
};

View file

@ -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
};

View file

@ -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
};

View file

@ -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
};
/****************************************************************************

View file

@ -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
};
/****************************************************************************

View file

@ -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
};

View file

@ -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
};
/****************************************************************************

View file

@ -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
};

View file

@ -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
};
/****************************************************************************

View file

@ -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
};
/****************************************************************************

View file

@ -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
};
/****************************************************************************

View file

@ -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
};
/****************************************************************************

View file

@ -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 */

View file

@ -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
};

View file

@ -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
};

View file

@ -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
};

View file

@ -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
};

View file

@ -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
};

View file

@ -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
};
/****************************************************************************

View file

@ -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
};
/****************************************************************************

View file

@ -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
};
/****************************************************************************

View file

@ -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
};
/****************************************************************************

View file

@ -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
};
/****************************************************************************

View file

@ -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

View file

@ -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
};
/****************************************************************************

View file

@ -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
};
/****************************************************************************

View file

@ -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
};

View file

@ -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 */
};
/****************************************************************************

View file

@ -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
};

View file

@ -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
};
/****************************************************************************

View file

@ -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
};
/****************************************************************************

View file

@ -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
};
/****************************************************************************

View file

@ -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
};

View file

@ -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
};

View file

@ -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
};

View file

@ -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
};
/****************************************************************************

View file

@ -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
};

View file

@ -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
};

View file

@ -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
};

View file

@ -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
};

View file

@ -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
};
/****************************************************************************

View file

@ -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
};
/****************************************************************************

View file

@ -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
};

View file

@ -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
};

View file

@ -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 =

View file

@ -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
};

View file

@ -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
};

View file

@ -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
};
/****************************************************************************

View file

@ -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
};
/****************************************************************************

View file

@ -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
};

View file

@ -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
};
/****************************************************************************

View file

@ -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
};

View file

@ -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
};

View file

@ -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
};

View file

@ -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
};

View file

@ -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 =

View file

@ -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
};
/****************************************************************************

View file

@ -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
};
/****************************************************************************

View file

@ -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
};

View file

@ -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
};

View file

@ -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
};

View file

@ -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

View file

@ -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
};
/****************************************************************************

Some files were not shown because too many files have changed in this diff Show more