Index: uspace/drv/bus/usb/usbhub/usbhub.c
===================================================================
--- uspace/drv/bus/usb/usbhub/usbhub.c	(revision 7dddd7b475f6a4be64132bca0625d4514f8c8872)
+++ uspace/drv/bus/usb/usbhub/usbhub.c	(revision 71f211f6909eb71f441da24a2ff90c3ecefd18fd)
@@ -164,5 +164,5 @@
 
 	/* Start hub operation. */
-	const usb_device_auto_polling_t auto_polling = {
+	const usb_device_polling_config_t config = {
 		.debug = 1,
 		.auto_clear_halt = true,
@@ -178,6 +178,6 @@
 	    usb_device_get_mapped_ep_desc(hub_dev->usb_device,
 	    &hub_status_change_endpoint_description);
-	opResult = usb_device_auto_polling(hub_dev->usb_device, epm,
-	    &auto_polling, ((hub_dev->port_count + 1 + 7) / 8));
+	opResult = usb_device_poll(hub_dev->usb_device, epm, &config,
+	    ((hub_dev->port_count + 1 + 7) / 8), &hub_dev->polling);
 	
 	if (opResult != EOK) {
Index: uspace/drv/bus/usb/usbhub/usbhub.h
===================================================================
--- uspace/drv/bus/usb/usbhub/usbhub.h	(revision 7dddd7b475f6a4be64132bca0625d4514f8c8872)
+++ uspace/drv/bus/usb/usbhub/usbhub.h	(revision 71f211f6909eb71f441da24a2ff90c3ecefd18fd)
@@ -44,4 +44,5 @@
 #include <usb/dev/pipes.h>
 #include <usb/dev/driver.h>
+#include <usb/dev/poll.h>
 
 #include <fibril_synch.h>
@@ -59,5 +60,6 @@
 	/** Generic usb device data*/
 	usb_device_t *usb_device;
-
+	/** Data polling handle. */
+	usb_device_polling_t *polling;
 	/** Number of pending operations on the mutex to prevent shooting
 	 * ourselves in the foot.
Index: uspace/drv/hid/usbhid/main.c
===================================================================
--- uspace/drv/hid/usbhid/main.c	(revision 7dddd7b475f6a4be64132bca0625d4514f8c8872)
+++ uspace/drv/hid/usbhid/main.c	(revision 71f211f6909eb71f441da24a2ff90c3ecefd18fd)
@@ -90,5 +90,5 @@
 	 * This will create a separate fibril that will query the device
 	 * for the data continuously. */
-	const usb_device_auto_polling_t auto_polling = {
+	const usb_device_polling_config_t config = {
 		.debug = 1,
 		.auto_clear_halt = true,
@@ -101,6 +101,6 @@
 	};
 
-	rc = usb_device_auto_polling(dev, hid_dev->poll_pipe_mapping,
-	    &auto_polling, hid_dev->poll_pipe_mapping->pipe.desc.max_transfer_size);
+	rc = usb_device_poll(dev, hid_dev->poll_pipe_mapping, &config,
+	    hid_dev->poll_pipe_mapping->pipe.desc.max_transfer_size, &hid_dev->polling);
 
 	if (rc != EOK) {
Index: uspace/drv/hid/usbhid/usbhid.h
===================================================================
--- uspace/drv/hid/usbhid/usbhid.h	(revision 7dddd7b475f6a4be64132bca0625d4514f8c8872)
+++ uspace/drv/hid/usbhid/usbhid.h	(revision 71f211f6909eb71f441da24a2ff90c3ecefd18fd)
@@ -43,4 +43,5 @@
 #include <usb/dev/pipes.h>
 #include <usb/dev/driver.h>
+#include <usb/dev/poll.h>
 #include <usb/hid/hid.h>
 #include <stdbool.h>
@@ -107,4 +108,7 @@
 	usb_endpoint_mapping_t *poll_pipe_mapping;
 
+	/** Device polling handle. */
+	usb_device_polling_t *polling;
+
 	/** Subdrivers. */
 	usb_hid_subdriver_t *subdrivers;
Index: uspace/lib/usbdev/include/usb/dev/poll.h
===================================================================
--- uspace/lib/usbdev/include/usb/dev/poll.h	(revision 7dddd7b475f6a4be64132bca0625d4514f8c8872)
+++ uspace/lib/usbdev/include/usb/dev/poll.h	(revision 71f211f6909eb71f441da24a2ff90c3ecefd18fd)
@@ -44,6 +44,9 @@
 #include <stdint.h>
 
+/** Automated polling instance. */
+typedef struct usb_device_polling usb_device_polling_t;
+
 /** Parameters and callbacks for automated polling. */
-typedef struct {
+typedef struct usb_device_polling_config {
 	/** Level of debugging messages from auto polling.
 	 * 0 - nothing
@@ -52,14 +55,18 @@
 	 */
 	int debug;
+
 	/** Maximum number of consecutive errors before polling termination. */
 	size_t max_failures;
+
 	/** Delay between poll requests in milliseconds.
 	 * Set to negative value to use value from endpoint descriptor.
 	 */
 	int delay;
+
 	/** Whether to automatically try to clear the HALT feature after
 	 * the endpoint stalls.
 	 */
 	bool auto_clear_halt;
+
 	/** Callback when data arrives.
 	 *
@@ -72,4 +79,5 @@
 	bool (*on_data)(usb_device_t *dev, uint8_t *data, size_t data_size,
 	    void *arg);
+
 	/** Callback when polling is terminated.
 	 *
@@ -80,4 +88,5 @@
 	void (*on_polling_end)(usb_device_t *dev, bool due_to_errors,
 	    void *arg);
+
 	/** Callback when error occurs.
 	 *
@@ -88,14 +97,11 @@
 	 */
 	bool (*on_error)(usb_device_t *dev, int err_code, void *arg);
+
 	/** Argument to pass to callbacks. */
 	void *arg;
-} usb_device_auto_polling_t;
+} usb_device_polling_config_t;
 
-typedef bool (*usb_polling_callback_t)(usb_device_t *, uint8_t *, size_t, void *);
-typedef bool (*usb_polling_error_callback_t)(usb_device_t *, int, void *);
-typedef void (*usb_polling_terminted_callback_t)(usb_device_t *, bool, void *);
-
-extern int usb_device_auto_polling(usb_device_t *, usb_endpoint_mapping_t *,
-    const usb_device_auto_polling_t *, size_t);
+extern int usb_device_poll(usb_device_t *, usb_endpoint_mapping_t *,
+    const usb_device_polling_config_t *, size_t, usb_device_polling_t **);
 
 #endif
Index: uspace/lib/usbdev/src/devpoll.c
===================================================================
--- uspace/lib/usbdev/src/devpoll.c	(revision 7dddd7b475f6a4be64132bca0625d4514f8c8872)
+++ uspace/lib/usbdev/src/devpoll.c	(revision 71f211f6909eb71f441da24a2ff90c3ecefd18fd)
@@ -53,26 +53,26 @@
 #include <stdint.h>
 
-/** Maximum number of failed consecutive requests before announcing failure. */
-#define MAX_FAILED_ATTEMPTS 3
-
-/** Data needed for polling. */
-typedef struct {
+/** Private automated polling instance data. */
+struct usb_device_polling {
 	/** Parameters for automated polling. */
-	usb_device_auto_polling_t auto_polling;
+	usb_device_polling_config_t config;
 
 	/** USB device to poll. */
 	usb_device_t *dev;
+
 	/** Device enpoint mapping to use for polling. */
 	usb_endpoint_mapping_t *polling_mapping;
+
 	/** Size of the recieved data. */
 	size_t request_size;
+
 	/** Data buffer. */
 	uint8_t *buffer;
-} polling_data_t;
+};
 
 
 /** Polling fibril.
  *
- * @param arg Pointer to polling_data_t.
+ * @param arg Pointer to usb_device_polling_t.
  * @return Always EOK.
  */
@@ -80,7 +80,8 @@
 {
 	assert(arg);
-	const polling_data_t *data = arg;
+	const usb_device_polling_t *data = arg;
+
 	/* Helper to reduce typing. */
-	const usb_device_auto_polling_t *params = &data->auto_polling;
+	const usb_device_polling_config_t *params = &data->config;
 
 	usb_pipe_t *pipe = &data->polling_mapping->pipe;
@@ -202,14 +203,15 @@
  * @param dev Device to be periodically polled.
  * @param epm Endpoint mapping to use.
- * @param polling Polling settings.
+ * @param config Polling settings.
  * @param req_size How many bytes to ask for in each request.
  * @return Error code.
  * @retval EOK New fibril polling the device was already started.
  */
-int usb_device_auto_polling(usb_device_t *dev, usb_endpoint_mapping_t *epm,
-    const usb_device_auto_polling_t *polling, size_t req_size)
+int usb_device_poll(usb_device_t *dev, usb_endpoint_mapping_t *epm,
+    const usb_device_polling_config_t *config, size_t req_size,
+    usb_device_polling_t **handle)
 {
 	int rc;
-	if (!dev || !polling || !polling->on_data)
+	if (!dev || !config || !config->on_data)
 		return EBADMEM;
 
@@ -221,28 +223,27 @@
 		return EINVAL;
 
-	polling_data_t *polling_data = malloc(sizeof(polling_data_t));
-	if (!polling_data)
+	usb_device_polling_t *instance = malloc(sizeof(usb_device_polling_t));
+	if (!instance)
 		return ENOMEM;
 
 	/* Fill-in the data. */
-	polling_data->buffer = malloc(req_size);
-	if (polling_data->buffer == NULL) {
+	instance->buffer = malloc(req_size);
+	if (!instance->buffer) {
 		rc = ENOMEM;
-		goto err_polling_data;
-	}
-	polling_data->request_size = req_size;
-	polling_data->dev = dev;
-	polling_data->polling_mapping = epm;
+		goto err_instance;
+	}
+	instance->request_size = req_size;
+	instance->dev = dev;
+	instance->polling_mapping = epm;
 
 	/* Copy provided settings. */
-	polling_data->auto_polling = *polling;
+	instance->config = *config;
 
 	/* Negative value means use descriptor provided value. */
-	if (polling->delay < 0) {
-		polling_data->auto_polling.delay =
-		    epm->descriptor->poll_interval;
-	}
-
-	fid_t fibril = fibril_create(polling_fibril, polling_data);
+	if (config->delay < 0) {
+		instance->config.delay = epm->descriptor->poll_interval;
+	}
+
+	fid_t fibril = fibril_create(polling_fibril, instance);
 	if (!fibril) {
 		rc = ENOMEM;
@@ -251,11 +252,14 @@
 	fibril_add_ready(fibril);
 
+	if (handle)
+		*handle = instance;
+
 	/* Fibril launched. That fibril will free the allocated data. */
 	return EOK;
 
 err_buffer:
-	free(polling_data->buffer);
-err_polling_data:
-	free(polling_data);
+	free(instance->buffer);
+err_instance:
+	free(instance);
 	return rc;
 }
