[PATCH] Re: ACPI patches updated (20030109)

Sergio Visinoni (piffio@arklinux.org)
Wed, 15 Jan 2003 11:03:02 +0100


This is a MIME-formatted message. If you see this text it means that your
E-mail software does not support MIME-formatted messages.

--=_courier-13897-1042624685-0001-2
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

* Grover, Andrew (andrew.grover@intel.com) wrote:
> Hi all,
>
> ACPI patches based upon the 20030109 label have been released.
> http://sourceforge.net/projects/acpi . The non-Linux releases will be
> available at

Hi,
the attached patch fixes compilation for acpiphp with the latest
acpi patches.
Generated on a 2.4.20 tree (but it shoud apply correctly for 2.4.21-pre3 too).

Greetings,
Sergio Visinoni

--=_courier-13897-1042624685-0001-2
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment; filename="linux-2.4.20-acpiphp-fix.patch"

--- linux-2.4.20/drivers/hotplug/acpiphp_glue.c.ark 2003-01-14 19:32:33.000000000 +0100
+++ linux-2.4.20/drivers/hotplug/acpiphp_glue.c 2003-01-14 19:40:17.000000000 +0100
@@ -234,11 +234,11 @@
* TBD: _TRA, etc.
*/
static void
-decode_acpi_resource (acpi_resource *resource, struct acpiphp_bridge *bridge)
+decode_acpi_resource (struct acpi_resource *resource, struct acpiphp_bridge *bridge)
{
- acpi_resource_address16 *address16_data;
- acpi_resource_address32 *address32_data;
- acpi_resource_address64 *address64_data;
+ struct acpi_resource_address16 *address16_data;
+ struct acpi_resource_address32 *address32_data;
+ struct acpi_resource_address64 *address64_data;
struct pci_resource *res;

u32 resource_type, producer_consumer, address_length;
@@ -256,7 +256,7 @@

switch (resource->id) {
case ACPI_RSTYPE_ADDRESS16:
- address16_data = (acpi_resource_address16 *)&resource->data;
+ address16_data = (struct acpi_resource_address16 *)&resource->data;
resource_type = address16_data->resource_type;
producer_consumer = address16_data->producer_consumer;
min_address_range = address16_data->min_address_range;
@@ -268,7 +268,7 @@
break;

case ACPI_RSTYPE_ADDRESS32:
- address32_data = (acpi_resource_address32 *)&resource->data;
+ address32_data = (struct acpi_resource_address32 *)&resource->data;
resource_type = address32_data->resource_type;
producer_consumer = address32_data->producer_consumer;
min_address_range = address32_data->min_address_range;
@@ -280,7 +280,7 @@
break;

case ACPI_RSTYPE_ADDRESS64:
- address64_data = (acpi_resource_address64 *)&resource->data;
+ address64_data = (struct acpi_resource_address64 *)&resource->data;
resource_type = address64_data->resource_type;
producer_consumer = address64_data->producer_consumer;
min_address_range = address64_data->min_address_range;
@@ -300,7 +300,7 @@
break;
}

- resource = (acpi_resource *)((char*)resource + resource->length);
+ resource = (struct acpi_resource *)((char*)resource + resource->length);

if (found && producer_consumer == ACPI_PRODUCER && address_length > 0) {
switch (resource_type) {
@@ -397,9 +397,9 @@
#if ACPI_CA_VERSION < 0x20020201
acpi_buffer buffer;
#else
- acpi_buffer buffer = {ACPI_ALLOCATE_BUFFER, NULL};
+ struct acpi_buffer buffer = {ACPI_ALLOCATE_BUFFER, NULL};
#endif
- acpi_object *package;
+ union acpi_object *package;
int i;

/* default numbers */
@@ -429,7 +429,7 @@
return;
}

- package = (acpi_object *) buffer.pointer;
+ package = (union acpi_object *) buffer.pointer;

if (!package || package->type != ACPI_TYPE_PACKAGE ||
package->package.count != 4 || !package->package.elements) {
@@ -503,7 +503,7 @@
#if ACPI_CA_VERSION < 0x20020201
acpi_buffer buffer;
#else
- acpi_buffer buffer = {ACPI_ALLOCATE_BUFFER, NULL};
+ struct acpi_buffer buffer = {ACPI_ALLOCATE_BUFFER, NULL};
#endif
struct acpiphp_bridge *bridge;

@@ -818,9 +818,9 @@
find_host_bridge (acpi_handle handle, u32 lvl, void *context, void **rv)
{
acpi_status status;
- acpi_device_info info;
+ struct acpi_device_info info;
char objname[5];
- acpi_buffer buffer = { sizeof(objname), objname };
+ struct acpi_buffer buffer = { sizeof(objname), objname };

status = acpi_get_object_info(handle, &info);
if (ACPI_FAILURE(status)) {
@@ -881,8 +881,8 @@
acpi_status status;
struct acpiphp_func *func;
struct list_head *l;
- acpi_object_list arg_list;
- acpi_object arg;
+ struct acpi_object_list arg_list;
+ union acpi_object arg;

int retval = 0;

@@ -1117,7 +1117,7 @@
{
struct acpiphp_bridge *bridge;
char objname[64];
- acpi_buffer buffer = { sizeof(objname), objname };
+ struct acpi_buffer buffer = { sizeof(objname), objname };

bridge = (struct acpiphp_bridge *)context;

@@ -1167,7 +1167,7 @@
{
struct acpiphp_func *func;
char objname[64];
- acpi_buffer buffer = { sizeof(objname), objname };
+ struct acpi_buffer buffer = { sizeof(objname), objname };

acpi_get_name(handle, ACPI_FULL_PATHNAME, &buffer);

--=_courier-13897-1042624685-0001-2--