Index: uspace/lib/usbhost/include/usb/host/endpoint.h
===================================================================
--- uspace/lib/usbhost/include/usb/host/endpoint.h	(revision 5f97ef445e6e5648a8b8c902eb0f655d579336b4)
+++ uspace/lib/usbhost/include/usb/host/endpoint.h	(revision 0abc2aea144199fee5fb2b5b1ffcf9f0ac6528ce)
@@ -42,6 +42,6 @@
 
 #include <adt/list.h>
-#include <atomic.h>
 #include <fibril_synch.h>
+#include <refcount.h>
 #include <stdbool.h>
 #include <sys/time.h>
@@ -78,5 +78,5 @@
 	device_t *device;
 	/** Reference count. */
-	atomic_t refcnt;
+	atomic_refcount_t refcnt;
 
 	/** An inherited guard */
Index: uspace/lib/usbhost/include/usb/host/usb_transfer_batch.h
===================================================================
--- uspace/lib/usbhost/include/usb/host/usb_transfer_batch.h	(revision 5f97ef445e6e5648a8b8c902eb0f655d579336b4)
+++ uspace/lib/usbhost/include/usb/host/usb_transfer_batch.h	(revision 0abc2aea144199fee5fb2b5b1ffcf9f0ac6528ce)
@@ -38,6 +38,6 @@
 #define LIBUSBHOST_HOST_USB_TRANSFER_BATCH_H
 
-#include <atomic.h>
 #include <errno.h>
+#include <refcount.h>
 #include <stddef.h>
 #include <stdint.h>
Index: uspace/lib/usbhost/src/endpoint.c
===================================================================
--- uspace/lib/usbhost/src/endpoint.c	(revision 5f97ef445e6e5648a8b8c902eb0f655d579336b4)
+++ uspace/lib/usbhost/src/endpoint.c	(revision 0abc2aea144199fee5fb2b5b1ffcf9f0ac6528ce)
@@ -36,5 +36,4 @@
 
 #include <assert.h>
-#include <atomic.h>
 #include <mem.h>
 #include <stdlib.h>
@@ -60,5 +59,5 @@
 	ep->device = dev;
 
-	atomic_set(&ep->refcnt, 0);
+	refcount_init(&ep->refcnt);
 	fibril_condvar_initialize(&ep->avail);
 
@@ -91,5 +90,5 @@
 void endpoint_add_ref(endpoint_t *ep)
 {
-	atomic_inc(&ep->refcnt);
+	refcount_up(&ep->refcnt);
 }
 
@@ -115,7 +114,6 @@
 void endpoint_del_ref(endpoint_t *ep)
 {
-	if (atomic_predec(&ep->refcnt) == 0) {
+	if (refcount_down(&ep->refcnt))
 		endpoint_destroy(ep);
-	}
 }
 
