]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/commitdiff
Merge branch 'acpi-modparam' into release
authorLen Brown <len.brown@intel.com>
Sun, 5 Apr 2009 05:45:50 +0000 (01:45 -0400)
committerLen Brown <len.brown@intel.com>
Sun, 5 Apr 2009 05:45:50 +0000 (01:45 -0400)
Conflicts:
drivers/acpi/Makefile

Signed-off-by: Len Brown <len.brown@intel.com>
1  2 
drivers/acpi/Makefile
drivers/acpi/debug.c
drivers/acpi/power.c
drivers/acpi/system.c

diff --combined drivers/acpi/Makefile
index 61675e21fba260e1f7e09be9adcfde801e403cf0,1f5c7a5d55c63916b2cb6500db6e582ba0635e39..4d4e3e02fcb777d8b019bfec6f9aef6f143cfcbd
@@@ -14,44 -14,51 +14,50 @@@ obj-$(CONFIG_X86)          += blacklist.
  #
  # ACPI Core Subsystem (Interpreter)
  #
- obj-y                         += osl.o utils.o reboot.o\
+ obj-y                         += acpi.o \
                                        acpica/
  
+ # All the builtin files are in the "acpi." module_param namespace.
+ acpi-y                                += osl.o utils.o reboot.o
  # sleep related files
obj-y                         += wakeup.o
obj-y                         += sleep.o
obj-$(CONFIG_ACPI_SLEEP)      += proc.o
acpi-y                                += wakeup.o
acpi-y                                += sleep.o
acpi-$(CONFIG_ACPI_SLEEP)     += proc.o
  
  
  #
  # ACPI Bus and Device Drivers
  #
- processor-objs        += processor_core.o processor_throttling.o \
-                               processor_idle.o processor_thermal.o
- ifdef CONFIG_CPU_FREQ
- processor-objs        += processor_perflib.o
+ acpi-y                                += bus.o glue.o
+ acpi-y                                += scan.o
 -# Keep EC driver first. Initialization of others depend on it.
+ acpi-y                                += ec.o
+ acpi-$(CONFIG_ACPI_DOCK)      += dock.o
+ acpi-y                                += pci_root.o pci_link.o pci_irq.o pci_bind.o
+ acpi-y                                += power.o
+ acpi-y                                += system.o event.o
+ acpi-$(CONFIG_ACPI_DEBUG)     += debug.o
+ acpi-$(CONFIG_ACPI_NUMA)      += numa.o
+ acpi-$(CONFIG_ACPI_PROCFS_POWER) += cm_sbs.o
+ ifdef CONFIG_ACPI_VIDEO
+ acpi-y                                += video_detect.o
  endif
  
- obj-y                         += bus.o glue.o scan.o ec.o \
-                                       power.o system.o event.o
+ # These are (potentially) separate modules
  obj-$(CONFIG_ACPI_AC)                 += ac.o
  obj-$(CONFIG_ACPI_BATTERY)    += battery.o
  obj-$(CONFIG_ACPI_BUTTON)     += button.o
  obj-$(CONFIG_ACPI_FAN)                += fan.o
- obj-$(CONFIG_ACPI_DOCK)               += dock.o
  obj-$(CONFIG_ACPI_VIDEO)      += video.o
- ifdef CONFIG_ACPI_VIDEO
- obj-y                         += video_detect.o
- endif
- obj-y                         += pci_root.o pci_link.o pci_irq.o pci_bind.o
  obj-$(CONFIG_ACPI_PCI_SLOT)   += pci_slot.o
  obj-$(CONFIG_ACPI_PROCESSOR)  += processor.o
  obj-$(CONFIG_ACPI_CONTAINER)  += container.o
  obj-$(CONFIG_ACPI_THERMAL)    += thermal.o
- obj-$(CONFIG_ACPI_DEBUG)      += debug.o
- obj-$(CONFIG_ACPI_NUMA)               += numa.o
- obj-$(CONFIG_ACPI_HOTPLUG_MEMORY)     += acpi_memhotplug.o
- obj-$(CONFIG_ACPI_PROCFS_POWER)       += cm_sbs.o
+ obj-$(CONFIG_ACPI_HOTPLUG_MEMORY) += acpi_memhotplug.o
  obj-$(CONFIG_ACPI_SBS)                += sbshc.o
  obj-$(CONFIG_ACPI_SBS)                += sbs.o
+ # processor has its own "processor." module_param namespace
+ processor-y                   := processor_core.o processor_throttling.o
+ processor-y                   += processor_idle.o processor_thermal.o
+ processor-$(CONFIG_CPU_FREQ)  += processor_perflib.o
diff --combined drivers/acpi/debug.c
index 9cb189f3c77c16b0ddbd6c669813384f2bac739b,25f9c38531bde487a739e101512dee4ef4c9f252..a8287be0870e7bc06d7dc21963c32e0996a6e623
  #define _COMPONENT            ACPI_SYSTEM_COMPONENT
  ACPI_MODULE_NAME("debug");
  
- #ifdef MODULE_PARAM_PREFIX
- #undef MODULE_PARAM_PREFIX
- #endif
- #define MODULE_PARAM_PREFIX "acpi."
  struct acpi_dlayer {
        const char *name;
        unsigned long value;
@@@ -297,15 -292,17 +292,15 @@@ acpi_system_write_debug(struct file *fi
  
        return count;
  }
 +#endif
  
 -static int __init acpi_debug_init(void)
 +int __init acpi_debug_init(void)
  {
 +#ifdef CONFIG_ACPI_PROCFS
        struct proc_dir_entry *entry;
        int error = 0;
        char *name;
  
 -
 -      if (acpi_disabled)
 -              return 0;
 -
        /* 'debug_layer' [R/W] */
        name = ACPI_SYSTEM_FILE_DEBUG_LAYER;
        entry =
        remove_proc_entry(ACPI_SYSTEM_FILE_DEBUG_LAYER, acpi_root_dir);
        error = -ENODEV;
        goto Done;
 -}
 -
 -subsys_initcall(acpi_debug_init);
 +#else
 +      return 0;
  #endif
 +}
