summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoe Marcus Clarke <marcus@FreeBSD.org>2007-04-14 17:21:52 -0400
committerDavid Zeuthen <davidz@redhat.com>2007-04-16 15:41:39 -0400
commit639e6e5d3b048aa4b768b41dc3fc99f7c566384c (patch)
tree73d4603bd16282f53168586cd5e8b87e11fd26ca
parent00a651c28c552d207178e1b6be1dc2fef80b211d (diff)
fix compilation on FreeBSD
Fix issues with the FreeBSD backend using functions that were removed from HAL prior to the 0.5.9 release. This patch wouldn't be available without the help of Roy Marples. Submitted by: Doug Goldstein <cardoe@gentoo.org>
-rw-r--r--hald/freebsd/hf-pci.c13
-rw-r--r--hald/freebsd/hf-usb.c8
2 files changed, 15 insertions, 6 deletions
diff --git a/hald/freebsd/hf-pci.c b/hald/freebsd/hf-pci.c
index 400f1838..8709913e 100644
--- a/hald/freebsd/hf-pci.c
+++ b/hald/freebsd/hf-pci.c
@@ -38,6 +38,7 @@
#include "../hald.h"
#include "../ids.h"
+#include "../device.h"
#include "../logger.h"
#include "../util.h"
@@ -210,9 +211,15 @@ hf_pci_probe_bus (HalDevice *parent, int bus, bitstr_t *busmap)
info = g_new(DeviceInfo, 1);
info->device = hf_device_store_match(hald_get_gdl(),
- hal_property_new_int("pci.freebsd.bus", p->pc_sel.pc_bus),
- hal_property_new_int("pci.freebsd.device", p->pc_sel.pc_dev),
- hal_property_new_int("pci.freebsd.function", p->pc_sel.pc_func),
+ "pci.freebsd.bus",
+ HAL_PROPERTY_TYPE_INT32,
+ p->pc_sel.pc_bus,
+ "pci.freebsd.device",
+ HAL_PROPERTY_TYPE_INT32,
+ p->pc_sel.pc_dev,
+ "pci.freebsd.function",
+ HAL_PROPERTY_TYPE_INT32,
+ p->pc_sel.pc_func,
NULL);
info->p = *p;
info->secondary_bus = hf_pci_get_register(p, PCIR_SECBUS_1);
diff --git a/hald/freebsd/hf-usb.c b/hald/freebsd/hf-usb.c
index f7b2bf0e..b7991b53 100644
--- a/hald/freebsd/hf-usb.c
+++ b/hald/freebsd/hf-usb.c
@@ -372,11 +372,11 @@ hf_usb_device_new (HalDevice *parent,
can_wake_up = (config_desc.bmAttributes & UC_REMOTE_WAKEUP) != 0;
num_interfaces = config_desc.bNumInterface;
- if (config_desc->iConfiguration != 0)
+ if (config_desc.iConfiguration != 0)
{
char *configuration;
- configuration = hf_usb_get_string_descriptor(controller->fd, di->udi_addr, config_desc->iConfiguration, NULL);
+ configuration = hf_usb_get_string_descriptor(controller->fd, di->udi_addr, config_desc.iConfiguration, NULL);
if (configuration)
{
hal_device_property_set_string(device, "usb_device.configuration", configuration);
@@ -424,6 +424,8 @@ hf_usb_device_new (HalDevice *parent,
static HalDevice *
hf_usb_interface_device_new (HalDevice *parent,
+ Controller *controller,
+ const struct usb_device_info *di,
const usb_interface_descriptor_t *desc)
{
HalDevice *device;
@@ -576,7 +578,7 @@ hf_usb_probe_device (HalDevice *parent,
break;
}
- if_device = hf_usb_interface_device_new(device, if_desc);
+ if_device = hf_usb_interface_device_new(device, controller, device_info, if_desc);
hf_device_preprobe_and_add(if_device);
p += USB_INTERFACE_DESCRIPTOR_SIZE + if_desc->bNumEndpoints * USB_ENDPOINT_DESCRIPTOR_SIZE;