]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/acpi/sbs.c
sched: print module list in the "scheduling while atomic" warning
[linux-2.6-omap-h63xx.git] / drivers / acpi / sbs.c
index 585ae3c9c8ea98651e33f46de53876fac237f48d..10a36512647ca6107a76c5982a5f3acaa140b571 100644 (file)
@@ -483,8 +483,6 @@ acpi_sbs_add_fs(struct proc_dir_entry **dir,
                struct file_operations *state_fops,
                struct file_operations *alarm_fops, void *data)
 {
-       struct proc_dir_entry *entry = NULL;
-
        if (!*dir) {
                *dir = proc_mkdir(dir_name, parent_dir);
                if (!*dir) {
@@ -494,34 +492,19 @@ acpi_sbs_add_fs(struct proc_dir_entry **dir,
        }
 
        /* 'info' [R] */
-       if (info_fops) {
-               entry = create_proc_entry(ACPI_SBS_FILE_INFO, S_IRUGO, *dir);
-               if (entry) {
-                       entry->proc_fops = info_fops;
-                       entry->data = data;
-                       entry->owner = THIS_MODULE;
-               }
-       }
+       if (info_fops)
+               proc_create_data(ACPI_SBS_FILE_INFO, S_IRUGO, *dir,
+                                info_fops, data);
 
        /* 'state' [R] */
-       if (state_fops) {
-               entry = create_proc_entry(ACPI_SBS_FILE_STATE, S_IRUGO, *dir);
-               if (entry) {
-                       entry->proc_fops = state_fops;
-                       entry->data = data;
-                       entry->owner = THIS_MODULE;
-               }
-       }
+       if (state_fops)
+               proc_create_data(ACPI_SBS_FILE_STATE, S_IRUGO, *dir,
+                                state_fops, data);
 
        /* 'alarm' [R/W] */
-       if (alarm_fops) {
-               entry = create_proc_entry(ACPI_SBS_FILE_ALARM, S_IRUGO, *dir);
-               if (entry) {
-                       entry->proc_fops = alarm_fops;
-                       entry->data = data;
-                       entry->owner = THIS_MODULE;
-               }
-       }
+       if (alarm_fops)
+               proc_create_data(ACPI_SBS_FILE_ALARM, S_IRUGO, *dir,
+                                alarm_fops, data);
        return 0;
 }