Pull acpi_bus_register_driver into release branch
[pandora-kernel.git] / drivers / acpi / scan.c
index e8efaac..fc676ac 100644 (file)
@@ -233,12 +233,9 @@ static int acpi_bus_get_power_flags(struct acpi_device *device)
 
 int acpi_match_ids(struct acpi_device *device, char *ids)
 {
-       int error = 0;
-       struct acpi_buffer buffer = { ACPI_ALLOCATE_BUFFER, NULL };
-
        if (device->flags.hardware_id)
                if (strstr(ids, device->pnp.hardware_id))
-                       goto Done;
+                       return 0;
 
        if (device->flags.compatible_ids) {
                struct acpi_compatible_id_list *cid_list = device->pnp.cid_list;
@@ -247,15 +244,10 @@ int acpi_match_ids(struct acpi_device *device, char *ids)
                /* compare multiple _CID entries against driver ids */
                for (i = 0; i < cid_list->count; i++) {
                        if (strstr(ids, cid_list->id[i].value))
-                               goto Done;
+                               return 0;
                }
        }
-       error = -ENOENT;
-
-      Done:
-       if (buffer.pointer)
-               acpi_os_free(buffer.pointer);
-       return error;
+       return -ENOENT;
 }
 
 static acpi_status
@@ -440,10 +432,7 @@ acpi_eject_store(struct acpi_device *device, const char *buf, size_t count)
        islockable = device->flags.lockable;
        handle = device->handle;
 
-       if (type == ACPI_TYPE_PROCESSOR)
-               result = acpi_bus_trim(device, 0);
-       else
-               result = acpi_bus_trim(device, 1);
+       result = acpi_bus_trim(device, 1);
 
        if (!result)
                result = acpi_eject_operation(handle, islockable);