device: pass the correct parameters to g_task_is_valid