diff --git a/arch/arm/src/c5471/c5471_watchdog.c b/arch/arm/src/c5471/c5471_watchdog.c index 4a17e9b78b3ce5c76666cf9258319c5a12913064..8983b75496f8fa136a34eecd56efea94d8e5b87d 100644 --- a/arch/arm/src/c5471/c5471_watchdog.c +++ b/arch/arm/src/c5471/c5471_watchdog.c @@ -102,7 +102,7 @@ static int wdt_ioctl(struct file *filep, int cmd, uint32 arg); static boolean g_wdtopen; -struct file_operations g_wdtops = +static const struct file_operations g_wdtops = { .open = wdt_open, .close = wdt_close, diff --git a/arch/sim/src/up_devconsole.c b/arch/sim/src/up_devconsole.c index 551d21600b1d9588f4b9ad3e4451197746775996..4ce89bce12a8b72d1cd92044c9c992268aef4070 100644 --- a/arch/sim/src/up_devconsole.c +++ b/arch/sim/src/up_devconsole.c @@ -62,7 +62,7 @@ static int devconsole_poll(FAR struct file *filep, FAR struct pollfd *fds, * Private Data ****************************************************************************/ -static struct file_operations devconsole_fops = +static const struct file_operations devconsole_fops = { .read = devconsole_read, .write = devconsole_write, diff --git a/drivers/bch/bchdev_driver.c b/drivers/bch/bchdev_driver.c index cf5ab40252e60ed7e6ea98035533b1238a9d7945..42d9825db7253eb3c05e9570a0885a3280ff40ae 100644 --- a/drivers/bch/bchdev_driver.c +++ b/drivers/bch/bchdev_driver.c @@ -78,7 +78,7 @@ static int bch_ioctl(FAR struct file *filp, int cmd, unsigned long arg); * Public Data ****************************************************************************/ -struct file_operations bch_fops = +static const struct file_operations bch_fops = { bch_open, /* open */ bch_close, /* close */ diff --git a/drivers/can.c b/drivers/can.c index 3d21634ee1c9b82173214194c45656cc55088d28..509210a8f4aba6f9c5f18d9d69360b63aed7ec67 100644 --- a/drivers/can.c +++ b/drivers/can.c @@ -81,7 +81,7 @@ static int can_ioctl(FAR struct file *filep, int cmd, unsigned long a * Private Data ****************************************************************************/ -struct file_operations g_canops = +static const struct file_operations g_canops = { can_open, /* open */ can_close, /* close */ diff --git a/drivers/dev_null.c b/drivers/dev_null.c index a8a8bb01cb6fbe2a3a064a8a991811fddbe5dd5a..2208823e67369ebe6af8a0ea49a3c373c6a827b5 100644 --- a/drivers/dev_null.c +++ b/drivers/dev_null.c @@ -64,7 +64,7 @@ static int devnull_poll(FAR struct file *filp, FAR struct pollfd *fds, * Private Data ****************************************************************************/ -static struct file_operations devnull_fops = +static const struct file_operations devnull_fops = { 0, /* open */ 0, /* close */ diff --git a/drivers/dev_zero.c b/drivers/dev_zero.c index fff88fd8d8dbec606a0ad859ab9bd610df3457ff..2a85e134a26da123ad7f0c67c20aa5af2ead793e 100644 --- a/drivers/dev_zero.c +++ b/drivers/dev_zero.c @@ -64,7 +64,7 @@ static int devzero_poll(FAR struct file *filp, FAR struct pollfd *fds, * Private Data ****************************************************************************/ -static struct file_operations devzero_fops = +static const struct file_operations devzero_fops = { 0, /* open */ 0, /* close */ diff --git a/drivers/fifo.c b/drivers/fifo.c index 7775af9ae02939fb975e8e87af953d2dc29165f8..4e0bbf49ceca22a2ed0c95b53146c25cf21a21e5 100644 --- a/drivers/fifo.c +++ b/drivers/fifo.c @@ -67,7 +67,7 @@ * Private Data ****************************************************************************/ -static struct file_operations fifo_fops = +static const struct file_operations fifo_fops = { pipecommon_open, /* open */ pipecommon_close, /* close */ diff --git a/drivers/lowconsole.c b/drivers/lowconsole.c index c89183cd2130fe6a9eeefd60426f35c323dfbcc6..15f639391a694b05978c8b4cae097c617ef8eb67 100755 --- a/drivers/lowconsole.c +++ b/drivers/lowconsole.c @@ -68,7 +68,7 @@ static int lowconsole_ioctl(struct file *filep, int cmd, unsigned long arg); * Private Variables ****************************************************************************/ -struct file_operations g_consoleops = +static const struct file_operations g_consoleops = { 0, /* open */ 0, /* close */ diff --git a/drivers/pipe.c b/drivers/pipe.c index 4ad5f0f9920198513e160b0843e23b3d4d3f0c6e..f51b4db2f1ba22d6fd6379ef1ab4f7330530f88d 100644 --- a/drivers/pipe.c +++ b/drivers/pipe.c @@ -75,7 +75,7 @@ static int pipe_close(FAR struct file *filep); * Private Data ****************************************************************************/ -static struct file_operations pipe_fops = +static const struct file_operations pipe_fops = { pipecommon_open, /* open */ pipe_close, /* close */ diff --git a/drivers/serial.c b/drivers/serial.c index 2dc7d8151676db343ad723359650c245470dc2a2..98ba07e2199c793c6f7db68e9fd5e6f403b31c00 100644 --- a/drivers/serial.c +++ b/drivers/serial.c @@ -86,7 +86,7 @@ static int uart_poll(FAR struct file *filep, FAR struct pollfd *fds, boolean * Private Variables ************************************************************************************/ -struct file_operations g_serialops = +static const struct file_operations g_serialops = { uart_open, /* open */ uart_close, /* close */ diff --git a/examples/pashello/device.c b/examples/pashello/device.c index fb2deff659f1b6f426dec04ad896bed67b0bcdc1..b4401531a4d71e0c513672b06cbc1e95b6118f39 100644 --- a/examples/pashello/device.c +++ b/examples/pashello/device.c @@ -61,7 +61,7 @@ static ssize_t hello_read(struct file *, char *, size_t); * Private Data ****************************************************************************/ -static struct file_operations hello_fops = +static const struct file_operations hello_fops = { 0, /* open */ 0, /* close */