aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorLen Brown <len.brown@intel.com>2009-04-05 01:51:16 -0400
committerLen Brown <len.brown@intel.com>2009-04-05 01:51:16 -0400
commite2fae0abf6a9c7a2da1a481b7adb4e24f7778992 (patch)
treedbf0007632ca651baa9c7193b0ead3547c656c33 /drivers
parentfff251f6b26bb8f4de15fa5906cf2611623b3661 (diff)
parentc07c9a78a95cab0a9bf0b253d0c52e7798af38c5 (diff)
Merge branch 'constify' into release
Diffstat (limited to 'drivers')
-rw-r--r--drivers/acpi/battery.c2
-rw-r--r--drivers/acpi/ec.c2
-rw-r--r--drivers/acpi/processor_thermal.c2
-rw-r--r--drivers/acpi/processor_throttling.c2
-rw-r--r--drivers/acpi/sbs.c14
-rw-r--r--drivers/acpi/video.c35
6 files changed, 32 insertions, 25 deletions
diff --git a/drivers/acpi/battery.c b/drivers/acpi/battery.c
index 5dfe18bf24cb..2abc03668627 100644
--- a/drivers/acpi/battery.c
+++ b/drivers/acpi/battery.c
@@ -743,7 +743,7 @@ DECLARE_FILE_FUNCTIONS(alarm);
743static struct battery_file { 743static struct battery_file {
744 struct file_operations ops; 744 struct file_operations ops;
745 mode_t mode; 745 mode_t mode;
746 char *name; 746 const char *name;
747} acpi_battery_file[] = { 747} acpi_battery_file[] = {
748 FILE_DESCRIPTION_RO(info), 748 FILE_DESCRIPTION_RO(info),
749 FILE_DESCRIPTION_RO(state), 749 FILE_DESCRIPTION_RO(state),
diff --git a/drivers/acpi/ec.c b/drivers/acpi/ec.c
index 03107bce03ed..04e90443eff7 100644
--- a/drivers/acpi/ec.c
+++ b/drivers/acpi/ec.c
@@ -682,7 +682,7 @@ static int acpi_ec_info_open_fs(struct inode *inode, struct file *file)
682 return single_open(file, acpi_ec_read_info, PDE(inode)->data); 682 return single_open(file, acpi_ec_read_info, PDE(inode)->data);
683} 683}
684 684
685static struct file_operations acpi_ec_info_ops = { 685static const struct file_operations acpi_ec_info_ops = {
686 .open = acpi_ec_info_open_fs, 686 .open = acpi_ec_info_open_fs,
687 .read = seq_read, 687 .read = seq_read,
688 .llseek = seq_lseek, 688 .llseek = seq_lseek,
diff --git a/drivers/acpi/processor_thermal.c b/drivers/acpi/processor_thermal.c
index 0e47e299a9ac..39838c666032 100644
--- a/drivers/acpi/processor_thermal.c
+++ b/drivers/acpi/processor_thermal.c
@@ -509,7 +509,7 @@ static ssize_t acpi_processor_write_limit(struct file * file,
509 return count; 509 return count;
510} 510}
511 511
512struct file_operations acpi_processor_limit_fops = { 512const struct file_operations acpi_processor_limit_fops = {
513 .owner = THIS_MODULE, 513 .owner = THIS_MODULE,
514 .open = acpi_processor_limit_open_fs, 514 .open = acpi_processor_limit_open_fs,
515 .read = seq_read, 515 .read = seq_read,
diff --git a/drivers/acpi/processor_throttling.c b/drivers/acpi/processor_throttling.c
index d27838171f4a..73aed5f5b973 100644
--- a/drivers/acpi/processor_throttling.c
+++ b/drivers/acpi/processor_throttling.c
@@ -1291,7 +1291,7 @@ static ssize_t acpi_processor_write_throttling(struct file *file,
1291 return count; 1291 return count;
1292} 1292}
1293 1293
1294struct file_operations acpi_processor_throttling_fops = { 1294const struct file_operations acpi_processor_throttling_fops = {
1295 .owner = THIS_MODULE, 1295 .owner = THIS_MODULE,
1296 .open = acpi_processor_throttling_open_fs, 1296 .open = acpi_processor_throttling_open_fs,
1297 .read = seq_read, 1297 .read = seq_read,
diff --git a/drivers/acpi/sbs.c b/drivers/acpi/sbs.c
index 3963cb6e0f19..bb8fd1b6054b 100644
--- a/drivers/acpi/sbs.c
+++ b/drivers/acpi/sbs.c
@@ -484,9 +484,9 @@ static int
484acpi_sbs_add_fs(struct proc_dir_entry **dir, 484acpi_sbs_add_fs(struct proc_dir_entry **dir,
485 struct proc_dir_entry *parent_dir, 485 struct proc_dir_entry *parent_dir,
486 char *dir_name, 486 char *dir_name,
487 struct file_operations *info_fops, 487 const struct file_operations *info_fops,
488 struct file_operations *state_fops, 488 const struct file_operations *state_fops,
489 struct file_operations *alarm_fops, void *data) 489 const struct file_operations *alarm_fops, void *data)
490{ 490{
491 if (!*dir) { 491 if (!*dir) {
492 *dir = proc_mkdir(dir_name, parent_dir); 492 *dir = proc_mkdir(dir_name, parent_dir);
@@ -682,7 +682,7 @@ static int acpi_battery_alarm_open_fs(struct inode *inode, struct file *file)
682 return single_open(file, acpi_battery_read_alarm, PDE(inode)->data); 682 return single_open(file, acpi_battery_read_alarm, PDE(inode)->data);
683} 683}
684 684
685static struct file_operations acpi_battery_info_fops = { 685static const struct file_operations acpi_battery_info_fops = {
686 .open = acpi_battery_info_open_fs, 686 .open = acpi_battery_info_open_fs,
687 .read = seq_read, 687 .read = seq_read,
688 .llseek = seq_lseek, 688 .llseek = seq_lseek,
@@ -690,7 +690,7 @@ static struct file_operations acpi_battery_info_fops = {
690 .owner = THIS_MODULE, 690 .owner = THIS_MODULE,
691}; 691};
692 692
693static struct file_operations acpi_battery_state_fops = { 693static const struct file_operations acpi_battery_state_fops = {
694 .open = acpi_battery_state_open_fs, 694 .open = acpi_battery_state_open_fs,
695 .read = seq_read, 695 .read = seq_read,
696 .llseek = seq_lseek, 696 .llseek = seq_lseek,
@@ -698,7 +698,7 @@ static struct file_operations acpi_battery_state_fops = {
698 .owner = THIS_MODULE, 698 .owner = THIS_MODULE,
699}; 699};
700 700
701static struct file_operations acpi_battery_alarm_fops = { 701static const struct file_operations acpi_battery_alarm_fops = {
702 .open = acpi_battery_alarm_open_fs, 702 .open = acpi_battery_alarm_open_fs,
703 .read = seq_read, 703 .read = seq_read,
704 .write = acpi_battery_write_alarm, 704 .write = acpi_battery_write_alarm,
@@ -730,7 +730,7 @@ static int acpi_ac_state_open_fs(struct inode *inode, struct file *file)
730 return single_open(file, acpi_ac_read_state, PDE(inode)->data); 730 return single_open(file, acpi_ac_read_state, PDE(inode)->data);
731} 731}
732 732
733static struct file_operations acpi_ac_state_fops = { 733static const struct file_operations acpi_ac_state_fops = {
734 .open = acpi_ac_state_open_fs, 734 .open = acpi_ac_state_open_fs,
735 .read = seq_read, 735 .read = seq_read,
736 .llseek = seq_lseek, 736 .llseek = seq_lseek,
diff --git a/drivers/acpi/video.c b/drivers/acpi/video.c
index 100c8eeaa5dd..d51d6f06c09b 100644
--- a/drivers/acpi/video.c
+++ b/drivers/acpi/video.c
@@ -201,7 +201,7 @@ struct acpi_video_device {
201 201
202/* bus */ 202/* bus */
203static int acpi_video_bus_info_open_fs(struct inode *inode, struct file *file); 203static int acpi_video_bus_info_open_fs(struct inode *inode, struct file *file);
204static struct file_operations acpi_video_bus_info_fops = { 204static const struct file_operations acpi_video_bus_info_fops = {
205 .owner = THIS_MODULE, 205 .owner = THIS_MODULE,
206 .open = acpi_video_bus_info_open_fs, 206 .open = acpi_video_bus_info_open_fs,
207 .read = seq_read, 207 .read = seq_read,
@@ -210,7 +210,7 @@ static struct file_operations acpi_video_bus_info_fops = {
210}; 210};
211 211
212static int acpi_video_bus_ROM_open_fs(struct inode *inode, struct file *file); 212static int acpi_video_bus_ROM_open_fs(struct inode *inode, struct file *file);
213static struct file_operations acpi_video_bus_ROM_fops = { 213static const struct file_operations acpi_video_bus_ROM_fops = {
214 .owner = THIS_MODULE, 214 .owner = THIS_MODULE,
215 .open = acpi_video_bus_ROM_open_fs, 215 .open = acpi_video_bus_ROM_open_fs,
216 .read = seq_read, 216 .read = seq_read,
@@ -220,7 +220,7 @@ static struct file_operations acpi_video_bus_ROM_fops = {
220 220
221static int acpi_video_bus_POST_info_open_fs(struct inode *inode, 221static int acpi_video_bus_POST_info_open_fs(struct inode *inode,
222 struct file *file); 222 struct file *file);
223static struct file_operations acpi_video_bus_POST_info_fops = { 223static const struct file_operations acpi_video_bus_POST_info_fops = {
224 .owner = THIS_MODULE, 224 .owner = THIS_MODULE,
225 .open = acpi_video_bus_POST_info_open_fs, 225 .open = acpi_video_bus_POST_info_open_fs,
226 .read = seq_read, 226 .read = seq_read,
@@ -229,19 +229,25 @@ static struct file_operations acpi_video_bus_POST_info_fops = {
229}; 229};
230 230
231static int acpi_video_bus_POST_open_fs(struct inode *inode, struct file *file); 231static int acpi_video_bus_POST_open_fs(struct inode *inode, struct file *file);
232static struct file_operations acpi_video_bus_POST_fops = { 232static ssize_t acpi_video_bus_write_POST(struct file *file,
233 const char __user *buffer, size_t count, loff_t *data);
234static const struct file_operations acpi_video_bus_POST_fops = {
233 .owner = THIS_MODULE, 235 .owner = THIS_MODULE,
234 .open = acpi_video_bus_POST_open_fs, 236 .open = acpi_video_bus_POST_open_fs,
235 .read = seq_read, 237 .read = seq_read,
238 .write = acpi_video_bus_write_POST,
236 .llseek = seq_lseek, 239 .llseek = seq_lseek,
237 .release = single_release, 240 .release = single_release,
238}; 241};
239 242
240static int acpi_video_bus_DOS_open_fs(struct inode *inode, struct file *file); 243static int acpi_video_bus_DOS_open_fs(struct inode *inode, struct file *file);
241static struct file_operations acpi_video_bus_DOS_fops = { 244static ssize_t acpi_video_bus_write_DOS(struct file *file,
245 const char __user *buffer, size_t count, loff_t *data);
246static const struct file_operations acpi_video_bus_DOS_fops = {
242 .owner = THIS_MODULE, 247 .owner = THIS_MODULE,
243 .open = acpi_video_bus_DOS_open_fs, 248 .open = acpi_video_bus_DOS_open_fs,
244 .read = seq_read, 249 .read = seq_read,
250 .write = acpi_video_bus_write_DOS,
245 .llseek = seq_lseek, 251 .llseek = seq_lseek,
246 .release = single_release, 252 .release = single_release,
247}; 253};
@@ -249,7 +255,7 @@ static struct file_operations acpi_video_bus_DOS_fops = {
249/* device */ 255/* device */
250static int acpi_video_device_info_open_fs(struct inode *inode, 256static int acpi_video_device_info_open_fs(struct inode *inode,
251 struct file *file); 257 struct file *file);
252static struct file_operations acpi_video_device_info_fops = { 258static const struct file_operations acpi_video_device_info_fops = {
253 .owner = THIS_MODULE, 259 .owner = THIS_MODULE,
254 .open = acpi_video_device_info_open_fs, 260 .open = acpi_video_device_info_open_fs,
255 .read = seq_read, 261 .read = seq_read,
@@ -259,27 +265,33 @@ static struct file_operations acpi_video_device_info_fops = {
259 265
260static int acpi_video_device_state_open_fs(struct inode *inode, 266static int acpi_video_device_state_open_fs(struct inode *inode,
261 struct file *file); 267 struct file *file);
262static struct file_operations acpi_video_device_state_fops = { 268static ssize_t acpi_video_device_write_state(struct file *file,
269 const char __user *buffer, size_t count, loff_t *data);
270static const struct file_operations acpi_video_device_state_fops = {
263 .owner = THIS_MODULE, 271 .owner = THIS_MODULE,
264 .open = acpi_video_device_state_open_fs, 272 .open = acpi_video_device_state_open_fs,
265 .read = seq_read, 273 .read = seq_read,
274 .write = acpi_video_device_write_state,
266 .llseek = seq_lseek, 275 .llseek = seq_lseek,
267 .release = single_release, 276 .release = single_release,
268}; 277};
269 278
270static int acpi_video_device_brightness_open_fs(struct inode *inode, 279static int acpi_video_device_brightness_open_fs(struct inode *inode,
271 struct file *file); 280 struct file *file);
281static ssize_t acpi_video_device_write_brightness(struct file *file,
282 const char __user *buffer, size_t count, loff_t *data);
272static struct file_operations acpi_video_device_brightness_fops = { 283static struct file_operations acpi_video_device_brightness_fops = {
273 .owner = THIS_MODULE, 284 .owner = THIS_MODULE,
274 .open = acpi_video_device_brightness_open_fs, 285 .open = acpi_video_device_brightness_open_fs,
275 .read = seq_read, 286 .read = seq_read,
287 .write = acpi_video_device_write_brightness,
276 .llseek = seq_lseek, 288 .llseek = seq_lseek,
277 .release = single_release, 289 .release = single_release,
278}; 290};
279 291
280static int acpi_video_device_EDID_open_fs(struct inode *inode, 292static int acpi_video_device_EDID_open_fs(struct inode *inode,
281 struct file *file); 293 struct file *file);
282static struct file_operations acpi_video_device_EDID_fops = { 294static const struct file_operations acpi_video_device_EDID_fops = {
283 .owner = THIS_MODULE, 295 .owner = THIS_MODULE,
284 .open = acpi_video_device_EDID_open_fs, 296 .open = acpi_video_device_EDID_open_fs,
285 .read = seq_read, 297 .read = seq_read,
@@ -287,7 +299,7 @@ static struct file_operations acpi_video_device_EDID_fops = {
287 .release = single_release, 299 .release = single_release,
288}; 300};
289 301
290static char device_decode[][30] = { 302static const char device_decode[][30] = {
291 "motherboard VGA device", 303 "motherboard VGA device",
292 "PCI VGA device", 304 "PCI VGA device",
293 "AGP VGA device", 305 "AGP VGA device",
@@ -1253,7 +1265,6 @@ static int acpi_video_device_add_fs(struct acpi_device *device)
1253 goto err_remove_dir; 1265 goto err_remove_dir;
1254 1266
1255 /* 'state' [R/W] */ 1267 /* 'state' [R/W] */
1256 acpi_video_device_state_fops.write = acpi_video_device_write_state;
1257 entry = proc_create_data("state", S_IFREG | S_IRUGO | S_IWUSR, 1268 entry = proc_create_data("state", S_IFREG | S_IRUGO | S_IWUSR,
1258 device_dir, 1269 device_dir,
1259 &acpi_video_device_state_fops, 1270 &acpi_video_device_state_fops,
@@ -1262,8 +1273,6 @@ static int acpi_video_device_add_fs(struct acpi_device *device)
1262 goto err_remove_info; 1273 goto err_remove_info;
1263 1274
1264 /* 'brightness' [R/W] */ 1275 /* 'brightness' [R/W] */
1265 acpi_video_device_brightness_fops.write =
1266 acpi_video_device_write_brightness;
1267 entry = proc_create_data("brightness", S_IFREG | S_IRUGO | S_IWUSR, 1276 entry = proc_create_data("brightness", S_IFREG | S_IRUGO | S_IWUSR,
1268 device_dir, 1277 device_dir,
1269 &acpi_video_device_brightness_fops, 1278 &acpi_video_device_brightness_fops,
@@ -1546,7 +1555,6 @@ static int acpi_video_bus_add_fs(struct acpi_device *device)
1546 goto err_remove_rom; 1555 goto err_remove_rom;
1547 1556
1548 /* 'POST' [R/W] */ 1557 /* 'POST' [R/W] */
1549 acpi_video_bus_POST_fops.write = acpi_video_bus_write_POST;
1550 entry = proc_create_data("POST", S_IFREG | S_IRUGO | S_IWUSR, 1558 entry = proc_create_data("POST", S_IFREG | S_IRUGO | S_IWUSR,
1551 device_dir, 1559 device_dir,
1552 &acpi_video_bus_POST_fops, 1560 &acpi_video_bus_POST_fops,
@@ -1555,7 +1563,6 @@ static int acpi_video_bus_add_fs(struct acpi_device *device)
1555 goto err_remove_post_info; 1563 goto err_remove_post_info;
1556 1564
1557 /* 'DOS' [R/W] */ 1565 /* 'DOS' [R/W] */
1558 acpi_video_bus_DOS_fops.write = acpi_video_bus_write_DOS;
1559 entry = proc_create_data("DOS", S_IFREG | S_IRUGO | S_IWUSR, 1566 entry = proc_create_data("DOS", S_IFREG | S_IRUGO | S_IWUSR,
1560 device_dir, 1567 device_dir,
1561 &acpi_video_bus_DOS_fops, 1568 &acpi_video_bus_DOS_fops,