Index: uspace/srv/devman/devman.c
===================================================================
--- uspace/srv/devman/devman.c	(revision bbe78485cd8633d7413573caf386c2dc4d185762)
+++ uspace/srv/devman/devman.c	(revision 1f43c8f679fd7fa7cca8cbe2f2a91810db9ada84)
@@ -651,6 +651,12 @@
 	
 	/* Send the device to the driver. */
-	aid_t req = async_send_1(phone, DRIVER_ADD_DEVICE, node->handle,
-	    &answer);
+	devman_handle_t parent_handle;
+	if (node->parent) {
+		parent_handle = node->parent->handle;
+	} else {
+		parent_handle = 0;
+	}
+	aid_t req = async_send_2(phone, DRIVER_ADD_DEVICE, node->handle,
+	    parent_handle, &answer);
 	
 	/* Send the device's name to the driver. */
Index: uspace/srv/devman/match.c
===================================================================
--- uspace/srv/devman/match.c	(revision bbe78485cd8633d7413573caf386c2dc4d185762)
+++ uspace/srv/devman/match.c	(revision 1f43c8f679fd7fa7cca8cbe2f2a91810db9ada84)
@@ -35,4 +35,26 @@
 #include "devman.h"
 
+/** Compute compound score of driver and device.
+ *
+ * @param driver Match id of the driver.
+ * @param device Match id of the device.
+ * @return Compound score.
+ * @retval 0 No match at all.
+ */
+static int compute_match_score(match_id_t *driver, match_id_t *device)
+{
+	if (str_cmp(driver->id, device->id) == 0) {
+		/*
+		 * The strings matches, return their score multiplied.
+		 */
+		return driver->score * device->score;
+	} else {
+		/*
+		 * Different strings, return zero.
+		 */
+		return 0;
+	}
+}
+
 int get_match_score(driver_t *drv, node_t *dev)
 {
@@ -44,27 +66,27 @@
 	
 	/*
-	 * Find first matching pair.
+	 * Go through all pairs, return the highest score obtainetd.
 	 */
+	int highest_score = 0;
+	
 	link_t *drv_link = drv->match_ids.ids.next;
 	while (drv_link != drv_head) {
-		link_t *dev_link = dev->match_ids.ids.next;
+		link_t *dev_link = dev_head->next;
 		while (dev_link != dev_head) {
 			match_id_t *drv_id = list_get_instance(drv_link, match_id_t, link);
 			match_id_t *dev_id = list_get_instance(dev_link, match_id_t, link);
-
-			if (str_cmp(drv_id->id, dev_id->id) == 0) {
-				/*
-				 * We found a match.
-				 * Return the score of the match.
-				 */
-				return drv_id->score * dev_id->score;
+			
+			int score = compute_match_score(drv_id, dev_id);
+			if (score > highest_score) {
+				highest_score = score;
 			}
 
 			dev_link = dev_link->next;
 		}
+		
 		drv_link = drv_link->next;
 	}
 	
-	return 0;
+	return highest_score;
 }
 
