Index: uspace/srv/drivers/serial/serial.c
===================================================================
--- uspace/srv/drivers/serial/serial.c	(revision dafe675664c7a1289511a0a93f9c29ad327ec554)
+++ uspace/srv/drivers/serial/serial.c	(revision 25a7e11d68ec284b83b483e3d4e486419ef52218)
@@ -269,5 +269,4 @@
 	int res;
 	// enable interrupt globally	
-	printf(NAME ": call  enable_interrupt\n");
 	if (EOK != (res = interrupt_enable(data->irq))) {
 		return res;
@@ -385,8 +384,60 @@
 }
 
+/** Open the device.
+ * 
+ * This is a callback function called when a client tries to connect to the device.
+ * 
+ * @param dev the device.
+ */
+static int serial_open(device_t *dev)
+{
+	serial_dev_data_t *data = (serial_dev_data_t *)dev->driver_data;
+	int res;
+	
+	fibril_mutex_lock(&data->mutex);	
+	
+	if (data->client_connected) {
+		res = ELIMIT;
+	} else {
+		res = EOK;
+		data->client_connected = true;
+	}
+	
+	fibril_mutex_unlock(&data->mutex);
+
+	return res;
+}
+
+/** Close the device.
+ * 
+ *  This is a callback function called when a client tries to disconnect from the device.
+ * 
+ * @param dev the device. 
+ */
+static void serial_close(device_t *dev)
+{
+	serial_dev_data_t *data = (serial_dev_data_t *)dev->driver_data;
+	
+	fibril_mutex_lock(&data->mutex);
+	
+	assert(data->client_connected);	
+	
+	data->client_connected = false;
+	buf_clear(&data->input_buffer);
+	
+	fibril_mutex_unlock(&data->mutex);	 
+}
+
+/** Initialize the serial port driver.
+ * 
+ * Initialize class structures with callback methods for handling 
+ * client requests to the serial port devices.
+ */
 static void serial_init() 
 {
 	// TODO
 	serial_dev_class.id = 0;
+	serial_dev_class.open = &serial_open;
+	serial_dev_class.close = &serial_close;	
 }
 
