HAL on OLPC (removing acpi, apm and pmu)

Richard Hughes hughsient at gmail.com
Sun Dec 10 12:14:35 PST 2006


On Sun, 2006-12-10 at 20:48 +0100, Johannes Berg wrote:
> Wouldn't it make more sense to do a kernel-style ifdef where for
> example
> acpi_synthesize_hotplug_events is a static inline returning 0 in the
> non-ACPI case and similar? That'd get rid of at least all the ifdefs
> that are sprinkled in the code with this. 

This sounds much better than the way I've done this. Would the
Makefile.am just include the acpi.c file if HAVE_ACPI is defined and
unconditionally include acpi.h?

> Yes, it'll make the code slightly larger than this because the
> compares will still be compiled...

Will they? Surely a static inline function returning a single value will
be optimized out? Maybe I have more faith in GCC than I should. ;-)

Thanks for the quick feedback, I'll try doing the conditional
compilation the way you suggest and post a patch back to the list in a
couple of hours.

Disabling some of the probers at compile time is also on my TODO, as
something like the smbios stuff is never going work on the 770 or OLPC.

Richard.




More information about the hal mailing list