Index: uspace/drv/pciintel/pci.h
===================================================================
--- uspace/drv/pciintel/pci.h	(revision a79d88da204957831a1715d66a6d80828c09d5c1)
+++ uspace/drv/pciintel/pci.h	(revision b9ccc46d4c76db6911d8be59c4810b77b388faab)
@@ -1,4 +1,4 @@
 /*
- * Copyright (c) 2010 Lenka Trochtova 
+ * Copyright (c) 2010 Lenka Trochtova
  * All rights reserved.
  *
@@ -32,8 +32,7 @@
 /** @file
  */
- 
-#ifndef PCI_H
-#define PCI_H
 
+#ifndef PCI_H_
+#define PCI_H_
 
 #include <stdlib.h>
@@ -54,42 +53,42 @@
 } pci_dev_data_t;
 
-void create_pci_match_ids(device_t *dev);
+extern void create_pci_match_ids(device_t *);
 
-uint8_t pci_conf_read_8(device_t *dev, int reg);
-uint16_t pci_conf_read_16(device_t *dev, int reg);
-uint32_t pci_conf_read_32(device_t *dev, int reg);
-void pci_conf_write_8(device_t *dev, int reg, uint8_t val);
-void pci_conf_write_16(device_t *dev, int reg, uint16_t val);
-void pci_conf_write_32(device_t *dev, int reg, uint32_t val);
+extern uint8_t pci_conf_read_8(device_t *, int);
+extern uint16_t pci_conf_read_16(device_t *, int);
+extern uint32_t pci_conf_read_32(device_t *, int);
+extern void pci_conf_write_8(device_t *, int, uint8_t);
+extern void pci_conf_write_16(device_t *, int, uint16_t);
+extern void pci_conf_write_32(device_t *, int, uint32_t);
 
-void pci_add_range(device_t *dev, uint64_t range_addr, size_t range_size, bool io);
-int pci_read_bar(device_t *dev, int addr);
-void pci_read_interrupt(device_t *dev);
-void pci_add_interrupt(device_t *dev, int irq);
+extern void pci_add_range(device_t *, uint64_t, size_t, bool);
+extern int pci_read_bar(device_t *, int);
+extern void pci_read_interrupt(device_t *);
+extern void pci_add_interrupt(device_t *, int);
 
-void pci_bus_scan(device_t *parent, int bus_num);
+extern void pci_bus_scan(device_t *, int);
 
-
-static inline pci_dev_data_t *create_pci_dev_data() 
+static inline pci_dev_data_t *create_pci_dev_data(void)
 {
-	pci_dev_data_t *res = (pci_dev_data_t *)malloc(sizeof(pci_dev_data_t));
-	if (NULL != res) {
+	pci_dev_data_t *res = (pci_dev_data_t *) malloc(sizeof(pci_dev_data_t));
+	
+	if (NULL != res)
 		memset(res, 0, sizeof(pci_dev_data_t));
-	}
-	return res;	
+	return res;
 }
 
-static inline void init_pci_dev_data(pci_dev_data_t *d, int bus, int dev, int fn) 
+static inline void
+init_pci_dev_data(pci_dev_data_t *d, int bus, int dev, int fn)
 {
 	d->bus = bus;
 	d->dev = dev;
-	d->fn = fn;	
+	d->fn = fn;
 }
 
-static inline void delete_pci_dev_data(pci_dev_data_t *d) 
+static inline void delete_pci_dev_data(pci_dev_data_t *d)
 {
 	if (NULL != d) {
 		clean_hw_resource_list(&d->hw_resources);
-		free(d);	
+		free(d);
 	}
 }
@@ -97,7 +96,9 @@
 static inline void create_pci_dev_name(device_t *dev)
 {
-	pci_dev_data_t *dev_data = (pci_dev_data_t *)dev->driver_data;
+	pci_dev_data_t *dev_data = (pci_dev_data_t *) dev->driver_data;
 	char *name = NULL;
-	asprintf(&name, "%02x:%02x.%01x", dev_data->bus, dev_data->dev, dev_data->fn);
+	
+	asprintf(&name, "%02x:%02x.%01x", dev_data->bus, dev_data->dev,
+	    dev_data->fn);
 	dev->name = name;
 }
@@ -106,11 +107,14 @@
 {
 	pci_dev_data_t *dev_data = (pci_dev_data_t *)dev->driver_data;
-	dev_data->hw_resources.resources = (hw_resource_t *)malloc(PCI_MAX_HW_RES * sizeof(hw_resource_t));
-	return dev_data->hw_resources.resources != NULL;	
+	
+	dev_data->hw_resources.resources =
+	    (hw_resource_t *) malloc(PCI_MAX_HW_RES * sizeof(hw_resource_t));
+	return dev_data->hw_resources.resources != NULL;
 }
 
 static inline void pci_clean_resource_list(device_t *dev)
 {
-	pci_dev_data_t *dev_data = (pci_dev_data_t *)dev->driver_data;
+	pci_dev_data_t *dev_data = (pci_dev_data_t *) dev->driver_data;
+	
 	if (NULL != dev_data->hw_resources.resources) {
 		free(dev_data->hw_resources.resources);
@@ -119,17 +123,19 @@
 }
 
-/** Read the base address registers (BARs) of the device 
- *  and adds the addresses to its hw resource list.
- * 
+/** Read the base address registers (BARs) of the device and adds the addresses
+ * to its hw resource list.
+ *
  * @param dev the pci device.
  */
 static inline  void pci_read_bars(device_t *dev)
 {
-	// position of the BAR in the PCI configuration address space of the device
+	/*
+	 * Position of the BAR in the PCI configuration address space of the
+	 * device.
+	 */
 	int addr = PCI_BASE_ADDR_0;
 	
-	while (addr <= PCI_BASE_ADDR_5) {
-		addr = pci_read_bar(dev, addr);	
-	}	
+	while (addr <= PCI_BASE_ADDR_5)
+		addr = pci_read_bar(dev, addr);
 }
 
@@ -139,7 +145,5 @@
 }
 
-
 #endif
-
 
 /**
