[ACPI]
authorCameron Gutman <aicommander@gmail.com>
Wed, 29 Sep 2010 02:16:18 +0000 (02:16 +0000)
committerCameron Gutman <aicommander@gmail.com>
Wed, 29 Sep 2010 02:16:18 +0000 (02:16 +0000)
- Fix ACPI warnings
- Based on a patch by Love Nystrom

svn path=/trunk/; revision=48928

reactos/drivers/bus/acpi/busmgr/bus.c
reactos/drivers/bus/acpi/busmgr/power.c
reactos/drivers/bus/acpi/busmgr/utils.c

index 0c46bb8..e7901d2 100644 (file)
@@ -1298,7 +1298,7 @@ acpi_bus_add (
         * ----
         * Fix for the system root bus device -- the only root-level device.
         */
-       if ((parent == ACPI_ROOT_OBJECT) && (type == ACPI_BUS_TYPE_DEVICE)) {
+       if (((ACPI_HANDLE)parent == ACPI_ROOT_OBJECT) && (type == ACPI_BUS_TYPE_DEVICE)) {
                hid = ACPI_BUS_HID;
                sprintf(device->pnp.device_name, "%s", ACPI_BUS_DEVICE_NAME);
                sprintf(device->pnp.device_class, "%s", ACPI_BUS_CLASS);
index 77a3719..c10e981 100644 (file)
@@ -61,7 +61,7 @@ int acpi_power_nocheck;
 
 static int acpi_power_add (struct acpi_device *device);
 static int acpi_power_remove (struct acpi_device *device, int type);
-static int acpi_power_resume(struct acpi_device *device);
+static int acpi_power_resume(struct acpi_device *device, int state);
 
 static struct acpi_driver acpi_power_driver = {
        .name =         ACPI_POWER_DRIVER_NAME,
@@ -128,7 +128,7 @@ acpi_power_get_state (
        int *state)
 {
        ACPI_STATUS             status = AE_OK;
-       unsigned long           sta = 0;
+       unsigned long long      sta = 0;
        char node_name[5];
        ACPI_BUFFER buffer = { sizeof(node_name), node_name };
 
@@ -632,9 +632,9 @@ acpi_power_remove (
        return_VALUE(0);
 }
 
-static int acpi_power_resume(struct acpi_device *device)
+static int acpi_power_resume(struct acpi_device *device, int state)
 {
-       int result = 0, state;
+       int result = 0;
        struct acpi_power_resource *resource = NULL;
        struct acpi_power_reference *ref;
 
index 2a82e49..a604474 100644 (file)
@@ -166,7 +166,7 @@ acpi_extract_package (
        }
 
        head = buffer->Pointer;
-       tail = buffer->Pointer + tail_offset;
+       tail = ((PUCHAR)buffer->Pointer) + tail_offset;
 
        /*
         * Extract package data.