Index: uspace/drv/usbhid/mouse/mousedev.c
===================================================================
--- uspace/drv/usbhid/mouse/mousedev.c	(revision 30710035642aabd1cc1e4d0730571b41dd5d20be)
+++ uspace/drv/usbhid/mouse/mousedev.c	(revision 3facf63aa9f232dd359035931c7ad2b9a4934e03)
@@ -300,4 +300,46 @@
 /*----------------------------------------------------------------------------*/
 
+static int usb_mouse_create_function(usb_hid_dev_t *hid_dev)
+{
+	/* Create the function exposed under /dev/devices. */
+	usb_log_debug("Creating DDF function %s...\n", HID_MOUSE_FUN_NAME);
+	ddf_fun_t *fun = ddf_fun_create(hid_dev->usb_dev->ddf_dev, fun_exposed, 
+	    HID_MOUSE_FUN_NAME);
+	if (fun == NULL) {
+		usb_log_error("Could not create DDF function node.\n");
+		return ENOMEM;
+	}
+	
+	/*
+	 * Store the initialized HID device and HID ops
+	 * to the DDF function.
+	 */
+	fun->ops = &hid_dev->ops;
+	fun->driver_data = hid_dev;   // TODO: maybe change to hid_dev->data
+
+	int rc = ddf_fun_bind(fun);
+	if (rc != EOK) {
+		usb_log_error("Could not bind DDF function: %s.\n",
+		    str_error(rc));
+		ddf_fun_destroy(fun);
+		return rc;
+	}
+	
+	usb_log_debug("Adding DDF function to class %s...\n", 
+	    HID_MOUSE_CLASS_NAME);
+	rc = ddf_fun_add_to_class(fun, HID_MOUSE_CLASS_NAME);
+	if (rc != EOK) {
+		usb_log_error(
+		    "Could not add DDF function to class %s: %s.\n",
+		    HID_MOUSE_CLASS_NAME, str_error(rc));
+		ddf_fun_destroy(fun);
+		return rc;
+	}
+	
+	return EOK;
+}
+
+/*----------------------------------------------------------------------------*/
+
 int usb_mouse_init(usb_hid_dev_t *hid_dev)
 {
@@ -317,16 +359,4 @@
 	}
 	
-//	usb_hid_report_path_t *path = usb_hid_report_path();
-//	usb_hid_report_path_append_item(path, USB_HIDUT_PAGE_BUTTON, 0);
-	
-//	usb_hid_report_path_set_report_id(path, 0);
-	
-//	mouse_dev->button_count = usb_hid_report_input_length(
-//	    hid_dev->report, path, 
-//	    USB_HID_PATH_COMPARE_END | USB_HID_PATH_COMPARE_USAGE_PAGE_ONLY);
-//	usb_hid_report_path_free(path);
-	
-//	usb_log_debug("Size of the input report: %zu\n", kbd_dev->key_count);
-	
 	mouse_dev->buttons = (int32_t *)calloc(USB_MOUSE_BUTTON_COUNT, 
 	    sizeof(int32_t));
@@ -348,4 +378,10 @@
 //	    hid_dev->usb_dev->interface_no, IDLE_RATE);
 	
+	int rc = usb_mouse_create_function(hid_dev);
+	if (rc != EOK) {
+		usb_mouse_free(&mouse_dev);
+		return rc;
+	}
+	
 	return EOK;
 }
