Exemplo n.º 1
0
void device_clear(struct device *device)
{
	int probenum;

	/* TODO: plugin-specific clear call? */

	if(device->probes)
		for(probenum = 1; probenum <= g_slist_length(device->probes); probenum++)
			device_probe_clear(device, probenum);

}
Exemplo n.º 2
0
void device_clear(struct device *device)
{
	unsigned int pnum;

	/* TODO: Plugin-specific clear call? */

	if (!device->probes)
		return;

	for (pnum = 1; pnum <= g_slist_length(device->probes); pnum++)
		device_probe_clear(device, pnum);
}
Exemplo n.º 3
0
void device_destroy(struct device *device)
{
	int probenum;

	/* TODO: plugin-specific destroy call, need to decrease refcount in plugin */

	devices = g_slist_remove(devices, device);
	if(device->probes)
	{
		for(probenum = 1; probenum <= g_slist_length(device->probes); probenum++)
			device_probe_clear(device, probenum);
		g_slist_free(device->probes);
	}
	g_free(device);

}