hal: Branch 'master'

Danny Kukawka dkukawka at kemper.freedesktop.org
Fri Nov 23 14:14:13 PST 2007


 hald/linux/device.c |   18 ++++++++++++------
 1 file changed, 12 insertions(+), 6 deletions(-)

New commits:
commit 6aa022d4e38302056beeafbd67a6af433822a9bc
Author: Danny Kukawka <danny.kukawka at web.de>
Date:   Fri Nov 23 23:13:49 2007 +0100

    cleanup device.c
    
    Added some comment lines between subsystem code sections. Moved some
    functions of subsystems together.

diff --git a/hald/linux/device.c b/hald/linux/device.c
index a03be12..8cc12ef 100644
--- a/hald/linux/device.c
+++ b/hald/linux/device.c
@@ -992,6 +992,8 @@ dvb_compute_udi (HalDevice *d)
 	return TRUE;
 }
 
+/*--------------------------------------------------------------------------------------------------------------*/
+
 static void
 asound_card_id_set (int cardnum, HalDevice *d, const char *propertyname)
 {
@@ -1011,8 +1013,6 @@ asound_card_id_set (int cardnum, HalDevice *d, const char *propertyname)
 	}
 }
 
-/*--------------------------------------------------------------------------------------------------------------*/
-
 static HalDevice *
 sound_add (const gchar *sysfs_path, const gchar *device_file, HalDevice *parent_dev, const gchar *parent_path)
 {
@@ -1513,6 +1513,8 @@ mmc_host_compute_udi (HalDevice *d)
 	return TRUE;
 }
 
+/*--------------------------------------------------------------------------------------------------------------*/
+
 static HalDevice *
 pci_add (const gchar *sysfs_path, const gchar *device_file, HalDevice *parent_dev, const gchar *parent_path)
 {
@@ -2930,6 +2932,8 @@ iucv_compute_udi (HalDevice *d)
 
 }
 
+/*--------------------------------------------------------------------------------------------------------------*/
+
 static HalDevice *
 backlight_add (const gchar *sysfs_path, const gchar *device_file, HalDevice *physdev,
 	       const gchar *sysfs_path_in_devices)
@@ -2951,7 +2955,7 @@ backlight_add (const gchar *sysfs_path, const gchar *device_file, HalDevice *phy
 }
 
 static gboolean
-power_supply_compute_udi (HalDevice *d)
+backlight_compute_udi (HalDevice *d)
 {
 	gchar udi[256];
 	const char *dir;
@@ -2961,13 +2965,15 @@ power_supply_compute_udi (HalDevice *d)
 
 	name = hal_util_get_last_element(dir);
 	hal_util_compute_udi (hald_get_gdl (), udi, sizeof (udi),
-			      "%s_power_supply",
+			      "%s_backlight",
 			      hal_device_property_get_string (d, "info.parent"));
 	hal_device_set_udi (d, udi);
 	hal_device_property_set_string (d, "info.udi", udi);
 	return TRUE;
 }
 
+/*--------------------------------------------------------------------------------------------------------------*/
+
 static void
 refresh_ac_adapter (HalDevice *d)
 {
@@ -3271,7 +3277,7 @@ finish:
 }
 
 static gboolean
-backlight_compute_udi (HalDevice *d)
+power_supply_compute_udi (HalDevice *d)
 {
 	gchar udi[256];
 	const char *dir;
@@ -3281,7 +3287,7 @@ backlight_compute_udi (HalDevice *d)
 
 	name = hal_util_get_last_element(dir);
 	hal_util_compute_udi (hald_get_gdl (), udi, sizeof (udi),
-			      "%s_backlight",
+			      "%s_power_supply",
 			      hal_device_property_get_string (d, "info.parent"));
 	hal_device_set_udi (d, udi);
 	hal_device_property_set_string (d, "info.udi", udi);


More information about the hal-commit mailing list