Pull style into test branch
Len Brown [Sat, 16 Dec 2006 06:04:27 +0000 (01:04 -0500)]
Conflicts:

drivers/acpi/button.c
drivers/acpi/ec.c
drivers/acpi/osl.c
drivers/acpi/sbs.c

13 files changed:
1  2 
drivers/acpi/acpi_memhotplug.c
drivers/acpi/asus_acpi.c
drivers/acpi/battery.c
drivers/acpi/dock.c
drivers/acpi/glue.c
drivers/acpi/ibm_acpi.c
drivers/acpi/osl.c
drivers/acpi/pci_link.c
drivers/acpi/power.c
drivers/acpi/processor_core.c
drivers/acpi/processor_idle.c
drivers/acpi/processor_perflib.c
drivers/acpi/sbs.c

Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
@@@ -565,9 -564,12 +565,10 @@@ void acpi_os_derive_pci_id(acpi_handle 
        acpi_os_derive_pci_id_2(rhandle, chandle, id, &is_bridge, &bus_number);
  }
  
 -static void acpi_os_execute_deferred(void *context)
 +static void acpi_os_execute_deferred(struct work_struct *work)
  {
 -      struct acpi_os_dpc *dpc = NULL;
 +      struct acpi_os_dpc *dpc = container_of(work, struct acpi_os_dpc, work);
 -
 -      dpc = context;
        if (!dpc) {
                printk(KERN_ERR PREFIX "Invalid (NULL) context\n");
                return;
Simple merge
Simple merge
Simple merge
@@@ -720,41 -718,24 +720,41 @@@ static int acpi_processor_get_power_inf
                    (reg->space_id != ACPI_ADR_SPACE_FIXED_HARDWARE))
                        continue;
  
 -              cx.address = (reg->space_id == ACPI_ADR_SPACE_FIXED_HARDWARE) ?
 -                  0 : reg->address;
 -
                /* There should be an easy way to extract an integer... */
-               obj = (union acpi_object *)&(element->package.elements[1]);
+               obj = &(element->package.elements[1]);
                if (obj->type != ACPI_TYPE_INTEGER)
                        continue;
  
                cx.type = obj->integer.value;
 -
 -              if ((cx.type != ACPI_STATE_C1) &&
 -                  (reg->space_id != ACPI_ADR_SPACE_SYSTEM_IO))
 -                      continue;
 -
 -              if ((cx.type < ACPI_STATE_C2) || (cx.type > ACPI_STATE_C3))
 -                      continue;
 +              /*
 +               * Some buggy BIOSes won't list C1 in _CST -
 +               * Let acpi_processor_get_power_info_default() handle them later
 +               */
 +              if (i == 1 && cx.type != ACPI_STATE_C1)
 +                      current_count++;
 +
 +              cx.address = reg->address;
 +              cx.index = current_count + 1;
 +
 +              cx.space_id = ACPI_CSTATE_SYSTEMIO;
 +              if (reg->space_id == ACPI_ADR_SPACE_FIXED_HARDWARE) {
 +                      if (acpi_processor_ffh_cstate_probe
 +                                      (pr->id, &cx, reg) == 0) {
 +                              cx.space_id = ACPI_CSTATE_FFH;
 +                      } else if (cx.type != ACPI_STATE_C1) {
 +                              /*
 +                               * C1 is a special case where FIXED_HARDWARE
 +                               * can be handled in non-MWAIT way as well.
 +                               * In that case, save this _CST entry info.
 +                               * That is, we retain space_id of SYSTEM_IO for
 +                               * halt based C1.
 +                               * Otherwise, ignore this info and continue.
 +                               */
 +                              continue;
 +                      }
 +              }
  
-               obj = (union acpi_object *)&(element->package.elements[2]);
+               obj = &(element->package.elements[2]);
                if (obj->type != ACPI_TYPE_INTEGER)
                        continue;
  
Simple merge
@@@ -1685,16 -1685,10 +1685,16 @@@ static int acpi_sbs_add(struct acpi_dev
  
  int acpi_sbs_remove(struct acpi_device *device, int type)
  {
-       struct acpi_sbs *sbs = NULL;
 -      struct acpi_sbs *sbs = acpi_driver_data(device);
++      struct acpi_sbs *sbs;
        int id;
  
 -      if (!device || !sbs) {
 +      if (!device) {
 +              return -EINVAL;
 +      }
 +
 +      sbs = (struct acpi_sbs *)acpi_driver_data(device);
 +
 +      if (!sbs) {
                return -EINVAL;
        }