Contents of /trunk/hal/patches/hal-0.5.10-cleanup-device.c.patch
Parent Directory | Revision Log
Revision 597 -
(show annotations)
(download)
Mon May 19 19:05:19 2008 UTC (16 years, 4 months ago) by niro
File size: 3178 byte(s)
Mon May 19 19:05:19 2008 UTC (16 years, 4 months ago) by niro
File size: 3178 byte(s)
-gentoo patches
1 | From 6879b50d288d124dfd82691ed0e76a033a39d154 Mon Sep 17 00:00:00 2001 |
2 | From: Danny Kukawka <danny.kukawka@web.de> |
3 | Date: Fri, 23 Nov 2007 23:13:49 +0100 |
4 | Subject: [PATCH] cleanup device.c |
5 | |
6 | Added some comment lines between subsystem code sections. Moved some |
7 | functions of subsystems together. |
8 | --- |
9 | hald/linux/device.c | 18 ++++++++++++------ |
10 | 1 files changed, 12 insertions(+), 6 deletions(-) |
11 | |
12 | diff --git a/hald/linux/device.c b/hald/linux/device.c |
13 | index a03be12..8cc12ef 100644 |
14 | --- a/hald/linux/device.c |
15 | +++ b/hald/linux/device.c |
16 | @@ -992,6 +992,8 @@ dvb_compute_udi (HalDevice *d) |
17 | return TRUE; |
18 | } |
19 | |
20 | +/*--------------------------------------------------------------------------------------------------------------*/ |
21 | + |
22 | static void |
23 | asound_card_id_set (int cardnum, HalDevice *d, const char *propertyname) |
24 | { |
25 | @@ -1011,8 +1013,6 @@ asound_card_id_set (int cardnum, HalDevice *d, const char *propertyname) |
26 | } |
27 | } |
28 | |
29 | -/*--------------------------------------------------------------------------------------------------------------*/ |
30 | - |
31 | static HalDevice * |
32 | sound_add (const gchar *sysfs_path, const gchar *device_file, HalDevice *parent_dev, const gchar *parent_path) |
33 | { |
34 | @@ -1513,6 +1513,8 @@ mmc_host_compute_udi (HalDevice *d) |
35 | return TRUE; |
36 | } |
37 | |
38 | +/*--------------------------------------------------------------------------------------------------------------*/ |
39 | + |
40 | static HalDevice * |
41 | pci_add (const gchar *sysfs_path, const gchar *device_file, HalDevice *parent_dev, const gchar *parent_path) |
42 | { |
43 | @@ -2930,6 +2932,8 @@ iucv_compute_udi (HalDevice *d) |
44 | |
45 | } |
46 | |
47 | +/*--------------------------------------------------------------------------------------------------------------*/ |
48 | + |
49 | static HalDevice * |
50 | backlight_add (const gchar *sysfs_path, const gchar *device_file, HalDevice *physdev, |
51 | const gchar *sysfs_path_in_devices) |
52 | @@ -2951,7 +2955,7 @@ backlight_add (const gchar *sysfs_path, const gchar *device_file, HalDevice *phy |
53 | } |
54 | |
55 | static gboolean |
56 | -power_supply_compute_udi (HalDevice *d) |
57 | +backlight_compute_udi (HalDevice *d) |
58 | { |
59 | gchar udi[256]; |
60 | const char *dir; |
61 | @@ -2961,13 +2965,15 @@ power_supply_compute_udi (HalDevice *d) |
62 | |
63 | name = hal_util_get_last_element(dir); |
64 | hal_util_compute_udi (hald_get_gdl (), udi, sizeof (udi), |
65 | - "%s_power_supply", |
66 | + "%s_backlight", |
67 | hal_device_property_get_string (d, "info.parent")); |
68 | hal_device_set_udi (d, udi); |
69 | hal_device_property_set_string (d, "info.udi", udi); |
70 | return TRUE; |
71 | } |
72 | |
73 | +/*--------------------------------------------------------------------------------------------------------------*/ |
74 | + |
75 | static void |
76 | refresh_ac_adapter (HalDevice *d) |
77 | { |
78 | @@ -3271,7 +3277,7 @@ finish: |
79 | } |
80 | |
81 | static gboolean |
82 | -backlight_compute_udi (HalDevice *d) |
83 | +power_supply_compute_udi (HalDevice *d) |
84 | { |
85 | gchar udi[256]; |
86 | const char *dir; |
87 | @@ -3281,7 +3287,7 @@ backlight_compute_udi (HalDevice *d) |
88 | |
89 | name = hal_util_get_last_element(dir); |
90 | hal_util_compute_udi (hald_get_gdl (), udi, sizeof (udi), |
91 | - "%s_backlight", |
92 | + "%s_power_supply", |
93 | hal_device_property_get_string (d, "info.parent")); |
94 | hal_device_set_udi (d, udi); |
95 | hal_device_property_set_string (d, "info.udi", udi); |
96 | -- |
97 | 1.5.3.7 |
98 |