Adding SetLCDBrightness and GetLCDBrightess for PMU users, and other fixes

Richard Hughes hughsient at gmail.com
Tue Nov 1 06:56:36 PST 2005


>From ChangeLog:

* hald/linux2/apm.c,
* hald/linux2/pmu.c: Goto-ectomy.

* hald/linux2/pmu.c: Create a convenience function 
pmu_synthesize_item () (just like the acpi version) which removes a lot
of the copy/paste hotplug stuff.
Also add the function laptop_panel_refresh () which is the initial
loader support for laptop_panel. I'll write the actual get/set bit soon.
Powerbook users should be able to do GetLCDBrightness and
SetLCDbrightness method calls soon.

* hald/device_store.{c|h}: add hal_device_store_find_both () which
returns a HalDevice from the gdl, and if not found, uses the tdl. This
allows us to make lots of code more readable and will be optimised out
by the compiler. This probably can be used in *lots* of places in the
HAL code.

* hald/linux2/acpi.c,
* hald/linux2/apm.c,
* hald/linux2/pmu.c: Use hal_device_store_find_both as opposed to
a complicated four line if conditional.

>From diffstat:
 ChangeLog           |   24 +++++++
 hald/device_store.c |   11 +++
 hald/device_store.h |    1
 hald/linux2/acpi.c  |    8 +-
 hald/linux2/apm.c   |   59 +++++------------
 hald/linux2/pmu.c   |  174
+++++++++++++++++++++++++++++-----------------------
 6 files changed, 158 insertions(+), 119 deletions(-)

Can somebody test this on a powerbook / ibook please and check I've not
broken anything. It should all be okay as it's pretty standard stuff.

Richard.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: hal-diff-2005-11-01-14-48-21.patch
Type: text/x-patch
Size: 17976 bytes
Desc: not available
Url : http://lists.freedesktop.org/archives/hal/attachments/20051101/856163e1/hal-diff-2005-11-01-14-48-21-0001.bin


More information about the hal mailing list