The hotplug registration function will invoke the callback immediately if there
are already devices connected. This can caused unexpected behaviour if the polling
function is supposed to run via a different thread, so now the registration is
performed in the polling function itself.