]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/acpi/ec.c
Merge git://git.infradead.org/mtd-2.6
[linux-2.6-omap-h63xx.git] / drivers / acpi / ec.c
index 4178d17aa0edc2bc8576d44ee6d4bae184c6dcfb..ef42316f89f52452f69192d89894ca9ba64f46ee 100644 (file)
@@ -736,6 +736,7 @@ static acpi_status
 ec_parse_device(acpi_handle handle, u32 Level, void *context, void **retval)
 {
        acpi_status status;
+       unsigned long long tmp;
 
        struct acpi_ec *ec = context;
        status = acpi_walk_resources(handle, METHOD_NAME__CRS,
@@ -745,11 +746,13 @@ ec_parse_device(acpi_handle handle, u32 Level, void *context, void **retval)
 
        /* Get GPE bit assignment (EC events). */
        /* TODO: Add support for _GPE returning a package */
-       status = acpi_evaluate_integer(handle, "_GPE", NULL, &ec->gpe);
+       status = acpi_evaluate_integer(handle, "_GPE", NULL, &tmp);
        if (ACPI_FAILURE(status))
                return status;
+       ec->gpe = tmp;
        /* Use the global lock for all EC transactions? */
-       acpi_evaluate_integer(handle, "_GLK", NULL, &ec->global_lock);
+       acpi_evaluate_integer(handle, "_GLK", NULL, &tmp);
+       ec->global_lock = tmp;
        ec->handle = handle;
        return AE_CTRL_TERMINATE;
 }
@@ -799,7 +802,7 @@ static int acpi_ec_add(struct acpi_device *device)
 
        if (!first_ec)
                first_ec = ec;
-       acpi_driver_data(device) = ec;
+       device->driver_data = ec;
        acpi_ec_add_fs(device);
        pr_info(PREFIX "GPE = 0x%lx, I/O: command/status = 0x%lx, data = 0x%lx\n",
                          ec->gpe, ec->command_addr, ec->data_addr);
@@ -824,7 +827,7 @@ static int acpi_ec_remove(struct acpi_device *device, int type)
        }
        mutex_unlock(&ec->lock);
        acpi_ec_remove_fs(device);
-       acpi_driver_data(device) = NULL;
+       device->driver_data = NULL;
        if (ec == first_ec)
                first_ec = NULL;
        kfree(ec);