From: Len Brown <len.brown@intel.com>
Date: Sat, 16 Dec 2006 06:04:27 +0000 (-0500)
Subject: Pull style into test branch
X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=cece901481bafbf14de8cbd3a89ae869ea881055;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git

Pull style into test branch

Conflicts:

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

cece901481bafbf14de8cbd3a89ae869ea881055
diff --cc drivers/acpi/osl.c
index 02b30ae6a68e,2ed2d701f6e1..b7ca020a0565
--- a/drivers/acpi/osl.c
+++ b/drivers/acpi/osl.c
@@@ -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;
diff --cc drivers/acpi/processor_idle.c
index 65b3f056ad89,4504684671f6..4f2982cc5478
--- a/drivers/acpi/processor_idle.c
+++ b/drivers/acpi/processor_idle.c
@@@ -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;
  
diff --cc drivers/acpi/sbs.c
index 8908a975e575,c6a819adcc9e..2fb7533314cd
--- a/drivers/acpi/sbs.c
+++ b/drivers/acpi/sbs.c
@@@ -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;
  	}