X-Git-Url: https://git.openpandora.org/cgi-bin/gitweb.cgi?p=pandora-kernel.git;a=blobdiff_plain;f=drivers%2Facpi%2Fglue.c;h=fcb881db5b0bf339e60fa8c6f33c41af670d64d8;hp=770cfc8b17e0cdbf00f85639ec508f7a6c12a6e2;hb=3d5271f9883cba7b54762bc4fe027d4172f06db7;hpb=ef88b7dba2b47c70037a34a599d383462bb74bd3 diff --git a/drivers/acpi/glue.c b/drivers/acpi/glue.c index 770cfc8b17e0..fcb881db5b0b 100644 --- a/drivers/acpi/glue.c +++ b/drivers/acpi/glue.c @@ -29,7 +29,8 @@ int register_acpi_bus_type(struct acpi_bus_type *type) down_write(&bus_type_sem); list_add_tail(&type->list, &bus_type_list); up_write(&bus_type_sem); - printk(KERN_INFO PREFIX "bus type %s registered\n", type->bus->name); + printk(KERN_INFO PREFIX "bus type %s registered\n", + type->bus->name); return 0; } return -ENODEV; @@ -45,7 +46,8 @@ int unregister_acpi_bus_type(struct acpi_bus_type *type) down_write(&bus_type_sem); list_del_init(&type->list); up_write(&bus_type_sem); - printk(KERN_INFO PREFIX "ACPI bus type %s unregistered\n", type->bus->name); + printk(KERN_INFO PREFIX "ACPI bus type %s unregistered\n", + type->bus->name); return 0; } return -ENODEV; @@ -94,12 +96,12 @@ struct acpi_find_pci_root { static acpi_status do_root_bridge_busnr_callback(struct acpi_resource *resource, void *data) { - int *busnr = (int *)data; + unsigned long *busnr = (unsigned long *)data; struct acpi_resource_address64 address; - if (resource->id != ACPI_RSTYPE_ADDRESS16 && - resource->id != ACPI_RSTYPE_ADDRESS32 && - resource->id != ACPI_RSTYPE_ADDRESS64) + if (resource->type != ACPI_RSTYPE_ADDRESS16 && + resource->type != ACPI_RSTYPE_ADDRESS32 && + resource->type != ACPI_RSTYPE_ADDRESS64) return AE_OK; acpi_resource_to_address64(resource, &address); @@ -113,13 +115,13 @@ do_root_bridge_busnr_callback(struct acpi_resource *resource, void *data) static int get_root_bridge_busnr(acpi_handle handle) { acpi_status status; - int bus, bbn; + unsigned long bus, bbn; struct acpi_buffer buffer = { ACPI_ALLOCATE_BUFFER, NULL }; acpi_get_name(handle, ACPI_FULL_PATHNAME, &buffer); status = acpi_evaluate_integer(handle, METHOD_NAME__BBN, NULL, - (unsigned long *)&bbn); + &bbn); if (status == AE_NOT_FOUND) { /* Assume bus = 0 */ printk(KERN_INFO PREFIX @@ -151,7 +153,7 @@ static int get_root_bridge_busnr(acpi_handle handle) } exit: acpi_os_free(buffer.pointer); - return bbn; + return (int)bbn; } static acpi_status @@ -168,9 +170,6 @@ find_pci_rootbridge(acpi_handle handle, u32 lvl, void *context, void **rv) status = acpi_evaluate_integer(handle, METHOD_NAME__SEG, NULL, &seg); if (status == AE_NOT_FOUND) { /* Assume seg = 0 */ - printk(KERN_INFO PREFIX - "Assume root bridge [%s] segment is 0\n", - (char *)buffer.pointer); status = AE_OK; seg = 0; } @@ -204,6 +203,7 @@ acpi_handle acpi_get_pci_rootbridge_handle(unsigned int seg, unsigned int bus) acpi_get_devices(PCI_ROOT_HID_STRING, find_pci_rootbridge, &find, NULL); return find.handle; } +EXPORT_SYMBOL_GPL(acpi_get_pci_rootbridge_handle); /* Get device's handler per its address under its parent */ struct acpi_find_child {