diff options
author | Jan Engelhardt <jengelh@medozas.de> | 2009-01-11 18:08:19 -0500 |
---|---|---|
committer | Len Brown <len.brown@intel.com> | 2009-04-03 23:15:07 -0400 |
commit | b7171ae74b1741245835444bd98a7217958cf929 (patch) | |
tree | 0bb37b909e0e6116e1f1a267d17f5c2034b0708b /drivers/acpi | |
parent | 070d8eb1f6b789206486ea6a4a1bb7745d86d314 (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/acpi')
-rw-r--r-- | drivers/acpi/video.c | 25 |
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 | ||
219 | static int acpi_video_bus_POST_open_fs(struct inode *inode, struct file *file); | 219 | static int acpi_video_bus_POST_open_fs(struct inode *inode, struct file *file); |
220 | static struct file_operations acpi_video_bus_POST_fops = { | 220 | static int acpi_video_bus_write_POST(struct file *file, |
221 | const char __user *buffer, size_t count, loff_t *data); | ||
222 | static 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 | ||
228 | static int acpi_video_bus_DOS_open_fs(struct inode *inode, struct file *file); | 231 | static int acpi_video_bus_DOS_open_fs(struct inode *inode, struct file *file); |
229 | static struct file_operations acpi_video_bus_DOS_fops = { | 232 | static int acpi_video_bus_write_DOS(struct file *file, |
233 | const char __user *buffer, size_t count, loff_t *data); | ||
234 | static 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 | ||
248 | static int acpi_video_device_state_open_fs(struct inode *inode, | 254 | static int acpi_video_device_state_open_fs(struct inode *inode, |
249 | struct file *file); | 255 | struct file *file); |
250 | static struct file_operations acpi_video_device_state_fops = { | 256 | static int acpi_video_device_write_state(struct file *file, |
257 | const char __user *buffer, size_t count, loff_t *data); | ||
258 | static 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 | ||
258 | static int acpi_video_device_brightness_open_fs(struct inode *inode, | 267 | static int acpi_video_device_brightness_open_fs(struct inode *inode, |
259 | struct file *file); | 268 | struct file *file); |
269 | static int acpi_video_device_write_brightness(struct file *file, | ||
270 | const char __user *buffer, size_t count, loff_t *data); | ||
260 | static struct file_operations acpi_video_device_brightness_fops = { | 271 | static 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 | ||
278 | static char device_decode[][30] = { | 290 | static 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, |