fpi-device: Make possible to set a DestroyNotify for timeout data

Since GSource data can be automatically cleaned up on source destruction, we
can mimic this for the devices timeout easily as well.

Add an extra parameter, and let's use this cocci file to adapt all the
drivers like magic:

	@@
	expression e1, e2, e3, e4;
	@@
	fpi_device_add_timeout (e1, e2, e3, e4
	+  , NULL
  	)
This commit is contained in:
Marco Trevisan (Treviño)
2019-11-22 17:11:29 +01:00
parent 0241617713
commit 3ed73aa17c
8 changed files with 23 additions and 21 deletions

View File

@@ -706,7 +706,7 @@ activate_loop (FpiSsm *ssm, FpDevice *_dev)
case DEV_ACTIVATE_DATA_COMPLETE:
fpi_device_add_timeout (_dev, 1,
fpi_ssm_next_state_timeout_cb,
ssm);
ssm, NULL);
break;