You've already forked linux-apfs
mirror of
https://github.com/linux-apfs/linux-apfs.git
synced 2026-05-01 15:00:59 -07:00
const: constify remaining file_operations
[akpm@linux-foundation.org: fix KVM] Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com> Acked-by: Mike Frysinger <vapier@gentoo.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This commit is contained in:
committed by
Linus Torvalds
parent
1c4115e595
commit
828c09509b
@@ -195,7 +195,7 @@ static int clk_debugfs_open(struct inode *inode, struct file *file)
|
|||||||
return single_open(file, clk_debugfs_show, NULL);
|
return single_open(file, clk_debugfs_show, NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
static struct file_operations clk_debugfs_operations = {
|
static const struct file_operations clk_debugfs_operations = {
|
||||||
.open = clk_debugfs_open,
|
.open = clk_debugfs_open,
|
||||||
.read = seq_read,
|
.read = seq_read,
|
||||||
.llseek = seq_lseek,
|
.llseek = seq_lseek,
|
||||||
|
|||||||
@@ -48,7 +48,7 @@ coreb_ioctl(struct inode *inode, struct file *file, unsigned int cmd, unsigned l
|
|||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
static struct file_operations coreb_fops = {
|
static const struct file_operations coreb_fops = {
|
||||||
.owner = THIS_MODULE,
|
.owner = THIS_MODULE,
|
||||||
.ioctl = coreb_ioctl,
|
.ioctl = coreb_ioctl,
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -244,7 +244,7 @@ static unsigned sync_serial_prescale_shadow;
|
|||||||
|
|
||||||
#define NUMBER_OF_PORTS 2
|
#define NUMBER_OF_PORTS 2
|
||||||
|
|
||||||
static struct file_operations sync_serial_fops = {
|
static const struct file_operations sync_serial_fops = {
|
||||||
.owner = THIS_MODULE,
|
.owner = THIS_MODULE,
|
||||||
.write = sync_serial_write,
|
.write = sync_serial_write,
|
||||||
.read = sync_serial_read,
|
.read = sync_serial_read,
|
||||||
|
|||||||
@@ -855,7 +855,7 @@ gpio_leds_ioctl(unsigned int cmd, unsigned long arg)
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
struct file_operations gpio_fops = {
|
static const struct file_operations gpio_fops = {
|
||||||
.owner = THIS_MODULE,
|
.owner = THIS_MODULE,
|
||||||
.poll = gpio_poll,
|
.poll = gpio_poll,
|
||||||
.ioctl = gpio_ioctl,
|
.ioctl = gpio_ioctl,
|
||||||
|
|||||||
@@ -201,7 +201,7 @@ static int kvmppc_exit_timing_open(struct inode *inode, struct file *file)
|
|||||||
return single_open(file, kvmppc_exit_timing_show, inode->i_private);
|
return single_open(file, kvmppc_exit_timing_show, inode->i_private);
|
||||||
}
|
}
|
||||||
|
|
||||||
static struct file_operations kvmppc_exit_timing_fops = {
|
static const struct file_operations kvmppc_exit_timing_fops = {
|
||||||
.owner = THIS_MODULE,
|
.owner = THIS_MODULE,
|
||||||
.open = kvmppc_exit_timing_open,
|
.open = kvmppc_exit_timing_open,
|
||||||
.read = seq_read,
|
.read = seq_read,
|
||||||
|
|||||||
@@ -147,7 +147,7 @@ static int __fops ## _open(struct inode *inode, struct file *file) \
|
|||||||
__simple_attr_check_format(__fmt, 0ull); \
|
__simple_attr_check_format(__fmt, 0ull); \
|
||||||
return spufs_attr_open(inode, file, __get, __set, __fmt); \
|
return spufs_attr_open(inode, file, __get, __set, __fmt); \
|
||||||
} \
|
} \
|
||||||
static struct file_operations __fops = { \
|
static const struct file_operations __fops = { \
|
||||||
.owner = THIS_MODULE, \
|
.owner = THIS_MODULE, \
|
||||||
.open = __fops ## _open, \
|
.open = __fops ## _open, \
|
||||||
.release = spufs_attr_release, \
|
.release = spufs_attr_release, \
|
||||||
|
|||||||
@@ -209,7 +209,7 @@ static ssize_t dtl_file_read(struct file *filp, char __user *buf, size_t len,
|
|||||||
return n_read * sizeof(struct dtl_entry);
|
return n_read * sizeof(struct dtl_entry);
|
||||||
}
|
}
|
||||||
|
|
||||||
static struct file_operations dtl_fops = {
|
static const struct file_operations dtl_fops = {
|
||||||
.open = dtl_file_open,
|
.open = dtl_file_open,
|
||||||
.release = dtl_file_release,
|
.release = dtl_file_release,
|
||||||
.read = dtl_file_read,
|
.read = dtl_file_read,
|
||||||
|
|||||||
@@ -100,7 +100,7 @@ static int xen_array_release(struct inode *inode, struct file *file)
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
static struct file_operations u32_array_fops = {
|
static const struct file_operations u32_array_fops = {
|
||||||
.owner = THIS_MODULE,
|
.owner = THIS_MODULE,
|
||||||
.open = u32_array_open,
|
.open = u32_array_open,
|
||||||
.release= xen_array_release,
|
.release= xen_array_release,
|
||||||
|
|||||||
@@ -285,7 +285,7 @@ static int acpi_video_device_brightness_open_fs(struct inode *inode,
|
|||||||
struct file *file);
|
struct file *file);
|
||||||
static ssize_t acpi_video_device_write_brightness(struct file *file,
|
static ssize_t acpi_video_device_write_brightness(struct file *file,
|
||||||
const char __user *buffer, size_t count, loff_t *data);
|
const char __user *buffer, size_t count, loff_t *data);
|
||||||
static struct file_operations acpi_video_device_brightness_fops = {
|
static const struct file_operations acpi_video_device_brightness_fops = {
|
||||||
.owner = THIS_MODULE,
|
.owner = THIS_MODULE,
|
||||||
.open = acpi_video_device_brightness_open_fs,
|
.open = acpi_video_device_brightness_open_fs,
|
||||||
.read = seq_read,
|
.read = seq_read,
|
||||||
|
|||||||
@@ -426,7 +426,7 @@ out:
|
|||||||
return err;
|
return err;
|
||||||
}
|
}
|
||||||
|
|
||||||
static struct file_operations cciss_proc_fops = {
|
static const struct file_operations cciss_proc_fops = {
|
||||||
.owner = THIS_MODULE,
|
.owner = THIS_MODULE,
|
||||||
.open = cciss_seq_open,
|
.open = cciss_seq_open,
|
||||||
.read = seq_read,
|
.read = seq_read,
|
||||||
|
|||||||
@@ -393,7 +393,7 @@ static int apm_open(struct inode * inode, struct file * filp)
|
|||||||
return as ? 0 : -ENOMEM;
|
return as ? 0 : -ENOMEM;
|
||||||
}
|
}
|
||||||
|
|
||||||
static struct file_operations apm_bios_fops = {
|
static const struct file_operations apm_bios_fops = {
|
||||||
.owner = THIS_MODULE,
|
.owner = THIS_MODULE,
|
||||||
.read = apm_read,
|
.read = apm_read,
|
||||||
.poll = apm_poll,
|
.poll = apm_poll,
|
||||||
|
|||||||
@@ -217,7 +217,7 @@ static long bfin_otp_ioctl(struct file *filp, unsigned cmd, unsigned long arg)
|
|||||||
# define bfin_otp_ioctl NULL
|
# define bfin_otp_ioctl NULL
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
static struct file_operations bfin_otp_fops = {
|
static const struct file_operations bfin_otp_fops = {
|
||||||
.owner = THIS_MODULE,
|
.owner = THIS_MODULE,
|
||||||
.unlocked_ioctl = bfin_otp_ioctl,
|
.unlocked_ioctl = bfin_otp_ioctl,
|
||||||
.read = bfin_otp_read,
|
.read = bfin_otp_read,
|
||||||
|
|||||||
@@ -559,7 +559,7 @@ static int hwicap_release(struct inode *inode, struct file *file)
|
|||||||
return status;
|
return status;
|
||||||
}
|
}
|
||||||
|
|
||||||
static struct file_operations hwicap_fops = {
|
static const struct file_operations hwicap_fops = {
|
||||||
.owner = THIS_MODULE,
|
.owner = THIS_MODULE,
|
||||||
.write = hwicap_write,
|
.write = hwicap_write,
|
||||||
.read = hwicap_read,
|
.read = hwicap_read,
|
||||||
|
|||||||
@@ -1487,7 +1487,7 @@ static int gpiolib_open(struct inode *inode, struct file *file)
|
|||||||
return single_open(file, gpiolib_show, NULL);
|
return single_open(file, gpiolib_show, NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
static struct file_operations gpiolib_operations = {
|
static const struct file_operations gpiolib_operations = {
|
||||||
.open = gpiolib_open,
|
.open = gpiolib_open,
|
||||||
.read = seq_read,
|
.read = seq_read,
|
||||||
.llseek = seq_lseek,
|
.llseek = seq_lseek,
|
||||||
|
|||||||
@@ -915,7 +915,7 @@ static int watchdog_ioctl(struct inode *inode, struct file *filp,
|
|||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
static struct file_operations watchdog_fops = {
|
static const struct file_operations watchdog_fops = {
|
||||||
.owner = THIS_MODULE,
|
.owner = THIS_MODULE,
|
||||||
.llseek = no_llseek,
|
.llseek = no_llseek,
|
||||||
.open = watchdog_open,
|
.open = watchdog_open,
|
||||||
|
|||||||
@@ -508,7 +508,7 @@ static int close(struct inode *inode, struct file *file)
|
|||||||
* uses: reading and writing a character device called /dev/lguest. All the
|
* uses: reading and writing a character device called /dev/lguest. All the
|
||||||
* work happens in the read(), write() and close() routines:
|
* work happens in the read(), write() and close() routines:
|
||||||
*/
|
*/
|
||||||
static struct file_operations lguest_fops = {
|
static const struct file_operations lguest_fops = {
|
||||||
.owner = THIS_MODULE,
|
.owner = THIS_MODULE,
|
||||||
.release = close,
|
.release = close,
|
||||||
.write = write,
|
.write = write,
|
||||||
|
|||||||
@@ -1203,7 +1203,7 @@ static unsigned int dvb_dvr_poll(struct file *file, poll_table *wait)
|
|||||||
return mask;
|
return mask;
|
||||||
}
|
}
|
||||||
|
|
||||||
static struct file_operations dvb_dvr_fops = {
|
static const struct file_operations dvb_dvr_fops = {
|
||||||
.owner = THIS_MODULE,
|
.owner = THIS_MODULE,
|
||||||
.read = dvb_dvr_read,
|
.read = dvb_dvr_read,
|
||||||
.write = dvb_dvr_write,
|
.write = dvb_dvr_write,
|
||||||
|
|||||||
@@ -215,7 +215,7 @@ static unsigned int fdtv_ca_io_poll(struct file *file, poll_table *wait)
|
|||||||
return POLLIN;
|
return POLLIN;
|
||||||
}
|
}
|
||||||
|
|
||||||
static struct file_operations fdtv_ca_fops = {
|
static const struct file_operations fdtv_ca_fops = {
|
||||||
.owner = THIS_MODULE,
|
.owner = THIS_MODULE,
|
||||||
.ioctl = dvb_generic_ioctl,
|
.ioctl = dvb_generic_ioctl,
|
||||||
.open = dvb_generic_open,
|
.open = dvb_generic_open,
|
||||||
|
|||||||
@@ -271,7 +271,7 @@ static unsigned int phantom_poll(struct file *file, poll_table *wait)
|
|||||||
return mask;
|
return mask;
|
||||||
}
|
}
|
||||||
|
|
||||||
static struct file_operations phantom_file_ops = {
|
static const struct file_operations phantom_file_ops = {
|
||||||
.open = phantom_open,
|
.open = phantom_open,
|
||||||
.release = phantom_release,
|
.release = phantom_release,
|
||||||
.unlocked_ioctl = phantom_ioctl,
|
.unlocked_ioctl = phantom_ioctl,
|
||||||
|
|||||||
@@ -53,7 +53,6 @@ struct gru_stats_s gru_stats;
|
|||||||
/* Guaranteed user available resources on each node */
|
/* Guaranteed user available resources on each node */
|
||||||
static int max_user_cbrs, max_user_dsr_bytes;
|
static int max_user_cbrs, max_user_dsr_bytes;
|
||||||
|
|
||||||
static struct file_operations gru_fops;
|
|
||||||
static struct miscdevice gru_miscdev;
|
static struct miscdevice gru_miscdev;
|
||||||
|
|
||||||
|
|
||||||
@@ -426,7 +425,7 @@ static void __exit gru_exit(void)
|
|||||||
gru_proc_exit();
|
gru_proc_exit();
|
||||||
}
|
}
|
||||||
|
|
||||||
static struct file_operations gru_fops = {
|
static const struct file_operations gru_fops = {
|
||||||
.owner = THIS_MODULE,
|
.owner = THIS_MODULE,
|
||||||
.unlocked_ioctl = gru_file_unlocked_ioctl,
|
.unlocked_ioctl = gru_file_unlocked_ioctl,
|
||||||
.mmap = gru_file_mmap,
|
.mmap = gru_file_mmap,
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user