aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorJan Engelhardt <jengelh@medozas.de>2009-01-11 18:08:19 -0500
committerLen Brown <len.brown@intel.com>2009-04-03 23:15:07 -0400
commitb7171ae74b1741245835444bd98a7217958cf929 (patch)
tree0bb37b909e0e6116e1f1a267d17f5c2034b0708b /drivers
parent070d8eb1f6b789206486ea6a4a1bb7745d86d314 (diff)
ACPI: constify VFTs (2/2)
Signed-off-by: Jan Engelhardt <jengelh@medozas.de> Signed-off-by: Len Brown <len.brown@intel.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/acpi/video.c25
1 files changed, 16 insertions, 9 deletions
diff --git a/drivers/acpi/video.c b/drivers/acpi/video.c
index 65c3073a1dcb..52779549d367 100644
--- a/drivers/acpi/video.c
+++ b/drivers/acpi/video.c
@@ -217,19 +217,25 @@ static const struct file_operations acpi_video_bus_POST_info_fops = {
217}; 217};
218 218
219static int acpi_video_bus_POST_open_fs(struct inode *inode, struct file *file); 219static int acpi_video_bus_POST_open_fs(struct inode *inode, struct file *file);
220static struct file_operations acpi_video_bus_POST_fops = { 220static int acpi_video_bus_write_POST(struct file *file,
221 const char __user *buffer, size_t count, loff_t *data);
222static const struct file_operations acpi_video_bus_POST_fops = {
221 .owner = THIS_MODULE, 223 .owner = THIS_MODULE,
222 .open = acpi_video_bus_POST_open_fs, 224 .open = acpi_video_bus_POST_open_fs,
223 .read = seq_read, 225 .read = seq_read,
226 .write = acpi_video_bus_write_POST,
224 .llseek = seq_lseek, 227 .llseek = seq_lseek,
225 .release = single_release, 228 .release = single_release,
226}; 229};
227 230
228static int acpi_video_bus_DOS_open_fs(struct inode *inode, struct file *file); 231static int acpi_video_bus_DOS_open_fs(struct inode *inode, struct file *file);
229static struct file_operations acpi_video_bus_DOS_fops = { 232static int acpi_video_bus_write_DOS(struct file *file,
233 const char __user *buffer, size_t count, loff_t *data);
234static const struct file_operations acpi_video_bus_DOS_fops = {
230 .owner = THIS_MODULE, 235 .owner = THIS_MODULE,
231 .open = acpi_video_bus_DOS_open_fs, 236 .open = acpi_video_bus_DOS_open_fs,
232 .read = seq_read, 237 .read = seq_read,
238 .write = acpi_video_bus_write_DOS,
233 .llseek = seq_lseek, 239 .llseek = seq_lseek,
234 .release = single_release, 240 .release = single_release,
235}; 241};
@@ -247,20 +253,26 @@ static const struct file_operations acpi_video_device_info_fops = {
247 253
248static int acpi_video_device_state_open_fs(struct inode *inode, 254static int acpi_video_device_state_open_fs(struct inode *inode,
249 struct file *file); 255 struct file *file);
250static struct file_operations acpi_video_device_state_fops = { 256static int acpi_video_device_write_state(struct file *file,
257 const char __user *buffer, size_t count, loff_t *data);
258static const struct file_operations acpi_video_device_state_fops = {
251 .owner = THIS_MODULE, 259 .owner = THIS_MODULE,
252 .open = acpi_video_device_state_open_fs, 260 .open = acpi_video_device_state_open_fs,
253 .read = seq_read, 261 .read = seq_read,
262 .write = acpi_video_device_write_state,
254 .llseek = seq_lseek, 263 .llseek = seq_lseek,
255 .release = single_release, 264 .release = single_release,
256}; 265};
257 266
258static int acpi_video_device_brightness_open_fs(struct inode *inode, 267static int acpi_video_device_brightness_open_fs(struct inode *inode,
259 struct file *file); 268 struct file *file);
269static int acpi_video_device_write_brightness(struct file *file,
270 const char __user *buffer, size_t count, loff_t *data);
260static struct file_operations acpi_video_device_brightness_fops = { 271static struct file_operations acpi_video_device_brightness_fops = {
261 .owner = THIS_MODULE, 272 .owner = THIS_MODULE,
262 .open = acpi_video_device_brightness_open_fs, 273 .open = acpi_video_device_brightness_open_fs,
263 .read = seq_read, 274 .read = seq_read,
275 .write = acpi_video_device_write_brightness,
264 .llseek = seq_lseek, 276 .llseek = seq_lseek,
265 .release = single_release, 277 .release = single_release,
266}; 278};
@@ -275,7 +287,7 @@ static const struct file_operations acpi_video_device_EDID_fops = {
275 .release = single_release, 287 .release = single_release,
276}; 288};
277 289
278static char device_decode[][30] = { 290static const char device_decode[][30] = {
279 "motherboard VGA device", 291 "motherboard VGA device",
280 "PCI VGA device", 292 "PCI VGA device",
281 "AGP VGA device", 293 "AGP VGA device",
@@ -1134,7 +1146,6 @@ static int acpi_video_device_add_fs(struct acpi_device *device)
1134 goto err_remove_dir; 1146 goto err_remove_dir;
1135 1147
1136 /* 'state' [R/W] */ 1148 /* 'state' [R/W] */
1137 acpi_video_device_state_fops.write = acpi_video_device_write_state;
1138 entry = proc_create_data("state", S_IFREG | S_IRUGO | S_IWUSR, 1149 entry = proc_create_data("state", S_IFREG | S_IRUGO | S_IWUSR,
1139 device_dir, 1150 device_dir,
1140 &acpi_video_device_state_fops, 1151 &acpi_video_device_state_fops,
@@ -1143,8 +1154,6 @@ static int acpi_video_device_add_fs(struct acpi_device *device)
1143 goto err_remove_info; 1154 goto err_remove_info;
1144 1155
1145 /* 'brightness' [R/W] */ 1156 /* 'brightness' [R/W] */
1146 acpi_video_device_brightness_fops.write =
1147 acpi_video_device_write_brightness;
1148 entry = proc_create_data("brightness", S_IFREG | S_IRUGO | S_IWUSR, 1157 entry = proc_create_data("brightness", S_IFREG | S_IRUGO | S_IWUSR,
1149 device_dir, 1158 device_dir,
1150 &acpi_video_device_brightness_fops, 1159 &acpi_video_device_brightness_fops,
@@ -1427,7 +1436,6 @@ static int acpi_video_bus_add_fs(struct acpi_device *device)
1427 goto err_remove_rom; 1436 goto err_remove_rom;
1428 1437
1429 /* 'POST' [R/W] */ 1438 /* 'POST' [R/W] */
1430 acpi_video_bus_POST_fops.write = acpi_video_bus_write_POST;
1431 entry = proc_create_data("POST", S_IFREG | S_IRUGO | S_IWUSR, 1439 entry = proc_create_data("POST", S_IFREG | S_IRUGO | S_IWUSR,
1432 device_dir, 1440 device_dir,
1433 &acpi_video_bus_POST_fops, 1441 &acpi_video_bus_POST_fops,
@@ -1436,7 +1444,6 @@ static int acpi_video_bus_add_fs(struct acpi_device *device)
1436 goto err_remove_post_info; 1444 goto err_remove_post_info;
1437 1445
1438 /* 'DOS' [R/W] */ 1446 /* 'DOS' [R/W] */
1439 acpi_video_bus_DOS_fops.write = acpi_video_bus_write_DOS;
1440 entry = proc_create_data("DOS", S_IFREG | S_IRUGO | S_IWUSR, 1447 entry = proc_create_data("DOS", S_IFREG | S_IRUGO | S_IWUSR,
1441 device_dir, 1448 device_dir,
1442 &acpi_video_bus_DOS_fops, 1449 &acpi_video_bus_DOS_fops,