Index: uspace/drv/pciintel/pci.c
===================================================================
--- uspace/drv/pciintel/pci.c	(revision af6b515772b7e673b3f80cc8621a65997fed0821)
+++ uspace/drv/pciintel/pci.c	(revision fc51296af4f45da426f5626f3573adee6b0babda)
@@ -48,4 +48,5 @@
 
 #include <ddf/driver.h>
+#include <ddf/log.h>
 #include <devman.h>
 #include <ipc/devman.h>
@@ -225,5 +226,5 @@
 
 	if (match_id_str == NULL) {
-		printf(NAME ": out of memory creating match ID.\n");
+		ddf_msg(LVL_ERROR, "Out of memory creating match ID.\n");
 		return;
 	}
@@ -231,5 +232,5 @@
 	rc = ddf_fun_add_match_id(fun->fnode, match_id_str, 90);
 	if (rc != EOK) {
-		printf(NAME ": error adding match ID: %s\n",
+		ddf_msg(LVL_ERROR, "Failed adding match ID: %s\n",
 		    str_error(rc));
 	}
@@ -323,7 +324,7 @@
 	
 	if (range_addr != 0) {
-		printf(NAME ": function %s : ", fun->fnode->name);
-		printf("address = %" PRIx64, range_addr);
-		printf(", size = %x\n", (unsigned int) range_size);
+		ddf_msg(LVL_DEBUG, "Function %s : address = %" PRIx64
+		    ", size = %x\n", fun->fnode->name, range_addr,
+		    (unsigned int) range_size);
 	}
 	
@@ -350,5 +351,5 @@
 	hw_res_list->count++;
 	
-	printf(NAME ": function %s uses irq %x.\n", fun->fnode->name, irq);
+	ddf_msg(LVL_NOTE, "Function %s uses irq %x.\n", fun->fnode->name, irq);
 }
 
@@ -406,5 +407,5 @@
 			char *fun_name = pci_fun_create_name(fun);
 			if (fun_name == NULL) {
-				printf(NAME ": out of memory.\n");
+				ddf_msg(LVL_ERROR, "Out of memory.\n");
 				return;
 			}
@@ -412,5 +413,5 @@
 			fnode = ddf_fun_create(bus->dnode, fun_inner, fun_name);
 			if (fnode == NULL) {
-				printf(NAME ": error creating function.\n");
+				ddf_msg(LVL_ERROR, "Failed creating function.\n");
 				return;
 			}
@@ -426,5 +427,5 @@
 			fnode->driver_data = fun;
 			
-			printf(NAME ": adding new function %s.\n",
+			ddf_msg(LVL_DEBUG, "Adding new function %s.\n",
 			    fnode->name);
 			
@@ -443,6 +444,7 @@
 				child_bus = pci_conf_read_8(fun,
 				    PCI_BRIDGE_SEC_BUS_NUM);
-				printf(NAME ": device is pci-to-pci bridge, "
-				    "secondary bus number = %d.\n", bus_num);
+				ddf_msg(LVL_DEBUG, "Device is pci-to-pci "
+				    "bridge, secondary bus number = %d.\n",
+				    bus_num);
 				if (child_bus > bus_num)
 					pci_bus_scan(bus, child_bus);
@@ -466,10 +468,10 @@
 	int rc;
 	
-	printf(NAME ": pci_add_device\n");
+	ddf_msg(LVL_DEBUG, "pci_add_device\n");
 	dnode->parent_phone = -1;
 	
 	bus = pci_bus_new();
 	if (bus == NULL) {
-		printf(NAME ": pci_add_device allocation failed.\n");
+		ddf_msg(LVL_ERROR, "pci_add_device allocation failed.\n");
 		rc = ENOMEM;
 		goto fail;
@@ -481,5 +483,5 @@
 	    IPC_FLAG_BLOCKING);
 	if (dnode->parent_phone < 0) {
-		printf(NAME ": pci_add_device failed to connect to the "
+		ddf_msg(LVL_ERROR, "pci_add_device failed to connect to the "
 		    "parent's driver.\n");
 		rc = dnode->parent_phone;
@@ -491,11 +493,11 @@
 	rc = hw_res_get_resource_list(dnode->parent_phone, &hw_resources);
 	if (rc != EOK) {
-		printf(NAME ": pci_add_device failed to get hw resources for "
-		    "the device.\n");
+		ddf_msg(LVL_ERROR, "pci_add_device failed to get hw resources "
+		    "for the device.\n");
 		goto fail;
 	}
 	got_res = true;
 	
-	printf(NAME ": conf_addr = %" PRIx64 ".\n",
+	ddf_msg(LVL_DEBUG, "conf_addr = %" PRIx64 ".\n",
 	    hw_resources.resources[0].res.io_range.address);
 	
@@ -509,5 +511,5 @@
 	if (pio_enable((void *)(uintptr_t)bus->conf_io_addr, 8,
 	    &bus->conf_addr_port)) {
-		printf(NAME ": failed to enable configuration ports.\n");
+		ddf_msg(LVL_ERROR, "Failed to enable configuration ports.\n");
 		rc = EADDRNOTAVAIL;
 		goto fail;
@@ -516,5 +518,5 @@
 	
 	/* Make the bus device more visible. It has no use yet. */
-	printf(NAME ": adding a 'ctl' function\n");
+	ddf_msg(LVL_DEBUG, "Adding a 'ctl' function\n");
 	
 	ctl = ddf_fun_create(bus->dnode, fun_exposed, "ctl");
@@ -532,5 +534,5 @@
 	
 	/* Enumerate functions. */
-	printf(NAME ": scanning the bus\n");
+	ddf_msg(LVL_DEBUG, "Scanning the bus\n");
 	pci_bus_scan(bus, 0);
 	
@@ -554,4 +556,5 @@
 static void pciintel_init(void)
 {
+	ddf_log_init(NAME, LVL_ERROR);
 	pci_fun_ops.interfaces[HW_RES_DEV_IFACE] = &pciintel_hw_res_ops;
 }
