summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoe Marcus Clarke <marcus@FreeBSD.org>2010-01-23 15:05:39 -0500
committerJoe Marcus Clarke <marcus@FreeBSD.org>2010-01-23 15:05:39 -0500
commit0065d6e2d15f1d3c6c46b8f23781508286b85b23 (patch)
tree1260287c6c79612854ca35bfdd3f1d1c2e9964d5
parent8f7a14e44b019b80a1e77fea7896fd8533011a1f (diff)
Fix the properties for USB interface devices
USB interfaces in hal should have usb.X for properties, compared to usb_device for the parent.
-rw-r--r--hald/freebsd/hf-usb2.c18
1 files changed, 1 insertions, 17 deletions
diff --git a/hald/freebsd/hf-usb2.c b/hald/freebsd/hf-usb2.c
index f1a02e20..301846f7 100644
--- a/hald/freebsd/hf-usb2.c
+++ b/hald/freebsd/hf-usb2.c
@@ -42,22 +42,6 @@
static struct libusb20_backend *hf_usb2_be = NULL;
static void
-hf_usb2_copy_parent (HalDevice *parent,
- const char *key,
- gpointer user_data)
-{
- HalDevice *device;
-
- g_return_if_fail(HAL_IS_DEVICE(parent));
- g_return_if_fail(HAL_IS_DEVICE(user_data));
-
- device = HAL_DEVICE(user_data);
-
- if (! strncmp(key, "usb_device.", strlen("usb_device.")))
- hal_device_copy_property(parent, key, device, key);
-}
-
-static void
hf_usb2_probe_interfaces(HalDevice *parent)
{
int num_interfaces;
@@ -79,9 +63,9 @@ hf_usb2_probe_interfaces(HalDevice *parent)
hal_device_property_set_string(device, "info.subsystem", "usb");
hal_device_property_set_int(device, "usb.interface.number", i);
- hal_device_property_foreach(parent, hf_usb2_copy_parent, device);
hal_device_copy_property(parent, "info.product", device, "info.product");
hal_device_copy_property(parent, "info.vendor", device, "info.vendor");
+ hal_device_merge_with_rewrite(device, parent, "usb.", "usb_device.");
if (hf_device_preprobe(device))
{