hidpp10: drop internal ref counts

This caused a problem since the hidpp10_device would keep a ref to
the ratbag_device - and the hidpp10_device would only get destroyed
when the ratbag_device got a ref count 0.
This commit is contained in:
Thomas Hindoe Paaboel Andersen
2015-09-13 23:10:34 +02:00
parent fc13c15fe2
commit bb5a7cbd1f

View File

@@ -945,7 +945,7 @@ hidpp10_device_new(struct ratbag_device *device, int index)
return NULL;
dev->index = index;
dev->ratbag_device = ratbag_device_ref(device);
dev->ratbag_device = device;
return dev;
}
@@ -991,6 +991,5 @@ hidpp10_device_new_from_idx(struct ratbag_device *device, int idx)
void
hidpp10_device_destroy(struct hidpp10_device *dev)
{
ratbag_device_unref(dev->ratbag_device);
free(dev);
}