summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDanny Kukawka <danny.kukawka@web.de>2007-11-23 23:13:49 +0100
committerDanny Kukawka <danny.kukawka@web.de>2007-11-23 23:13:49 +0100
commit6aa022d4e38302056beeafbd67a6af433822a9bc (patch)
treeb6d31b20cd120d86d89de142285a997d04a872f6
parent1f2b6056107295031c3a425bc0aac76d11e56bea (diff)
cleanup device.c
Added some comment lines between subsystem code sections. Moved some functions of subsystems together.
-rw-r--r--hald/linux/device.c18
1 files changed, 12 insertions, 6 deletions
diff --git a/hald/linux/device.c b/hald/linux/device.c
index a03be127..8cc12efa 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);