Index: uspace/drv/rootia32/rootia32.c
===================================================================
--- uspace/drv/rootia32/rootia32.c	(revision 529141135f2569e25faeba3127b9dd9188cd696b)
+++ uspace/drv/rootia32/rootia32.c	(revision b9ccc46d4c76db6911d8be59c4810b77b388faab)
@@ -56,5 +56,5 @@
 
 typedef struct rootia32_child_dev_data {
-	hw_resource_list_t hw_resources;	
+	hw_resource_list_t hw_resources;
 } rootia32_child_dev_data_t;
 
@@ -62,12 +62,10 @@
 static void root_ia32_init(void);
 
-/** The root device driver's standard operations.
- */
+/** The root device driver's standard operations. */
 static driver_ops_t rootia32_ops = {
 	.add_device = &rootia32_add_device
 };
 
-/** The root device driver structure. 
- */
+/** The root device driver structure. */
 static driver_t rootia32_driver = {
 	.name = NAME,
@@ -80,27 +78,29 @@
 		.address = 0xCF8,
 		.size = 8,
-		.endianness = LITTLE_ENDIAN	
-	}	
+		.endianness = LITTLE_ENDIAN
+	}
 };
 
 static rootia32_child_dev_data_t pci_data = {
 	.hw_resources = {
-		1, 
+		1,
 		&pci_conf_regs
 	}
 };
 
-static hw_resource_list_t * rootia32_get_child_resources(device_t *dev)
-{
-	rootia32_child_dev_data_t *data = (rootia32_child_dev_data_t *)dev->driver_data;
-	if (NULL == data) {
+static hw_resource_list_t *rootia32_get_child_resources(device_t *dev)
+{
+	rootia32_child_dev_data_t *data;
+	
+	data = (rootia32_child_dev_data_t *) dev->driver_data;
+	if (NULL == data)
 		return NULL;
-	}
+	
 	return &data->hw_resources;
 }
 
-static bool rootia32_enable_child_interrupt(device_t *dev) 
-{
-	// TODO
+static bool rootia32_enable_child_interrupt(device_t *dev)
+{
+	/* TODO */
 	
 	return false;
@@ -109,61 +109,60 @@
 static resource_iface_t child_res_iface = {
 	&rootia32_get_child_resources,
-	&rootia32_enable_child_interrupt	
-};
-
-// initialized in root_ia32_init() function
+	&rootia32_enable_child_interrupt
+};
+
+/* Initialized in root_ia32_init() function. */
 static device_ops_t rootia32_child_ops;
 
-static bool rootia32_add_child(
-	device_t *parent, const char *name, const char *str_match_id, 
-	rootia32_child_dev_data_t *drv_data) 
+static bool
+rootia32_add_child(device_t *parent, const char *name, const char *str_match_id,
+    rootia32_child_dev_data_t *drv_data)
 {
 	printf(NAME ": adding new child device '%s'.\n", name);
 	
 	device_t *child = NULL;
-	match_id_t *match_id = NULL;	
-	
-	// create new device
-	if (NULL == (child = create_device())) {
+	match_id_t *match_id = NULL;
+	
+	/* Create new device. */
+	child = create_device();
+	if (NULL == child)
 		goto failure;
-	}
 	
 	child->name = name;
 	child->driver_data = drv_data;
 	
-	// initialize match id list
-	if (NULL == (match_id = create_match_id())) {
+	/* Initialize match id list */
+	match_id = create_match_id();
+	if (NULL == match_id)
 		goto failure;
-	}
+	
 	match_id->id = str_match_id;
 	match_id->score = 100;
-	add_match_id(&child->match_ids, match_id);	
-	
-	// set provided operations to the device
+	add_match_id(&child->match_ids, match_id);
+	
+	/* Set provided operations to the device. */
 	child->ops = &rootia32_child_ops;
 	
-	// register child  device
-	if (EOK != child_device_register(child, parent)) {
+	/* Register child device. */
+	if (EOK != child_device_register(child, parent))
 		goto failure;
-	}
 	
 	return true;
 	
 failure:
-	if (NULL != match_id) {
+	if (NULL != match_id)
 		match_id->id = NULL;
-	}
 	
 	if (NULL != child) {
 		child->name = NULL;
-		delete_device(child);		
+		delete_device(child);
 	}
 	
 	printf(NAME ": failed to add child device '%s'.\n", name);
 	
-	return false;	
-}
-
-static bool rootia32_add_children(device_t *dev) 
+	return false;
+}
+
+static bool rootia32_add_children(device_t *dev)
 {
 	return rootia32_add_child(dev, "pci0", "intel_pci", &pci_data);
@@ -171,15 +170,17 @@
 
 /** Get the root device.
- * 
- * @param dev the device which is root of the whole device tree (both of HW and pseudo devices).
- * @return 0 on success, negative error number otherwise.
- */
-static int rootia32_add_device(device_t *dev) 
+ *
+ * @param dev		The device which is root of the whole device tree (both
+ *			of HW and pseudo devices).
+ * @return		Zero on success, negative error number otherwise.
+ */
+static int rootia32_add_device(device_t *dev)
 {
 	printf(NAME ": rootia32_add_device, device handle = %d\n", dev->handle);
 	
-	// register child devices	
+	/* Register child devices. */
 	if (!rootia32_add_children(dev)) {
-		printf(NAME ": failed to add child devices for platform ia32.\n");
+		printf(NAME ": failed to add child devices for platform "
+		    "ia32.\n");
 	}
 	
@@ -187,5 +188,6 @@
 }
 
-static void root_ia32_init() {
+static void root_ia32_init(void)
+{
 	rootia32_child_ops.interfaces[HW_RES_DEV_IFACE] = &child_res_iface;
 }
@@ -193,5 +195,5 @@
 int main(int argc, char *argv[])
 {
-	printf(NAME ": HelenOS rootia32 device driver\n");	
+	printf(NAME ": HelenOS rootia32 device driver\n");
 	root_ia32_init();
 	return driver_main(&rootia32_driver);
@@ -201,3 +203,2 @@
  * @}
  */
- 
