hal: Branch 'master' - 2 commits

Danny Kukawka dkukawka at kemper.freedesktop.org
Thu Oct 2 07:42:24 PDT 2008


 doc/spec/hal-spec-properties.xml |   11 +++++++++++
 hald/linux/device.c              |    7 ++++---
 2 files changed, 15 insertions(+), 3 deletions(-)

New commits:
commit 75a3a389347e3604b243fe982356c89911faf256
Author: Danny Kukawka <danny.kukawka at web.de>
Date:   Thu Oct 2 16:40:47 2008 +0200

    add battery.quirk.do_not_poll to spec
    
    Added battery.quirk.do_not_poll to the spec.

diff --git a/doc/spec/hal-spec-properties.xml b/doc/spec/hal-spec-properties.xml
index f5faa59..c62656e 100644
--- a/doc/spec/hal-spec-properties.xml
+++ b/doc/spec/hal-spec-properties.xml
@@ -6995,6 +6995,17 @@ org.freedesktop.Hal.Device.Volume.method_signatures = {'ssas', 'as', 'as'}
                 it will be different for two (otherwise) identical batteries.
               </entry>
             </row>
+            <row>
+              <entry>
+                <literal>battery.quirk.do_not_poll</literal> (bool)
+              </entry>
+              <entry></entry>
+              <entry>No</entry>
+              <entry>
+		True if HAL should not poll the battery, False or not available at all
+		if HAL should show the default behavior.
+              </entry>
+            </row>
           </tbody>
         </tgroup>
       </informaltable>
commit 0ce63a75f1a61de51cbed62606969bf504c57177
Author: Danny Kukawka <danny.kukawka at web.de>
Date:   Thu Oct 2 16:37:35 2008 +0200

    remove unneeded variable from commit 702351eaea4
    
    Removed unneeded variable from commit 702351eaea4.

diff --git a/hald/linux/device.c b/hald/linux/device.c
index 5bf7896..89d0cdd 100644
--- a/hald/linux/device.c
+++ b/hald/linux/device.c
@@ -3392,12 +3392,11 @@ power_supply_battery_poll (gpointer data) {
 	if (battery_devices) {
 		for (i = battery_devices; i != NULL; i = g_slist_next (i)) {
 			const char *subsys;
-			gboolean need_poll;
 
 			d = HAL_DEVICE (i->data);
+
 			/* don't poll batteries if quirk is in place */
-			need_poll = !hal_device_property_get_bool (d, "battery.quirk.do_not_poll");
-			if (!need_poll)
+			if (hal_device_property_get_bool (d, "battery.quirk.do_not_poll"))
 				continue;
 
 			subsys = hal_device_property_get_string (d, "info.subsystem");
@@ -3410,7 +3409,9 @@ power_supply_battery_poll (gpointer data) {
 			}
 		}		
 	}
+
 	g_slist_free (battery_devices);
+
 	battery_poll_running = battery_polled;
 	return battery_polled;
 }


More information about the hal-commit mailing list