drivers: Use SSM delayed actions when possible

This commit is contained in:
Marco Trevisan (Treviño)
2019-11-22 18:39:02 +01:00
parent e12978f402
commit bac6382f67
3 changed files with 29 additions and 59 deletions

View File

@@ -168,6 +168,8 @@ fpi_ssm_free (FpiSsm *machine)
if (!machine)
return;
BUG_ON (machine->timeout != NULL);
if (machine->ssm_data_destroy)
g_clear_pointer (&machine->ssm_data, machine->ssm_data_destroy);
g_clear_pointer (&machine->error, g_error_free);
@@ -250,7 +252,6 @@ void
fpi_ssm_mark_completed (FpiSsm *machine)
{
BUG_ON (machine->completed);
BUG_ON (machine->timeout);
BUG_ON (machine->timeout != NULL);
g_clear_pointer (&machine->timeout, g_source_destroy);