diff options
author | Len Brown <len.brown@intel.com> | 2009-04-05 01:51:16 -0400 |
---|---|---|
committer | Len Brown <len.brown@intel.com> | 2009-04-05 01:51:16 -0400 |
commit | e2fae0abf6a9c7a2da1a481b7adb4e24f7778992 (patch) | |
tree | dbf0007632ca651baa9c7193b0ead3547c656c33 /drivers/acpi/video.c | |
parent | fff251f6b26bb8f4de15fa5906cf2611623b3661 (diff) | |
parent | c07c9a78a95cab0a9bf0b253d0c52e7798af38c5 (diff) | |
download | op-kernel-dev-e2fae0abf6a9c7a2da1a481b7adb4e24f7778992.zip op-kernel-dev-e2fae0abf6a9c7a2da1a481b7adb4e24f7778992.tar.gz |
Merge branch 'constify' into release
Diffstat (limited to 'drivers/acpi/video.c')
-rw-r--r-- | drivers/acpi/video.c | 35 |
1 files changed, 21 insertions, 14 deletions
diff --git a/drivers/acpi/video.c b/drivers/acpi/video.c index 100c8ee..d51d6f0 100644 --- a/drivers/acpi/video.c +++ b/drivers/acpi/video.c @@ -201,7 +201,7 @@ struct acpi_video_device { /* bus */ static int acpi_video_bus_info_open_fs(struct inode *inode, struct file *file); -static struct file_operations acpi_video_bus_info_fops = { +static const struct file_operations acpi_video_bus_info_fops = { .owner = THIS_MODULE, .open = acpi_video_bus_info_open_fs, .read = seq_read, @@ -210,7 +210,7 @@ static struct file_operations acpi_video_bus_info_fops = { }; static int acpi_video_bus_ROM_open_fs(struct inode *inode, struct file *file); -static struct file_operations acpi_video_bus_ROM_fops = { +static const struct file_operations acpi_video_bus_ROM_fops = { .owner = THIS_MODULE, .open = acpi_video_bus_ROM_open_fs, .read = seq_read, @@ -220,7 +220,7 @@ static struct file_operations acpi_video_bus_ROM_fops = { static int acpi_video_bus_POST_info_open_fs(struct inode *inode, struct file *file); -static struct file_operations acpi_video_bus_POST_info_fops = { +static const struct file_operations acpi_video_bus_POST_info_fops = { .owner = THIS_MODULE, .open = acpi_video_bus_POST_info_open_fs, .read = seq_read, @@ -229,19 +229,25 @@ static struct file_operations acpi_video_bus_POST_info_fops = { }; static int acpi_video_bus_POST_open_fs(struct inode *inode, struct file *file); -static struct file_operations acpi_video_bus_POST_fops = { +static ssize_t acpi_video_bus_write_POST(struct file *file, + const char __user *buffer, size_t count, loff_t *data); +static const struct file_operations acpi_video_bus_POST_fops = { .owner = THIS_MODULE, .open = acpi_video_bus_POST_open_fs, .read = seq_read, + .write = acpi_video_bus_write_POST, .llseek = seq_lseek, .release = single_release, }; static int acpi_video_bus_DOS_open_fs(struct inode *inode, struct file *file); -static struct file_operations acpi_video_bus_DOS_fops = { +static ssize_t acpi_video_bus_write_DOS(struct file *file, + const char __user *buffer, size_t count, loff_t *data); +static const struct file_operations acpi_video_bus_DOS_fops = { .owner = THIS_MODULE, .open = acpi_video_bus_DOS_open_fs, .read = seq_read, + .write = acpi_video_bus_write_DOS, .llseek = seq_lseek, .release = single_release, }; @@ -249,7 +255,7 @@ static struct file_operations acpi_video_bus_DOS_fops = { /* device */ static int acpi_video_device_info_open_fs(struct inode *inode, struct file *file); -static struct file_operations acpi_video_device_info_fops = { +static const struct file_operations acpi_video_device_info_fops = { .owner = THIS_MODULE, .open = acpi_video_device_info_open_fs, .read = seq_read, @@ -259,27 +265,33 @@ static struct file_operations acpi_video_device_info_fops = { static int acpi_video_device_state_open_fs(struct inode *inode, struct file *file); -static struct file_operations acpi_video_device_state_fops = { +static ssize_t acpi_video_device_write_state(struct file *file, + const char __user *buffer, size_t count, loff_t *data); +static const struct file_operations acpi_video_device_state_fops = { .owner = THIS_MODULE, .open = acpi_video_device_state_open_fs, .read = seq_read, + .write = acpi_video_device_write_state, .llseek = seq_lseek, .release = single_release, }; static int acpi_video_device_brightness_open_fs(struct inode *inode, struct file *file); +static ssize_t acpi_video_device_write_brightness(struct file *file, + const char __user *buffer, size_t count, loff_t *data); static struct file_operations acpi_video_device_brightness_fops = { .owner = THIS_MODULE, .open = acpi_video_device_brightness_open_fs, .read = seq_read, + .write = acpi_video_device_write_brightness, .llseek = seq_lseek, .release = single_release, }; static int acpi_video_device_EDID_open_fs(struct inode *inode, struct file *file); -static struct file_operations acpi_video_device_EDID_fops = { +static const struct file_operations acpi_video_device_EDID_fops = { .owner = THIS_MODULE, .open = acpi_video_device_EDID_open_fs, .read = seq_read, @@ -287,7 +299,7 @@ static struct file_operations acpi_video_device_EDID_fops = { .release = single_release, }; -static char device_decode[][30] = { +static const char device_decode[][30] = { "motherboard VGA device", "PCI VGA device", "AGP VGA device", @@ -1253,7 +1265,6 @@ static int acpi_video_device_add_fs(struct acpi_device *device) goto err_remove_dir; /* 'state' [R/W] */ - acpi_video_device_state_fops.write = acpi_video_device_write_state; entry = proc_create_data("state", S_IFREG | S_IRUGO | S_IWUSR, device_dir, &acpi_video_device_state_fops, @@ -1262,8 +1273,6 @@ static int acpi_video_device_add_fs(struct acpi_device *device) goto err_remove_info; /* 'brightness' [R/W] */ - acpi_video_device_brightness_fops.write = - acpi_video_device_write_brightness; entry = proc_create_data("brightness", S_IFREG | S_IRUGO | S_IWUSR, device_dir, &acpi_video_device_brightness_fops, @@ -1546,7 +1555,6 @@ static int acpi_video_bus_add_fs(struct acpi_device *device) goto err_remove_rom; /* 'POST' [R/W] */ - acpi_video_bus_POST_fops.write = acpi_video_bus_write_POST; entry = proc_create_data("POST", S_IFREG | S_IRUGO | S_IWUSR, device_dir, &acpi_video_bus_POST_fops, @@ -1555,7 +1563,6 @@ static int acpi_video_bus_add_fs(struct acpi_device *device) goto err_remove_post_info; /* 'DOS' [R/W] */ - acpi_video_bus_DOS_fops.write = acpi_video_bus_write_DOS; entry = proc_create_data("DOS", S_IFREG | S_IRUGO | S_IWUSR, device_dir, &acpi_video_bus_DOS_fops, |