Index: uspace/lib/drv/include/driver.h
===================================================================
--- uspace/lib/drv/include/driver.h	(revision d35ac1db915f076a3072db1fdc5f8c6a9f8d3dba)
+++ uspace/lib/drv/include/driver.h	(revision 97adec887c31e7b64ed11d263922bae13258601e)
@@ -50,5 +50,7 @@
 typedef struct device device_t;
 
-/* device interface */
+/*
+ * Device interface
+ */
 
 /*
@@ -73,5 +75,5 @@
 static inline bool is_valid_iface_idx(int idx)
 {
-	return 0 <= idx && idx < DEV_IFACE_MAX;
+	return (0 <= idx) && (idx < DEV_IFACE_MAX);
 }
 
@@ -80,7 +82,9 @@
 
 
-/* device class */
-
-/** Devices operations. */
+/*
+ * Device class
+ */
+
+/** Devices operations */
 typedef struct device_ops {
 	/**
@@ -108,7 +112,9 @@
 
 
-/* device */
-
-/** The device. */
+/*
+ * Device
+ */
+
+/** Device structure */
 struct device {
 	/**
@@ -119,42 +125,41 @@
 	
 	/**
-	 * The phone to the parent device driver (if it is different from this
-	 * driver).
+	 * Phone to the parent device driver (if it is different from this
+	 * driver)
 	 */
 	int parent_phone;
 	
-	/** Parent device if handled by this driver, NULL otherwise. */
+	/** Parent device if handled by this driver, NULL otherwise */
 	device_t *parent;
-	/** The device's name. */
+	/** Device name */
 	const char *name;
-	/** The list of device ids for device-to-driver matching. */
+	/** List of device ids for device-to-driver matching */
 	match_id_list_t match_ids;
-	/** The device driver's data associated with this device. */
+	/** Driver-specific data associated with this device */
 	void *driver_data;
-	/** The implementation of operations provided by this device. */
+	/** The implementation of operations provided by this device */
 	device_ops_t *ops;
 	
-	/**
-	 * Pointer to the previous and next device in the list of devices
-	 * handled by the driver.
-	 */
+	/** Link in the list of devices handled by the driver */
 	link_t link;
 };
 
 
-/* driver */
-
-/** Generic device driver operations. */
+/*
+ * Driver
+ */
+
+/** Generic device driver operations */
 typedef struct driver_ops {
-	/** Callback method for passing a new device to the device driver.*/
+	/** Callback method for passing a new device to the device driver */
 	int (*add_device)(device_t *dev);
-	/* TODO add other generic driver operations */
+	/* TODO: add other generic driver operations */
 } driver_ops_t;
 
-/** The driver structure.*/
+/** Driver structure */
 typedef struct driver {
-	/** The name of the device driver. */
+	/** Name of the device driver */
 	const char *name;
-	/** Generic device driver operations. */
+	/** Generic device driver operations */
 	driver_ops_t *driver_ops;
 } driver_t;
@@ -169,8 +174,10 @@
 {
 	device_t *dev = malloc(sizeof(device_t));
-	if (NULL != dev) {
+
+	if (dev != NULL) {
 		memset(dev, 0, sizeof(device_t));
 		init_match_ids(&dev->match_ids);
-	}	
+	}
+
 	return dev;
 }
@@ -183,5 +190,5 @@
 {
 	clean_match_ids(&dev->match_ids);
-	if (NULL != dev->name)
+	if (dev->name != NULL)
 		free(dev->name);
 	free(dev);
@@ -199,6 +206,7 @@
 int child_device_register_wrapper(device_t *, const char *, const char *, int);
 
-
-/* interrupts */
+/*
+ * Interrupts
+ */
 
 typedef void interrupt_handler_t(device_t *, ipc_callid_t, ipc_call_t *);
@@ -223,5 +231,5 @@
 	
 	ctx = (interrupt_context_t *) malloc(sizeof(interrupt_context_t));
-	if (NULL != ctx)
+	if (ctx != NULL)
 		memset(ctx, 0, sizeof(interrupt_context_t));
 	
@@ -231,5 +239,5 @@
 static inline void delete_interrupt_context(interrupt_context_t *ctx)
 {
-	if (NULL != ctx)
+	if (ctx != NULL)
 		free(ctx);
 }
@@ -270,5 +278,5 @@
 	while (link != &list->contexts) {
 		ctx = list_get_instance(link, interrupt_context_t, link);
-		if (id == ctx->id) {
+		if (ctx->id == id) {
 			fibril_mutex_unlock(&list->mutex);
 			return ctx;
@@ -291,5 +299,5 @@
 	while (link != &list->contexts) {
 		ctx = list_get_instance(link, interrupt_context_t, link);
-		if (irq == ctx->irq && dev == ctx->dev) {
+		if (ctx->irq == irq && ctx->dev == dev) {
 			fibril_mutex_unlock(&list->mutex);
 			return ctx;
@@ -307,9 +315,8 @@
 
 
-/* default handler for client requests */
-
+/** Get default handler for client requests */
 static inline remote_handler_t *device_get_default_handler(device_t *dev)
 {
-	if (NULL == dev->ops)
+	if (dev->ops == NULL)
 		return NULL;
 	return dev->ops->default_handler;
