Index: uspace/drv/infrastructure/rootamdm37x/rootamdm37x.c
===================================================================
--- uspace/drv/infrastructure/rootamdm37x/rootamdm37x.c	(revision 878b76421f16ceac6db15aa7063cece434107fbd)
+++ uspace/drv/infrastructure/rootamdm37x/rootamdm37x.c	(revision bebf97d3755a1ed2e30dabc28d9f3070933d5cee)
@@ -35,5 +35,4 @@
 /** @file
  */
-#define _DDF_DATA_IMPLANT
 
 #define DEBUG_CM 0
@@ -52,4 +51,5 @@
 } rootamdm37x_fun_t;
 
+/* See amdm37x TRM page. 3316 for these values */
 #define OHCI_BASE_ADDRESS  0x48064400
 #define OHCI_SIZE  1024
@@ -60,5 +60,4 @@
 	{
 		.type = MEM_RANGE,
-		/* See amdm37x TRM page. 3316 for these values */
 		.res.io_range = {
 			.address = OHCI_BASE_ADDRESS,
@@ -71,11 +70,4 @@
 		.res.interrupt = { .irq = 76 },
 	},
-};
-
-static const rootamdm37x_fun_t ohci = {
-	.hw_resources = {
-	    .resources = ohci_res,
-	    .count = sizeof(ohci_res)/sizeof(ohci_res[0]),
-	}
 };
 
@@ -96,4 +88,11 @@
 };
 
+static const rootamdm37x_fun_t ohci = {
+	.hw_resources = {
+	    .resources = ohci_res,
+	    .count = sizeof(ohci_res)/sizeof(ohci_res[0]),
+	}
+};
+
 static const rootamdm37x_fun_t ehci = {
 	.hw_resources = {
@@ -111,6 +110,5 @@
 };
 
-static ddf_dev_ops_t rootamdm37x_fun_ops =
-{
+static ddf_dev_ops_t rootamdm37x_fun_ops = {
 	.interfaces[HW_RES_DEV_IFACE] = &fun_hw_res_ops
 };
@@ -126,5 +124,4 @@
 		return ENOMEM;
 	
-	
 	/* Add match id */
 	int ret = ddf_fun_add_match_id(fnode, str_match_id, 100);
@@ -134,6 +131,14 @@
 	}
 	
+	/* Alloc needed data */
+	rootamdm37x_fun_t *rf =
+	    ddf_fun_data_alloc(fnode, sizeof(rootamdm37x_fun_t));
+	if (!rf) {
+		ddf_fun_destroy(fnode);
+		return ENOMEM;
+	}
+	*rf = *fun;
+
 	/* Set provided operations to the device. */
-	ddf_fun_data_implant(fnode, (void*)fun);
 	ddf_fun_set_ops(fnode, &rootamdm37x_fun_ops);
 	
@@ -142,5 +147,4 @@
 	if (ret != EOK) {
 		ddf_msg(LVL_ERROR, "Failed binding function %s.", name);
-		// TODO This will try to free our data!
 		ddf_fun_destroy(fnode);
 		return ret;
