Index: uspace/lib/usbdev/src/devpoll.c
===================================================================
--- uspace/lib/usbdev/src/devpoll.c	(revision 6e3c00597c8370c902914c8528e2d7eebd7aa5c6)
+++ uspace/lib/usbdev/src/devpoll.c	(revision 1db6dfd43e6af5b83407ca9b1ef75a0eaddfc7f4)
@@ -57,6 +57,4 @@
 	/** Data buffer. */
 	uint8_t *buffer;
-	/** Argument to pass to callbacks. */
-	void *custom_arg;
 } polling_data_t;
 
@@ -125,5 +123,5 @@
 			++failed_attempts;
 			const bool cont = (params->on_error == NULL) ? true :
-			    params->on_error(data->dev, rc, data->custom_arg);
+			    params->on_error(data->dev, rc, params->arg);
 			if (!cont) {
 				failed_attempts = params->max_failures;
@@ -135,5 +133,5 @@
 		assert(params->on_data);
 		const bool carry_on = params->on_data(
-		    data->dev, data->buffer, actual_size, data->custom_arg);
+		    data->dev, data->buffer, actual_size, params->arg);
 
 		if (!carry_on) {
@@ -155,5 +153,5 @@
 
 	if (params->on_polling_end != NULL) {
-		params->on_polling_end(data->dev, failed, data->custom_arg);
+		params->on_polling_end(data->dev, failed, params->arg);
 	}
 
@@ -205,8 +203,9 @@
 		.on_polling_end = terminated_callback,
 		.on_error = NULL,
+		.arg = arg,
 	};
 
 	return usb_device_auto_polling(dev, pipe_index, &auto_polling,
-	   request_size, arg);
+	   request_size);
 }
 
@@ -230,5 +229,5 @@
 int usb_device_auto_polling(usb_device_t *dev, size_t pipe_index,
     const usb_device_auto_polling_t *polling,
-    size_t request_size, void *arg)
+    size_t request_size)
 {
 	if ((dev == NULL) || (polling == NULL) || (polling->on_data == NULL)) {
@@ -258,5 +257,4 @@
 	polling_data->dev = dev;
 	polling_data->pipe_index = pipe_index;
-	polling_data->custom_arg = arg;
 
 	/* Copy provided settings. */
