Index: uspace/drv/char/ns8250/ns8250.c
===================================================================
--- uspace/drv/char/ns8250/ns8250.c	(revision 7b64cf068a8ae48732b2dc5199287d283ff347d1)
+++ uspace/drv/char/ns8250/ns8250.c	(revision 4510e068636e33ace1ab2e17098dc31efb1c864a)
@@ -160,6 +160,6 @@
 	/** I/O registers **/
 	ns8250_regs_t *regs;
-	/** Is there any client connected to the device? */
-	bool client_connected;
+	/** Are there any clients connected to the device? */
+	unsigned client_connections;
 	/** The irq assigned to this device. */
 	int irq;
@@ -753,5 +753,5 @@
 			uint8_t val = ns8250_read_8(regs);
 			
-			if (ns->client_connected) {
+			if (ns->client_connections > 0) {
 				bool buf_was_empty = buf_is_empty(&ns->input_buffer);
 				if (!buf_push_back(&ns->input_buffer, val)) {
@@ -914,5 +914,5 @@
 	
 	fibril_mutex_lock(&ns->mutex);
-	if (ns->client_connected) {
+		if (ns->client_connections > 0) {
 		fibril_mutex_unlock(&ns->mutex);
 		return EBUSY;
@@ -948,11 +948,9 @@
 	
 	fibril_mutex_lock(&ns->mutex);
-	if (ns->client_connected) {
-		res = ELIMIT;
-	} else if (ns->removed) {
+	if (ns->removed) {
 		res = ENXIO;
 	} else {
 		res = EOK;
-		ns->client_connected = true;
+		ns->client_connections++;
 	}
 	fibril_mutex_unlock(&ns->mutex);
@@ -974,8 +972,8 @@
 	fibril_mutex_lock(&data->mutex);
 	
-	assert(data->client_connected);
-	
-	data->client_connected = false;
-	buf_clear(&data->input_buffer);
+	assert(data->client_connections > 0);
+	
+	if (!(--data->client_connections))
+		buf_clear(&data->input_buffer);
 	
 	fibril_mutex_unlock(&data->mutex);
