aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/acpi
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/acpi')
-rw-r--r--drivers/acpi/Kconfig6
-rw-r--r--drivers/acpi/ac.c2
-rw-r--r--drivers/acpi/battery.c6
-rw-r--r--drivers/acpi/bus.c4
-rw-r--r--drivers/acpi/button.c4
-rw-r--r--drivers/acpi/cm_sbs.c46
-rw-r--r--drivers/acpi/ec.c2
-rw-r--r--drivers/acpi/event.c2
-rw-r--r--drivers/acpi/fan.c2
-rw-r--r--drivers/acpi/hotkey.c10
-rw-r--r--drivers/acpi/power.c2
-rw-r--r--drivers/acpi/processor_core.c2
-rw-r--r--drivers/acpi/processor_idle.c2
-rw-r--r--drivers/acpi/sleep/proc.c6
-rw-r--r--drivers/acpi/system.c6
-rw-r--r--drivers/acpi/thermal.c10
16 files changed, 46 insertions, 66 deletions
diff --git a/drivers/acpi/Kconfig b/drivers/acpi/Kconfig
index fef7bab12244..56c5ba874623 100644
--- a/drivers/acpi/Kconfig
+++ b/drivers/acpi/Kconfig
@@ -107,7 +107,6 @@ config ACPI_BUTTON
107config ACPI_VIDEO 107config ACPI_VIDEO
108 tristate "Video" 108 tristate "Video"
109 depends on X86 109 depends on X86
110 default y
111 help 110 help
112 This driver implement the ACPI Extensions For Display Adapters 111 This driver implement the ACPI Extensions For Display Adapters
113 for integrated graphics devices on motherboard, as specified in 112 for integrated graphics devices on motherboard, as specified in
@@ -135,8 +134,7 @@ config ACPI_FAN
135 134
136config ACPI_DOCK 135config ACPI_DOCK
137 tristate "Dock" 136 tristate "Dock"
138 depends on !ACPI_IBM_DOCK 137 depends on EXPERIMENTAL
139 default y
140 help 138 help
141 This driver adds support for ACPI controlled docking stations 139 This driver adds support for ACPI controlled docking stations
142 140
@@ -214,6 +212,7 @@ config ACPI_IBM
214config ACPI_IBM_DOCK 212config ACPI_IBM_DOCK
215 bool "Legacy Docking Station Support" 213 bool "Legacy Docking Station Support"
216 depends on ACPI_IBM 214 depends on ACPI_IBM
215 depends on ACPI_DOCK=n
217 default n 216 default n
218 ---help--- 217 ---help---
219 Allows the ibm_acpi driver to handle docking station events. 218 Allows the ibm_acpi driver to handle docking station events.
@@ -357,7 +356,6 @@ config ACPI_SBS
357 tristate "Smart Battery System (EXPERIMENTAL)" 356 tristate "Smart Battery System (EXPERIMENTAL)"
358 depends on X86 && I2C 357 depends on X86 && I2C
359 depends on EXPERIMENTAL 358 depends on EXPERIMENTAL
360 default y
361 help 359 help
362 This driver adds support for the Smart Battery System. 360 This driver adds support for the Smart Battery System.
363 Depends on I2C (Device Drivers ---> I2C support) 361 Depends on I2C (Device Drivers ---> I2C support)
diff --git a/drivers/acpi/ac.c b/drivers/acpi/ac.c
index 24ccf81d135f..96309b9660da 100644
--- a/drivers/acpi/ac.c
+++ b/drivers/acpi/ac.c
@@ -72,7 +72,7 @@ struct acpi_ac {
72 unsigned long state; 72 unsigned long state;
73}; 73};
74 74
75static struct file_operations acpi_ac_fops = { 75static const struct file_operations acpi_ac_fops = {
76 .open = acpi_ac_open_fs, 76 .open = acpi_ac_open_fs,
77 .read = seq_read, 77 .read = seq_read,
78 .llseek = seq_lseek, 78 .llseek = seq_lseek,
diff --git a/drivers/acpi/battery.c b/drivers/acpi/battery.c
index 24bf4dca88cc..6e5221707d97 100644
--- a/drivers/acpi/battery.c
+++ b/drivers/acpi/battery.c
@@ -557,7 +557,7 @@ static int acpi_battery_alarm_open_fs(struct inode *inode, struct file *file)
557 return single_open(file, acpi_battery_read_alarm, PDE(inode)->data); 557 return single_open(file, acpi_battery_read_alarm, PDE(inode)->data);
558} 558}
559 559
560static struct file_operations acpi_battery_info_ops = { 560static const struct file_operations acpi_battery_info_ops = {
561 .open = acpi_battery_info_open_fs, 561 .open = acpi_battery_info_open_fs,
562 .read = seq_read, 562 .read = seq_read,
563 .llseek = seq_lseek, 563 .llseek = seq_lseek,
@@ -565,7 +565,7 @@ static struct file_operations acpi_battery_info_ops = {
565 .owner = THIS_MODULE, 565 .owner = THIS_MODULE,
566}; 566};
567 567
568static struct file_operations acpi_battery_state_ops = { 568static const struct file_operations acpi_battery_state_ops = {
569 .open = acpi_battery_state_open_fs, 569 .open = acpi_battery_state_open_fs,
570 .read = seq_read, 570 .read = seq_read,
571 .llseek = seq_lseek, 571 .llseek = seq_lseek,
@@ -573,7 +573,7 @@ static struct file_operations acpi_battery_state_ops = {
573 .owner = THIS_MODULE, 573 .owner = THIS_MODULE,
574}; 574};
575 575
576static struct file_operations acpi_battery_alarm_ops = { 576static const struct file_operations acpi_battery_alarm_ops = {
577 .open = acpi_battery_alarm_open_fs, 577 .open = acpi_battery_alarm_open_fs,
578 .read = seq_read, 578 .read = seq_read,
579 .write = acpi_battery_write_alarm, 579 .write = acpi_battery_write_alarm,
diff --git a/drivers/acpi/bus.c b/drivers/acpi/bus.c
index ea5a0496a4fd..b2977695e120 100644
--- a/drivers/acpi/bus.c
+++ b/drivers/acpi/bus.c
@@ -192,8 +192,8 @@ int acpi_bus_set_power(acpi_handle handle, int state)
192 /* Make sure this is a valid target state */ 192 /* Make sure this is a valid target state */
193 193
194 if (!device->flags.power_manageable) { 194 if (!device->flags.power_manageable) {
195 printk(KERN_DEBUG "Device `[%s]' is not power manageable", 195 ACPI_DEBUG_PRINT((ACPI_DB_INFO, "Device `[%s]' is not power manageable",
196 device->kobj.name); 196 device->kobj.name));
197 return -ENODEV; 197 return -ENODEV;
198 } 198 }
199 /* 199 /*
diff --git a/drivers/acpi/button.c b/drivers/acpi/button.c
index fd1ba05eab68..5ef885e82c78 100644
--- a/drivers/acpi/button.c
+++ b/drivers/acpi/button.c
@@ -87,14 +87,14 @@ struct acpi_button {
87 unsigned long pushed; 87 unsigned long pushed;
88}; 88};
89 89
90static struct file_operations acpi_button_info_fops = { 90static const struct file_operations acpi_button_info_fops = {
91 .open = acpi_button_info_open_fs, 91 .open = acpi_button_info_open_fs,
92 .read = seq_read, 92 .read = seq_read,
93 .llseek = seq_lseek, 93 .llseek = seq_lseek,
94 .release = single_release, 94 .release = single_release,
95}; 95};
96 96
97static struct file_operations acpi_button_state_fops = { 97static const struct file_operations acpi_button_state_fops = {
98 .open = acpi_button_state_open_fs, 98 .open = acpi_button_state_open_fs,
99 .read = seq_read, 99 .read = seq_read,
100 .llseek = seq_lseek, 100 .llseek = seq_lseek,
diff --git a/drivers/acpi/cm_sbs.c b/drivers/acpi/cm_sbs.c
index 574a75a166c5..a01ce6700bfe 100644
--- a/drivers/acpi/cm_sbs.c
+++ b/drivers/acpi/cm_sbs.c
@@ -39,50 +39,43 @@ ACPI_MODULE_NAME("cm_sbs")
39static struct proc_dir_entry *acpi_ac_dir; 39static struct proc_dir_entry *acpi_ac_dir;
40static struct proc_dir_entry *acpi_battery_dir; 40static struct proc_dir_entry *acpi_battery_dir;
41 41
42static struct semaphore cm_sbs_sem; 42static DEFINE_MUTEX(cm_sbs_mutex);
43 43
44static int lock_ac_dir_cnt = 0; 44static int lock_ac_dir_cnt;
45static int lock_battery_dir_cnt = 0; 45static int lock_battery_dir_cnt;
46 46
47struct proc_dir_entry *acpi_lock_ac_dir(void) 47struct proc_dir_entry *acpi_lock_ac_dir(void)
48{ 48{
49 49 mutex_lock(&cm_sbs_mutex);
50 down(&cm_sbs_sem); 50 if (!acpi_ac_dir)
51 if (!acpi_ac_dir) {
52 acpi_ac_dir = proc_mkdir(ACPI_AC_CLASS, acpi_root_dir); 51 acpi_ac_dir = proc_mkdir(ACPI_AC_CLASS, acpi_root_dir);
53 }
54 if (acpi_ac_dir) { 52 if (acpi_ac_dir) {
55 lock_ac_dir_cnt++; 53 lock_ac_dir_cnt++;
56 } else { 54 } else {
57 ACPI_DEBUG_PRINT((ACPI_DB_ERROR, 55 ACPI_DEBUG_PRINT((ACPI_DB_ERROR,
58 "Cannot create %s\n", ACPI_AC_CLASS)); 56 "Cannot create %s\n", ACPI_AC_CLASS));
59 } 57 }
60 up(&cm_sbs_sem); 58 mutex_unlock(&cm_sbs_mutex);
61 return acpi_ac_dir; 59 return acpi_ac_dir;
62} 60}
63
64EXPORT_SYMBOL(acpi_lock_ac_dir); 61EXPORT_SYMBOL(acpi_lock_ac_dir);
65 62
66void acpi_unlock_ac_dir(struct proc_dir_entry *acpi_ac_dir_param) 63void acpi_unlock_ac_dir(struct proc_dir_entry *acpi_ac_dir_param)
67{ 64{
68 65 mutex_lock(&cm_sbs_mutex);
69 down(&cm_sbs_sem); 66 if (acpi_ac_dir_param)
70 if (acpi_ac_dir_param) {
71 lock_ac_dir_cnt--; 67 lock_ac_dir_cnt--;
72 }
73 if (lock_ac_dir_cnt == 0 && acpi_ac_dir_param && acpi_ac_dir) { 68 if (lock_ac_dir_cnt == 0 && acpi_ac_dir_param && acpi_ac_dir) {
74 remove_proc_entry(ACPI_AC_CLASS, acpi_root_dir); 69 remove_proc_entry(ACPI_AC_CLASS, acpi_root_dir);
75 acpi_ac_dir = 0; 70 acpi_ac_dir = 0;
76 } 71 }
77 up(&cm_sbs_sem); 72 mutex_unlock(&cm_sbs_mutex);
78} 73}
79
80EXPORT_SYMBOL(acpi_unlock_ac_dir); 74EXPORT_SYMBOL(acpi_unlock_ac_dir);
81 75
82struct proc_dir_entry *acpi_lock_battery_dir(void) 76struct proc_dir_entry *acpi_lock_battery_dir(void)
83{ 77{
84 78 mutex_lock(&cm_sbs_mutex);
85 down(&cm_sbs_sem);
86 if (!acpi_battery_dir) { 79 if (!acpi_battery_dir) {
87 acpi_battery_dir = 80 acpi_battery_dir =
88 proc_mkdir(ACPI_BATTERY_CLASS, acpi_root_dir); 81 proc_mkdir(ACPI_BATTERY_CLASS, acpi_root_dir);
@@ -93,39 +86,28 @@ struct proc_dir_entry *acpi_lock_battery_dir(void)
93 ACPI_DEBUG_PRINT((ACPI_DB_ERROR, 86 ACPI_DEBUG_PRINT((ACPI_DB_ERROR,
94 "Cannot create %s\n", ACPI_BATTERY_CLASS)); 87 "Cannot create %s\n", ACPI_BATTERY_CLASS));
95 } 88 }
96 up(&cm_sbs_sem); 89 mutex_unlock(&cm_sbs_mutex);
97 return acpi_battery_dir; 90 return acpi_battery_dir;
98} 91}
99
100EXPORT_SYMBOL(acpi_lock_battery_dir); 92EXPORT_SYMBOL(acpi_lock_battery_dir);
101 93
102void acpi_unlock_battery_dir(struct proc_dir_entry *acpi_battery_dir_param) 94void acpi_unlock_battery_dir(struct proc_dir_entry *acpi_battery_dir_param)
103{ 95{
104 96 mutex_lock(&cm_sbs_mutex);
105 down(&cm_sbs_sem); 97 if (acpi_battery_dir_param)
106 if (acpi_battery_dir_param) {
107 lock_battery_dir_cnt--; 98 lock_battery_dir_cnt--;
108 }
109 if (lock_battery_dir_cnt == 0 && acpi_battery_dir_param 99 if (lock_battery_dir_cnt == 0 && acpi_battery_dir_param
110 && acpi_battery_dir) { 100 && acpi_battery_dir) {
111 remove_proc_entry(ACPI_BATTERY_CLASS, acpi_root_dir); 101 remove_proc_entry(ACPI_BATTERY_CLASS, acpi_root_dir);
112 acpi_battery_dir = 0; 102 acpi_battery_dir = 0;
113 } 103 }
114 up(&cm_sbs_sem); 104 mutex_unlock(&cm_sbs_mutex);
115 return; 105 return;
116} 106}
117
118EXPORT_SYMBOL(acpi_unlock_battery_dir); 107EXPORT_SYMBOL(acpi_unlock_battery_dir);
119 108
120static int __init acpi_cm_sbs_init(void) 109static int __init acpi_cm_sbs_init(void)
121{ 110{
122
123 if (acpi_disabled)
124 return 0;
125
126 init_MUTEX(&cm_sbs_sem);
127
128 return 0; 111 return 0;
129} 112}
130
131subsys_initcall(acpi_cm_sbs_init); 113subsys_initcall(acpi_cm_sbs_init);
diff --git a/drivers/acpi/ec.c b/drivers/acpi/ec.c
index 8c5d7df7d343..e5d796362854 100644
--- a/drivers/acpi/ec.c
+++ b/drivers/acpi/ec.c
@@ -929,7 +929,7 @@ static int acpi_ec_info_open_fs(struct inode *inode, struct file *file)
929 return single_open(file, acpi_ec_read_info, PDE(inode)->data); 929 return single_open(file, acpi_ec_read_info, PDE(inode)->data);
930} 930}
931 931
932static struct file_operations acpi_ec_info_ops = { 932static const struct file_operations acpi_ec_info_ops = {
933 .open = acpi_ec_info_open_fs, 933 .open = acpi_ec_info_open_fs,
934 .read = seq_read, 934 .read = seq_read,
935 .llseek = seq_lseek, 935 .llseek = seq_lseek,
diff --git a/drivers/acpi/event.c b/drivers/acpi/event.c
index a901b23e95e7..959a893c8d1f 100644
--- a/drivers/acpi/event.c
+++ b/drivers/acpi/event.c
@@ -99,7 +99,7 @@ static unsigned int acpi_system_poll_event(struct file *file, poll_table * wait)
99 return 0; 99 return 0;
100} 100}
101 101
102static struct file_operations acpi_system_event_ops = { 102static const struct file_operations acpi_system_event_ops = {
103 .open = acpi_system_open_event, 103 .open = acpi_system_open_event,
104 .read = acpi_system_read_event, 104 .read = acpi_system_read_event,
105 .release = acpi_system_close_event, 105 .release = acpi_system_close_event,
diff --git a/drivers/acpi/fan.c b/drivers/acpi/fan.c
index daed2460924d..045c89477e59 100644
--- a/drivers/acpi/fan.c
+++ b/drivers/acpi/fan.c
@@ -120,7 +120,7 @@ acpi_fan_write_state(struct file *file, const char __user * buffer,
120 return count; 120 return count;
121} 121}
122 122
123static struct file_operations acpi_fan_state_ops = { 123static const struct file_operations acpi_fan_state_ops = {
124 .open = acpi_fan_state_open_fs, 124 .open = acpi_fan_state_open_fs,
125 .read = seq_read, 125 .read = seq_read,
126 .write = acpi_fan_write_state, 126 .write = acpi_fan_write_state,
diff --git a/drivers/acpi/hotkey.c b/drivers/acpi/hotkey.c
index fd81a0f5222f..32c9d88fd196 100644
--- a/drivers/acpi/hotkey.c
+++ b/drivers/acpi/hotkey.c
@@ -184,7 +184,7 @@ static union acpi_hotkey *get_hotkey_by_event(struct
184 *hotkey_list, int event); 184 *hotkey_list, int event);
185 185
186/* event based config */ 186/* event based config */
187static struct file_operations hotkey_config_fops = { 187static const struct file_operations hotkey_config_fops = {
188 .open = hotkey_open_config, 188 .open = hotkey_open_config,
189 .read = seq_read, 189 .read = seq_read,
190 .write = hotkey_write_config, 190 .write = hotkey_write_config,
@@ -193,7 +193,7 @@ static struct file_operations hotkey_config_fops = {
193}; 193};
194 194
195/* polling based config */ 195/* polling based config */
196static struct file_operations hotkey_poll_config_fops = { 196static const struct file_operations hotkey_poll_config_fops = {
197 .open = hotkey_poll_open_config, 197 .open = hotkey_poll_open_config,
198 .read = seq_read, 198 .read = seq_read,
199 .write = hotkey_write_config, 199 .write = hotkey_write_config,
@@ -202,7 +202,7 @@ static struct file_operations hotkey_poll_config_fops = {
202}; 202};
203 203
204/* hotkey driver info */ 204/* hotkey driver info */
205static struct file_operations hotkey_info_fops = { 205static const struct file_operations hotkey_info_fops = {
206 .open = hotkey_info_open_fs, 206 .open = hotkey_info_open_fs,
207 .read = seq_read, 207 .read = seq_read,
208 .llseek = seq_lseek, 208 .llseek = seq_lseek,
@@ -210,7 +210,7 @@ static struct file_operations hotkey_info_fops = {
210}; 210};
211 211
212/* action */ 212/* action */
213static struct file_operations hotkey_action_fops = { 213static const struct file_operations hotkey_action_fops = {
214 .open = hotkey_action_open_fs, 214 .open = hotkey_action_open_fs,
215 .read = seq_read, 215 .read = seq_read,
216 .write = hotkey_execute_aml_method, 216 .write = hotkey_execute_aml_method,
@@ -219,7 +219,7 @@ static struct file_operations hotkey_action_fops = {
219}; 219};
220 220
221/* polling results */ 221/* polling results */
222static struct file_operations hotkey_polling_fops = { 222static const struct file_operations hotkey_polling_fops = {
223 .open = hotkey_polling_open_fs, 223 .open = hotkey_polling_open_fs,
224 .read = seq_read, 224 .read = seq_read,
225 .llseek = seq_lseek, 225 .llseek = seq_lseek,
diff --git a/drivers/acpi/power.c b/drivers/acpi/power.c
index 5d3447f4582c..fec225d1b6b7 100644
--- a/drivers/acpi/power.c
+++ b/drivers/acpi/power.c
@@ -80,7 +80,7 @@ struct acpi_power_resource {
80 80
81static struct list_head acpi_power_resource_list; 81static struct list_head acpi_power_resource_list;
82 82
83static struct file_operations acpi_power_fops = { 83static const struct file_operations acpi_power_fops = {
84 .open = acpi_power_open_fs, 84 .open = acpi_power_open_fs,
85 .read = seq_read, 85 .read = seq_read,
86 .llseek = seq_lseek, 86 .llseek = seq_lseek,
diff --git a/drivers/acpi/processor_core.c b/drivers/acpi/processor_core.c
index 52674323b14d..b13d64415b7a 100644
--- a/drivers/acpi/processor_core.c
+++ b/drivers/acpi/processor_core.c
@@ -102,7 +102,7 @@ static struct acpi_driver acpi_processor_driver = {
102#define INSTALL_NOTIFY_HANDLER 1 102#define INSTALL_NOTIFY_HANDLER 1
103#define UNINSTALL_NOTIFY_HANDLER 2 103#define UNINSTALL_NOTIFY_HANDLER 2
104 104
105static struct file_operations acpi_processor_info_fops = { 105static const struct file_operations acpi_processor_info_fops = {
106 .open = acpi_processor_info_open_fs, 106 .open = acpi_processor_info_open_fs,
107 .read = seq_read, 107 .read = seq_read,
108 .llseek = seq_lseek, 108 .llseek = seq_lseek,
diff --git a/drivers/acpi/processor_idle.c b/drivers/acpi/processor_idle.c
index 8e9c26aae8fe..71066066d626 100644
--- a/drivers/acpi/processor_idle.c
+++ b/drivers/acpi/processor_idle.c
@@ -1070,7 +1070,7 @@ static int acpi_processor_power_open_fs(struct inode *inode, struct file *file)
1070 PDE(inode)->data); 1070 PDE(inode)->data);
1071} 1071}
1072 1072
1073static struct file_operations acpi_processor_power_fops = { 1073static const struct file_operations acpi_processor_power_fops = {
1074 .open = acpi_processor_power_open_fs, 1074 .open = acpi_processor_power_open_fs,
1075 .read = seq_read, 1075 .read = seq_read,
1076 .llseek = seq_lseek, 1076 .llseek = seq_lseek,
diff --git a/drivers/acpi/sleep/proc.c b/drivers/acpi/sleep/proc.c
index 4696a85a98b9..34962578039d 100644
--- a/drivers/acpi/sleep/proc.c
+++ b/drivers/acpi/sleep/proc.c
@@ -434,7 +434,7 @@ acpi_system_wakeup_device_open_fs(struct inode *inode, struct file *file)
434 PDE(inode)->data); 434 PDE(inode)->data);
435} 435}
436 436
437static struct file_operations acpi_system_wakeup_device_fops = { 437static const struct file_operations acpi_system_wakeup_device_fops = {
438 .open = acpi_system_wakeup_device_open_fs, 438 .open = acpi_system_wakeup_device_open_fs,
439 .read = seq_read, 439 .read = seq_read,
440 .write = acpi_system_write_wakeup_device, 440 .write = acpi_system_write_wakeup_device,
@@ -443,7 +443,7 @@ static struct file_operations acpi_system_wakeup_device_fops = {
443}; 443};
444 444
445#ifdef CONFIG_ACPI_SLEEP_PROC_SLEEP 445#ifdef CONFIG_ACPI_SLEEP_PROC_SLEEP
446static struct file_operations acpi_system_sleep_fops = { 446static const struct file_operations acpi_system_sleep_fops = {
447 .open = acpi_system_sleep_open_fs, 447 .open = acpi_system_sleep_open_fs,
448 .read = seq_read, 448 .read = seq_read,
449 .write = acpi_system_write_sleep, 449 .write = acpi_system_write_sleep,
@@ -452,7 +452,7 @@ static struct file_operations acpi_system_sleep_fops = {
452}; 452};
453#endif /* CONFIG_ACPI_SLEEP_PROC_SLEEP */ 453#endif /* CONFIG_ACPI_SLEEP_PROC_SLEEP */
454 454
455static struct file_operations acpi_system_alarm_fops = { 455static const struct file_operations acpi_system_alarm_fops = {
456 .open = acpi_system_alarm_open_fs, 456 .open = acpi_system_alarm_open_fs,
457 .read = seq_read, 457 .read = seq_read,
458 .write = acpi_system_write_alarm, 458 .write = acpi_system_write_alarm,
diff --git a/drivers/acpi/system.c b/drivers/acpi/system.c
index c3bb7faad75e..d86dcb3c2366 100644
--- a/drivers/acpi/system.c
+++ b/drivers/acpi/system.c
@@ -57,7 +57,7 @@ static int acpi_system_info_open_fs(struct inode *inode, struct file *file)
57 return single_open(file, acpi_system_read_info, PDE(inode)->data); 57 return single_open(file, acpi_system_read_info, PDE(inode)->data);
58} 58}
59 59
60static struct file_operations acpi_system_info_ops = { 60static const struct file_operations acpi_system_info_ops = {
61 .open = acpi_system_info_open_fs, 61 .open = acpi_system_info_open_fs,
62 .read = seq_read, 62 .read = seq_read,
63 .llseek = seq_lseek, 63 .llseek = seq_lseek,
@@ -67,7 +67,7 @@ static struct file_operations acpi_system_info_ops = {
67static ssize_t acpi_system_read_dsdt(struct file *, char __user *, size_t, 67static ssize_t acpi_system_read_dsdt(struct file *, char __user *, size_t,
68 loff_t *); 68 loff_t *);
69 69
70static struct file_operations acpi_system_dsdt_ops = { 70static const struct file_operations acpi_system_dsdt_ops = {
71 .read = acpi_system_read_dsdt, 71 .read = acpi_system_read_dsdt,
72}; 72};
73 73
@@ -94,7 +94,7 @@ acpi_system_read_dsdt(struct file *file,
94static ssize_t acpi_system_read_fadt(struct file *, char __user *, size_t, 94static ssize_t acpi_system_read_fadt(struct file *, char __user *, size_t,
95 loff_t *); 95 loff_t *);
96 96
97static struct file_operations acpi_system_fadt_ops = { 97static const struct file_operations acpi_system_fadt_ops = {
98 .read = acpi_system_read_fadt, 98 .read = acpi_system_read_fadt,
99}; 99};
100 100
diff --git a/drivers/acpi/thermal.c b/drivers/acpi/thermal.c
index 503c0b99db12..480a31796886 100644
--- a/drivers/acpi/thermal.c
+++ b/drivers/acpi/thermal.c
@@ -176,21 +176,21 @@ struct acpi_thermal {
176 struct timer_list timer; 176 struct timer_list timer;
177}; 177};
178 178
179static struct file_operations acpi_thermal_state_fops = { 179static const struct file_operations acpi_thermal_state_fops = {
180 .open = acpi_thermal_state_open_fs, 180 .open = acpi_thermal_state_open_fs,
181 .read = seq_read, 181 .read = seq_read,
182 .llseek = seq_lseek, 182 .llseek = seq_lseek,
183 .release = single_release, 183 .release = single_release,
184}; 184};
185 185
186static struct file_operations acpi_thermal_temp_fops = { 186static const struct file_operations acpi_thermal_temp_fops = {
187 .open = acpi_thermal_temp_open_fs, 187 .open = acpi_thermal_temp_open_fs,
188 .read = seq_read, 188 .read = seq_read,
189 .llseek = seq_lseek, 189 .llseek = seq_lseek,
190 .release = single_release, 190 .release = single_release,
191}; 191};
192 192
193static struct file_operations acpi_thermal_trip_fops = { 193static const struct file_operations acpi_thermal_trip_fops = {
194 .open = acpi_thermal_trip_open_fs, 194 .open = acpi_thermal_trip_open_fs,
195 .read = seq_read, 195 .read = seq_read,
196 .write = acpi_thermal_write_trip_points, 196 .write = acpi_thermal_write_trip_points,
@@ -198,7 +198,7 @@ static struct file_operations acpi_thermal_trip_fops = {
198 .release = single_release, 198 .release = single_release,
199}; 199};
200 200
201static struct file_operations acpi_thermal_cooling_fops = { 201static const struct file_operations acpi_thermal_cooling_fops = {
202 .open = acpi_thermal_cooling_open_fs, 202 .open = acpi_thermal_cooling_open_fs,
203 .read = seq_read, 203 .read = seq_read,
204 .write = acpi_thermal_write_cooling_mode, 204 .write = acpi_thermal_write_cooling_mode,
@@ -206,7 +206,7 @@ static struct file_operations acpi_thermal_cooling_fops = {
206 .release = single_release, 206 .release = single_release,
207}; 207};
208 208
209static struct file_operations acpi_thermal_polling_fops = { 209static const struct file_operations acpi_thermal_polling_fops = {
210 .open = acpi_thermal_polling_open_fs, 210 .open = acpi_thermal_polling_open_fs,
211 .read = seq_read, 211 .read = seq_read,
212 .write = acpi_thermal_write_polling, 212 .write = acpi_thermal_write_polling,