aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/acpi/video.c
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/acpi/video.c
parentfff251f6b26bb8f4de15fa5906cf2611623b3661 (diff)
parentc07c9a78a95cab0a9bf0b253d0c52e7798af38c5 (diff)
Merge branch 'constify' into release
Diffstat (limited to 'drivers/acpi/video.c')
-rw-r--r--drivers/acpi/video.c35
1 files changed, 21 insertions, 14 deletions
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,