Port-i386 archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: New ACPI power resource code for testing



On Mon, 8 Mar 2010, Masao Uebayashi wrote:

Is it possible to call functions via function pointers put in the common
parent (acpi.c)?  acpi_power implements the "power" interface in the acpi
driver.  acpi_power_attach() just needs to assign the parent's pointer (to
array of power ops) with its implementation.

The problem I have with the currently-proposed code is that there is some initialization code in acpi_power that MUST be called, whether or not there are any consumer devices of the acpi_power service. This is required, even if there are no acpi_power "devices". Using function pointers would not help; you would still have to include the acpi_power code to resolve the pointers.

Personally I want to keep device tree structure to reflect its physical
representation naturally.  It'd be nice if acpi drivers follow an intuitive
rule which helps people *guess* ACPI's internal by its topology.

I suspect that this is probably an unattainable goal, from what little I understand about ACPI. :)


-------------------------------------------------------------------------
|   Paul Goyette   | PGP DSS Key fingerprint: |  E-mail addresses:      |
| Customer Service | FA29 0E3B 35AF E8AE 6651 |  paul at whooppee.com   |
| Network Engineer | 0786 F758 55DE 53BA 7731 | pgoyette at juniper.net |
| Kernel Developer |                          | pgoyette at netbsd.org  |
-------------------------------------------------------------------------


Home | Main Index | Thread Index | Old Index