lkml.org 
[lkml]   [2006]   [Feb]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [patch] pci hotplug: add common acpi functions to core
On Tue, Feb 28, 2006 at 04:46:57PM -0800, Kristen Accardi wrote:
> shpchprm_acpi.c and pciehprm_acpi.c are nearly identical.
> In addition, there are functions in both these files that
> are also in acpiphp_glue.c. This patch will remove duplicate
> functions from shpchp, pciehp, and acpiphp and move this
> functionality to pci_hotplug, as it is not hardware specific.
> Get rid of shpchprm* and pciehprm* files since they are no longer needed.
> shpchprm_nonacpi.c and pciehprm_nonacpi.c are identical, as well
> as shpchprm_legacy.c and can be replaced with a macro.

Looks good, only a minor comment:

> +u8 * acpi_path_name( acpi_handle handle)

Funky spacing here.

> +int is_root_bridge(acpi_handle handle)
> +{
> + acpi_status status;
> + struct acpi_device_info *info;
> + struct acpi_buffer buffer = {ACPI_ALLOCATE_BUFFER, NULL};
> + int i;
> +
> + status = acpi_get_object_info(handle, &buffer);
> + if (ACPI_SUCCESS(status)) {
> + info = buffer.pointer;
> + if ((info->valid & ACPI_VALID_HID) &&
> + !strcmp(PCI_ROOT_HID_STRING,
> + info->hardware_id.value)) {
> + acpi_os_free(buffer.pointer);
> + return 1;
> + }
> + if (info->valid & ACPI_VALID_CID) {
> + for (i=0; i < info->compatibility_id.count; i++) {
> + if (!strcmp(PCI_ROOT_HID_STRING,
> + info->compatibility_id.id[i].value)) {
> + acpi_os_free(buffer.pointer);
> + return 1;
> + }
> + }
> + }
> + }
> + return 0;
> +}
> +EXPORT_SYMBOL_GPL(is_root_bridge);

The name "is_root_bridge" is pretty generic. Especially as it wants an
acpi handle. "acpi_is_root_bridge" perhaps?

thanks,

greg k-h
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2006-03-01 01:55    [W:0.069 / U:0.304 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site