hal: Branch 'master'

David Zeuthen david at kemper.freedesktop.org
Sun Mar 25 21:31:34 PDT 2007


 hald/linux/device.c |    9 ++++-----
 1 files changed, 4 insertions(+), 5 deletions(-)

New commits:
diff-tree e10554d1c15eb1e6513d8199d8433fc9574d8351 (from da4a25449f973b065fbb3b390b913829c28d263c)
Author: David Zeuthen <davidz at redhat.com>
Date:   Mon Mar 26 00:22:34 2007 -0400

    try usbclass handler before usb and try all handlers until we find something
    
    This solves the problem of not detecting hiddev and lp usb "class"
    devices. Why on earth the Linux kernel classifies these as belonging
    to the "usb" subsystem is beyond me; other USB drivers
    e.g. snd-usb-audio and the "Phillips webcam" driver (sic!) from the
    pwc module don't set the subsystem to "usb".... Well, enough ranting.

diff --git a/hald/linux/device.c b/hald/linux/device.c
index fe05fe9..a8af37e 100644
--- a/hald/linux/device.c
+++ b/hald/linux/device.c
@@ -3323,6 +3323,7 @@ static DevHandler dev_handler_pseudo = {
 
 static DevHandler *dev_handlers[] = {
 	&dev_handler_pci,
+	&dev_handler_usbclass,
 	&dev_handler_usb,
 	&dev_handler_ide,
 	&dev_handler_pnp,
@@ -3342,7 +3343,6 @@ static DevHandler *dev_handlers[] = {
 	&dev_handler_net,
 	&dev_handler_scsi_generic,
 	&dev_handler_scsi_host,
-	&dev_handler_usbclass,
 	&dev_handler_usbraw,
 	&dev_handler_video4linux,
 	&dev_handler_dvb,
@@ -3523,15 +3523,14 @@ hotplug_event_begin_add_dev (const gchar
 			HalDevice *d;
 
 			if (strcmp (subsystem, "scsi") == 0)
-				if (missing_scsi_host(sysfs_path, (HotplugEvent *)end_token, HOTPLUG_ACTION_ADD))
+				if (missing_scsi_host (sysfs_path, (HotplugEvent *)end_token, HOTPLUG_ACTION_ADD))
 					goto out;
 
 			/* attempt to add the device */
 			d = handler->add (sysfs_path, device_file, parent_dev, parent_path);
 			if (d == NULL) {
-				/* didn't find anything - thus, ignore this hotplug event */
-				hotplug_event_end (end_token);
-				goto out;
+				/* didn't match - there may be a later handler for the device though */
+				continue;
 			}
 
 			hal_device_property_set_int (d, "linux.hotplug_type", HOTPLUG_EVENT_SYSFS_DEVICE);


More information about the hal-commit mailing list