diff --combined drivers/acpi/power.c
index 11968ba28feb906294020bd2332ccd3c08b48067,87361c1592d3aaec7f1be3afd35b94917e27a7a5..56665a63bf19b29f86c4088f02cd0ff8c7ad9faa
@@@ -54,10 -54,6 +54,6 @@@ ACPI_MODULE_NAME("power")
  #define ACPI_POWER_RESOURCE_STATE_ON  0x01
  #define ACPI_POWER_RESOURCE_STATE_UNKNOWN 0xFF
  
- #ifdef MODULE_PARAM_PREFIX
- #undef MODULE_PARAM_PREFIX
- #endif
- #define MODULE_PARAM_PREFIX "acpi."
  int acpi_power_nocheck;
  module_param_named(power_nocheck, acpi_power_nocheck, bool, 000);
  
@@@ -773,10 -769,14 +769,10 @@@ static int acpi_power_resume(struct acp
        return 0;
  }
  
 -static int __init acpi_power_init(void)
 +int __init acpi_power_init(void)
  {
        int result = 0;
  
 -
 -      if (acpi_disabled)
 -              return 0;
 -
        INIT_LIST_HEAD(&acpi_power_resource_list);
  
        acpi_power_dir = proc_mkdir(ACPI_POWER_CLASS, acpi_root_dir);
  
        return 0;
  }
 -
 -subsys_initcall(acpi_power_init);
diff --combined drivers/acpi/system.c
index 44be75ee7264dfaf64bf985dab67979d9ce04602,a0499d00020cd57ec133a5cd48630f5ff973219c..da51f05ef8d8038bb0390fe3136d4700d0b7b74f
  
  #define _COMPONENT            ACPI_SYSTEM_COMPONENT
  ACPI_MODULE_NAME("system");
- #ifdef MODULE_PARAM_PREFIX
- #undef MODULE_PARAM_PREFIX
- #endif
- #define MODULE_PARAM_PREFIX "acpi."
  
  #define ACPI_SYSTEM_CLASS             "system"
  #define ACPI_SYSTEM_DEVICE_NAME               "System"
@@@ -62,7 -58,6 +58,7 @@@ module_param_call(acpica_version, NULL
     -------------------------------------------------------------------------- */
  static LIST_HEAD(acpi_table_attr_list);
  static struct kobject *tables_kobj;
 +static struct kobject *dynamic_tables_kobj;
  
  struct acpi_table_attr {
        struct bin_attribute attr;
@@@ -129,40 -124,6 +125,40 @@@ static void acpi_table_attr_init(struc
        return;
  }
  
 +static acpi_status
 +acpi_sysfs_table_handler(u32 event, void *table, void *context)
 +{
 +      struct acpi_table_attr *table_attr;
 +
 +      switch (event) {
 +      case ACPI_TABLE_EVENT_LOAD:
 +              table_attr =
 +                      kzalloc(sizeof(struct acpi_table_attr), GFP_KERNEL);
 +              if (!table_attr)
 +                      return AE_NO_MEMORY;
 +
 +              acpi_table_attr_init(table_attr, table);
 +              if (sysfs_create_bin_file(dynamic_tables_kobj,
 +                                      &table_attr->attr)) {
 +                      kfree(table_attr);
 +                      return AE_ERROR;
 +              } else
 +                      list_add_tail(&table_attr->node,
 +                                      &acpi_table_attr_list);
 +              break;
 +      case ACPI_TABLE_EVENT_UNLOAD:
 +              /*
 +               * we do not need to do anything right now
 +               * because the table is not deleted from the
 +               * global table list when unloading it.
 +               */
 +              break;
 +      default:
 +              return AE_BAD_PARAMETER;
 +      }
 +      return AE_OK;
 +}
 +
  static int acpi_system_sysfs_init(void)
  {
        struct acpi_table_attr *table_attr;
  
        tables_kobj = kobject_create_and_add("tables", acpi_kobj);
        if (!tables_kobj)
 -              return -ENOMEM;
 +              goto err;
 +
 +      dynamic_tables_kobj = kobject_create_and_add("dynamic", tables_kobj);
 +      if (!dynamic_tables_kobj)
 +              goto err_dynamic_tables;
  
        do {
                result = acpi_get_table_by_index(table_index, &table_header);
                }
        } while (!result);
        kobject_uevent(tables_kobj, KOBJ_ADD);
 -
 -      return 0;
 +      kobject_uevent(dynamic_tables_kobj, KOBJ_ADD);
 +      result = acpi_install_table_handler(acpi_sysfs_table_handler, NULL);
 +
 +      return result == AE_OK ? 0 : -EINVAL;
 +err_dynamic_tables:
 +      kobject_put(tables_kobj);
 +err:
 +      return -ENOMEM;
  }
  
  /*
@@@ -616,9 -567,12 +612,9 @@@ static int acpi_system_procfs_init(void
  }
  #endif
  
 -static int __init acpi_system_init(void)
 +int __init acpi_system_init(void)
  {
 -      int result = 0;
 -
 -      if (acpi_disabled)
 -              return 0;
 +      int result;
  
        result = acpi_system_procfs_init();
        if (result)
  
        return result;
  }
 -
 -subsys_initcall(acpi_system_init);