ACPI: fix OSC regression that caused aer and pciehp not to load
[safe/jmp/linux-2.6] / drivers / acpi / sbs.c
index 3963cb6..52b9db8 100644 (file)
@@ -46,6 +46,8 @@
 
 #include "sbshc.h"
 
+#define PREFIX "ACPI: "
+
 #define ACPI_SBS_CLASS                 "sbs"
 #define ACPI_AC_CLASS                  "ac_adapter"
 #define ACPI_BATTERY_CLASS             "battery"
@@ -484,16 +486,15 @@ static int
 acpi_sbs_add_fs(struct proc_dir_entry **dir,
                struct proc_dir_entry *parent_dir,
                char *dir_name,
-               struct file_operations *info_fops,
-               struct file_operations *state_fops,
-               struct file_operations *alarm_fops, void *data)
+               const struct file_operations *info_fops,
+               const struct file_operations *state_fops,
+               const struct file_operations *alarm_fops, void *data)
 {
        if (!*dir) {
                *dir = proc_mkdir(dir_name, parent_dir);
                if (!*dir) {
                        return -ENODEV;
                }
-               (*dir)->owner = THIS_MODULE;
        }
 
        /* 'info' [R] */
@@ -682,7 +683,7 @@ static int acpi_battery_alarm_open_fs(struct inode *inode, struct file *file)
        return single_open(file, acpi_battery_read_alarm, PDE(inode)->data);
 }
 
-static struct file_operations acpi_battery_info_fops = {
+static const struct file_operations acpi_battery_info_fops = {
        .open = acpi_battery_info_open_fs,
        .read = seq_read,
        .llseek = seq_lseek,
@@ -690,7 +691,7 @@ static struct file_operations acpi_battery_info_fops = {
        .owner = THIS_MODULE,
 };
 
-static struct file_operations acpi_battery_state_fops = {
+static const struct file_operations acpi_battery_state_fops = {
        .open = acpi_battery_state_open_fs,
        .read = seq_read,
        .llseek = seq_lseek,
@@ -698,7 +699,7 @@ static struct file_operations acpi_battery_state_fops = {
        .owner = THIS_MODULE,
 };
 
-static struct file_operations acpi_battery_alarm_fops = {
+static const struct file_operations acpi_battery_alarm_fops = {
        .open = acpi_battery_alarm_open_fs,
        .read = seq_read,
        .write = acpi_battery_write_alarm,
@@ -730,7 +731,7 @@ static int acpi_ac_state_open_fs(struct inode *inode, struct file *file)
        return single_open(file, acpi_ac_read_state, PDE(inode)->data);
 }
 
-static struct file_operations acpi_ac_state_fops = {
+static const struct file_operations acpi_ac_state_fops = {
        .open = acpi_ac_state_open_fs,
        .read = seq_read,
        .llseek = seq_lseek,