Commit 070d8eb1 authored by Jan Engelhardt's avatar Jan Engelhardt Committed by Len Brown

ACPI: constify VFTs (1/2)

Signed-off-by: default avatarJan Engelhardt <jengelh@medozas.de>
Signed-off-by: default avatarLen Brown <len.brown@intel.com>
parent 8e0ee43b
...@@ -740,7 +740,7 @@ DECLARE_FILE_FUNCTIONS(alarm); ...@@ -740,7 +740,7 @@ DECLARE_FILE_FUNCTIONS(alarm);
static struct battery_file { static struct battery_file {
struct file_operations ops; struct file_operations ops;
mode_t mode; mode_t mode;
char *name; const char *name;
} acpi_battery_file[] = { } acpi_battery_file[] = {
FILE_DESCRIPTION_RO(info), FILE_DESCRIPTION_RO(info),
FILE_DESCRIPTION_RO(state), FILE_DESCRIPTION_RO(state),
......
...@@ -672,7 +672,7 @@ static int acpi_ec_info_open_fs(struct inode *inode, struct file *file) ...@@ -672,7 +672,7 @@ static int acpi_ec_info_open_fs(struct inode *inode, struct file *file)
return single_open(file, acpi_ec_read_info, PDE(inode)->data); return single_open(file, acpi_ec_read_info, PDE(inode)->data);
} }
static struct file_operations acpi_ec_info_ops = { static const struct file_operations acpi_ec_info_ops = {
.open = acpi_ec_info_open_fs, .open = acpi_ec_info_open_fs,
.read = seq_read, .read = seq_read,
.llseek = seq_lseek, .llseek = seq_lseek,
......
...@@ -507,7 +507,7 @@ static ssize_t acpi_processor_write_limit(struct file * file, ...@@ -507,7 +507,7 @@ static ssize_t acpi_processor_write_limit(struct file * file,
return count; return count;
} }
struct file_operations acpi_processor_limit_fops = { const struct file_operations acpi_processor_limit_fops = {
.owner = THIS_MODULE, .owner = THIS_MODULE,
.open = acpi_processor_limit_open_fs, .open = acpi_processor_limit_open_fs,
.read = seq_read, .read = seq_read,
......
...@@ -1291,7 +1291,7 @@ static ssize_t acpi_processor_write_throttling(struct file *file, ...@@ -1291,7 +1291,7 @@ static ssize_t acpi_processor_write_throttling(struct file *file,
return count; return count;
} }
struct file_operations acpi_processor_throttling_fops = { const struct file_operations acpi_processor_throttling_fops = {
.owner = THIS_MODULE, .owner = THIS_MODULE,
.open = acpi_processor_throttling_open_fs, .open = acpi_processor_throttling_open_fs,
.read = seq_read, .read = seq_read,
......
...@@ -479,9 +479,9 @@ static int ...@@ -479,9 +479,9 @@ static int
acpi_sbs_add_fs(struct proc_dir_entry **dir, acpi_sbs_add_fs(struct proc_dir_entry **dir,
struct proc_dir_entry *parent_dir, struct proc_dir_entry *parent_dir,
char *dir_name, char *dir_name,
struct file_operations *info_fops, const struct file_operations *info_fops,
struct file_operations *state_fops, const struct file_operations *state_fops,
struct file_operations *alarm_fops, void *data) const struct file_operations *alarm_fops, void *data)
{ {
if (!*dir) { if (!*dir) {
*dir = proc_mkdir(dir_name, parent_dir); *dir = proc_mkdir(dir_name, parent_dir);
...@@ -677,7 +677,7 @@ static int acpi_battery_alarm_open_fs(struct inode *inode, struct file *file) ...@@ -677,7 +677,7 @@ static int acpi_battery_alarm_open_fs(struct inode *inode, struct file *file)
return single_open(file, acpi_battery_read_alarm, PDE(inode)->data); return single_open(file, acpi_battery_read_alarm, PDE(inode)->data);
} }
static struct file_operations acpi_battery_info_fops = { static const struct file_operations acpi_battery_info_fops = {
.open = acpi_battery_info_open_fs, .open = acpi_battery_info_open_fs,
.read = seq_read, .read = seq_read,
.llseek = seq_lseek, .llseek = seq_lseek,
...@@ -685,7 +685,7 @@ static struct file_operations acpi_battery_info_fops = { ...@@ -685,7 +685,7 @@ static struct file_operations acpi_battery_info_fops = {
.owner = THIS_MODULE, .owner = THIS_MODULE,
}; };
static struct file_operations acpi_battery_state_fops = { static const struct file_operations acpi_battery_state_fops = {
.open = acpi_battery_state_open_fs, .open = acpi_battery_state_open_fs,
.read = seq_read, .read = seq_read,
.llseek = seq_lseek, .llseek = seq_lseek,
...@@ -693,7 +693,7 @@ static struct file_operations acpi_battery_state_fops = { ...@@ -693,7 +693,7 @@ static struct file_operations acpi_battery_state_fops = {
.owner = THIS_MODULE, .owner = THIS_MODULE,
}; };
static struct file_operations acpi_battery_alarm_fops = { static const struct file_operations acpi_battery_alarm_fops = {
.open = acpi_battery_alarm_open_fs, .open = acpi_battery_alarm_open_fs,
.read = seq_read, .read = seq_read,
.write = acpi_battery_write_alarm, .write = acpi_battery_write_alarm,
...@@ -725,7 +725,7 @@ static int acpi_ac_state_open_fs(struct inode *inode, struct file *file) ...@@ -725,7 +725,7 @@ static int acpi_ac_state_open_fs(struct inode *inode, struct file *file)
return single_open(file, acpi_ac_read_state, PDE(inode)->data); return single_open(file, acpi_ac_read_state, PDE(inode)->data);
} }
static struct file_operations acpi_ac_state_fops = { static const struct file_operations acpi_ac_state_fops = {
.open = acpi_ac_state_open_fs, .open = acpi_ac_state_open_fs,
.read = seq_read, .read = seq_read,
.llseek = seq_lseek, .llseek = seq_lseek,
......
...@@ -189,7 +189,7 @@ struct acpi_video_device { ...@@ -189,7 +189,7 @@ struct acpi_video_device {
/* bus */ /* bus */
static int acpi_video_bus_info_open_fs(struct inode *inode, struct file *file); static int acpi_video_bus_info_open_fs(struct inode *inode, struct file *file);
static struct file_operations acpi_video_bus_info_fops = { static const struct file_operations acpi_video_bus_info_fops = {
.owner = THIS_MODULE, .owner = THIS_MODULE,
.open = acpi_video_bus_info_open_fs, .open = acpi_video_bus_info_open_fs,
.read = seq_read, .read = seq_read,
...@@ -198,7 +198,7 @@ static struct file_operations acpi_video_bus_info_fops = { ...@@ -198,7 +198,7 @@ static struct file_operations acpi_video_bus_info_fops = {
}; };
static int acpi_video_bus_ROM_open_fs(struct inode *inode, struct file *file); static int acpi_video_bus_ROM_open_fs(struct inode *inode, struct file *file);
static struct file_operations acpi_video_bus_ROM_fops = { static const struct file_operations acpi_video_bus_ROM_fops = {
.owner = THIS_MODULE, .owner = THIS_MODULE,
.open = acpi_video_bus_ROM_open_fs, .open = acpi_video_bus_ROM_open_fs,
.read = seq_read, .read = seq_read,
...@@ -208,7 +208,7 @@ static struct file_operations acpi_video_bus_ROM_fops = { ...@@ -208,7 +208,7 @@ static struct file_operations acpi_video_bus_ROM_fops = {
static int acpi_video_bus_POST_info_open_fs(struct inode *inode, static int acpi_video_bus_POST_info_open_fs(struct inode *inode,
struct file *file); struct file *file);
static struct file_operations acpi_video_bus_POST_info_fops = { static const struct file_operations acpi_video_bus_POST_info_fops = {
.owner = THIS_MODULE, .owner = THIS_MODULE,
.open = acpi_video_bus_POST_info_open_fs, .open = acpi_video_bus_POST_info_open_fs,
.read = seq_read, .read = seq_read,
...@@ -237,7 +237,7 @@ static struct file_operations acpi_video_bus_DOS_fops = { ...@@ -237,7 +237,7 @@ static struct file_operations acpi_video_bus_DOS_fops = {
/* device */ /* device */
static int acpi_video_device_info_open_fs(struct inode *inode, static int acpi_video_device_info_open_fs(struct inode *inode,
struct file *file); struct file *file);
static struct file_operations acpi_video_device_info_fops = { static const struct file_operations acpi_video_device_info_fops = {
.owner = THIS_MODULE, .owner = THIS_MODULE,
.open = acpi_video_device_info_open_fs, .open = acpi_video_device_info_open_fs,
.read = seq_read, .read = seq_read,
...@@ -267,7 +267,7 @@ static struct file_operations acpi_video_device_brightness_fops = { ...@@ -267,7 +267,7 @@ static struct file_operations acpi_video_device_brightness_fops = {
static int acpi_video_device_EDID_open_fs(struct inode *inode, static int acpi_video_device_EDID_open_fs(struct inode *inode,
struct file *file); struct file *file);
static struct file_operations acpi_video_device_EDID_fops = { static const struct file_operations acpi_video_device_EDID_fops = {
.owner = THIS_MODULE, .owner = THIS_MODULE,
.open = acpi_video_device_EDID_open_fs, .open = acpi_video_device_EDID_open_fs,
.read = seq_read, .read = seq_read,
......
...@@ -322,7 +322,7 @@ static inline int acpi_processor_ppc_has_changed(struct acpi_processor *pr) ...@@ -322,7 +322,7 @@ static inline int acpi_processor_ppc_has_changed(struct acpi_processor *pr)
int acpi_processor_tstate_has_changed(struct acpi_processor *pr); int acpi_processor_tstate_has_changed(struct acpi_processor *pr);
int acpi_processor_get_throttling_info(struct acpi_processor *pr); int acpi_processor_get_throttling_info(struct acpi_processor *pr);
extern int acpi_processor_set_throttling(struct acpi_processor *pr, int state); extern int acpi_processor_set_throttling(struct acpi_processor *pr, int state);
extern struct file_operations acpi_processor_throttling_fops; extern const struct file_operations acpi_processor_throttling_fops;
extern void acpi_processor_throttling_init(void); extern void acpi_processor_throttling_init(void);
/* in processor_idle.c */ /* in processor_idle.c */
int acpi_processor_power_init(struct acpi_processor *pr, int acpi_processor_power_init(struct acpi_processor *pr,
...@@ -336,7 +336,7 @@ extern struct cpuidle_driver acpi_idle_driver; ...@@ -336,7 +336,7 @@ extern struct cpuidle_driver acpi_idle_driver;
/* in processor_thermal.c */ /* in processor_thermal.c */
int acpi_processor_get_limit_info(struct acpi_processor *pr); int acpi_processor_get_limit_info(struct acpi_processor *pr);
extern struct file_operations acpi_processor_limit_fops; extern const struct file_operations acpi_processor_limit_fops;
extern struct thermal_cooling_device_ops processor_cooling_ops; extern struct thermal_cooling_device_ops processor_cooling_ops;
#ifdef CONFIG_CPU_FREQ #ifdef CONFIG_CPU_FREQ
void acpi_thermal_cpufreq_init(void); void acpi_thermal_cpufreq_init(void);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment