]> git.karo-electronics.de Git - mv-sheeva.git/blobdiff - drivers/acpi/video.c
Merge branch 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux...
[mv-sheeva.git] / drivers / acpi / video.c
index 33c502e560269e0678ab726508f36f13de9c6a6d..f7eb12e55602ecc1f0dc8c9b93ff2e01d3e8a824 100644 (file)
@@ -190,6 +190,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 = {
+       .owner = THIS_MODULE,
        .open = acpi_video_bus_info_open_fs,
        .read = seq_read,
        .llseek = seq_lseek,
@@ -198,6 +199,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 = {
+       .owner = THIS_MODULE,
        .open = acpi_video_bus_ROM_open_fs,
        .read = seq_read,
        .llseek = seq_lseek,
@@ -207,6 +209,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 = {
+       .owner = THIS_MODULE,
        .open = acpi_video_bus_POST_info_open_fs,
        .read = seq_read,
        .llseek = seq_lseek,
@@ -215,6 +218,7 @@ 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 = {
+       .owner = THIS_MODULE,
        .open = acpi_video_bus_POST_open_fs,
        .read = seq_read,
        .llseek = seq_lseek,
@@ -223,6 +227,7 @@ static struct file_operations acpi_video_bus_POST_fops = {
 
 static int acpi_video_bus_DOS_open_fs(struct inode *inode, struct file *file);
 static struct file_operations acpi_video_bus_DOS_fops = {
+       .owner = THIS_MODULE,
        .open = acpi_video_bus_DOS_open_fs,
        .read = seq_read,
        .llseek = seq_lseek,
@@ -233,6 +238,7 @@ static struct file_operations acpi_video_bus_DOS_fops = {
 static int acpi_video_device_info_open_fs(struct inode *inode,
                                          struct file *file);
 static struct file_operations acpi_video_device_info_fops = {
+       .owner = THIS_MODULE,
        .open = acpi_video_device_info_open_fs,
        .read = seq_read,
        .llseek = seq_lseek,
@@ -242,6 +248,7 @@ 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 = {
+       .owner = THIS_MODULE,
        .open = acpi_video_device_state_open_fs,
        .read = seq_read,
        .llseek = seq_lseek,
@@ -251,6 +258,7 @@ static struct file_operations acpi_video_device_state_fops = {
 static int acpi_video_device_brightness_open_fs(struct inode *inode,
                                                struct file *file);
 static struct file_operations acpi_video_device_brightness_fops = {
+       .owner = THIS_MODULE,
        .open = acpi_video_device_brightness_open_fs,
        .read = seq_read,
        .llseek = seq_lseek,
@@ -260,6 +268,7 @@ static struct file_operations acpi_video_device_brightness_fops = {
 static int acpi_video_device_EDID_open_fs(struct inode *inode,
                                          struct file *file);
 static struct file_operations acpi_video_device_EDID_fops = {
+       .owner = THIS_MODULE,
        .open = acpi_video_device_EDID_open_fs,
        .read = seq_read,
        .llseek = seq_lseek,
@@ -1061,47 +1070,37 @@ static int acpi_video_device_add_fs(struct acpi_device *device)
        device_dir->owner = THIS_MODULE;
 
        /* 'info' [R] */
-       entry = create_proc_entry("info", S_IRUGO, device_dir);
+       entry = proc_create_data("info", S_IRUGO, acpi_device_dir(device),
+                       &acpi_video_device_info_fops, acpi_driver_data(device));
        if (!entry)
                goto err_remove_dir;
 
-       entry->proc_fops = &acpi_video_device_info_fops;
-       entry->data = acpi_driver_data(device);
-       entry->owner = THIS_MODULE;
-
        /* 'state' [R/W] */
-       entry = create_proc_entry("state", S_IFREG | S_IRUGO | S_IWUSR,
-                                 device_dir);
+       acpi_video_device_state_fops.write = acpi_video_device_write_state;
+       entry = proc_create_data("state", S_IFREG | S_IRUGO | S_IWUSR,
+                                acpi_device_dir(device),
+                                &acpi_video_device_state_fops,
+                                acpi_driver_data(device));
        if (!entry)
                goto err_remove_info;
 
-       acpi_video_device_state_fops.write = acpi_video_device_write_state;
-       entry->proc_fops = &acpi_video_device_state_fops;
-       entry->data = acpi_driver_data(device);
-       entry->owner = THIS_MODULE;
-
        /* 'brightness' [R/W] */
-       entry = create_proc_entry("brightness", S_IFREG | S_IRUGO | S_IWUSR,
-                                 device_dir);
+       acpi_video_device_brightness_fops.write =
+               acpi_video_device_write_brightness;
+       entry = proc_create_data("brightness", S_IFREG | S_IRUGO | S_IWUSR,
+                                acpi_device_dir(device),
+                                &acpi_video_device_brightness_fops,
+                                acpi_driver_data(device));
        if (!entry)
                goto err_remove_state;
 
-       acpi_video_device_brightness_fops.write =
-                       acpi_video_device_write_brightness;
-       entry->proc_fops = &acpi_video_device_brightness_fops;
-       entry->data = acpi_driver_data(device);
-       entry->owner = THIS_MODULE;
-
        /* 'EDID' [R] */
-       entry = create_proc_entry("EDID", S_IRUGO, device_dir);
+       entry = proc_create_data("EDID", S_IRUGO, acpi_device_dir(device),
+                                &acpi_video_device_EDID_fops,
+                                acpi_driver_data(device));
        if (!entry)
                goto err_remove_brightness;
 
-       entry->proc_fops = &acpi_video_device_EDID_fops;
-       entry->data = acpi_driver_data(device);
-       entry->owner = THIS_MODULE;
-
-       acpi_device_dir(device) = device_dir;
        return 0;
 
  err_remove_brightness:
@@ -1347,54 +1346,44 @@ static int acpi_video_bus_add_fs(struct acpi_device *device)
        device_dir->owner = THIS_MODULE;
 
        /* 'info' [R] */
-       entry = create_proc_entry("info", S_IRUGO, device_dir);
+       entry = proc_create_data("info", S_IRUGO, acpi_device_dir(device),
+                                &acpi_video_bus_info_fops,
+                                acpi_driver_data(device));
        if (!entry)
                goto err_remove_dir;
 
-       entry->proc_fops = &acpi_video_bus_info_fops;
-       entry->data = acpi_driver_data(device);
-       entry->owner = THIS_MODULE;
-
        /* 'ROM' [R] */
-       entry = create_proc_entry("ROM", S_IRUGO, device_dir);
+       entry = proc_create_data("ROM", S_IRUGO, acpi_device_dir(device),
+                                &acpi_video_bus_ROM_fops,
+                                acpi_driver_data(device));
        if (!entry)
                goto err_remove_info;
 
-       entry->proc_fops = &acpi_video_bus_ROM_fops;
-       entry->data = acpi_driver_data(device);
-       entry->owner = THIS_MODULE;
-
        /* 'POST_info' [R] */
-       entry = create_proc_entry("POST_info", S_IRUGO, device_dir);
+       entry = proc_create_data("POST_info", S_IRUGO, acpi_device_dir(device),
+                                &acpi_video_bus_POST_info_fops,
+                                acpi_driver_data(device));
        if (!entry)
                goto err_remove_rom;
 
-       entry->proc_fops = &acpi_video_bus_POST_info_fops;
-       entry->data = acpi_driver_data(device);
-       entry->owner = THIS_MODULE;
-
        /* 'POST' [R/W] */
-       entry = create_proc_entry("POST", S_IFREG | S_IRUGO | S_IWUSR,
-                                 device_dir);
+       acpi_video_bus_POST_fops.write = acpi_video_bus_write_POST;
+       entry = proc_create_data("POST", S_IFREG | S_IRUGO | S_IWUSR,
+                                acpi_device_dir(device),
+                                &acpi_video_bus_POST_fops,
+                                acpi_driver_data(device));
        if (!entry)
                goto err_remove_post_info;
 
-       acpi_video_bus_POST_fops.write = acpi_video_bus_write_POST;
-       entry->proc_fops = &acpi_video_bus_POST_fops;
-       entry->data = acpi_driver_data(device);
-       entry->owner = THIS_MODULE;
-
        /* 'DOS' [R/W] */
-       entry = create_proc_entry("DOS", S_IFREG | S_IRUGO | S_IWUSR,
-                             device_dir);
+       acpi_video_bus_DOS_fops.write = acpi_video_bus_write_DOS;
+       entry = proc_create_data("DOS", S_IFREG | S_IRUGO | S_IWUSR,
+                                acpi_device_dir(device),
+                                &acpi_video_bus_DOS_fops,
+                                acpi_driver_data(device));
        if (!entry)
                goto err_remove_post;
 
-       acpi_video_bus_DOS_fops.write = acpi_video_bus_write_DOS;
-       entry->proc_fops = &acpi_video_bus_DOS_fops;
-       entry->data = acpi_driver_data(device);
-       entry->owner = THIS_MODULE;
-
        video->dir = acpi_device_dir(device) = device_dir;
        return 0;