lib: Remove drv->close absence support in fp_async_dev_close()
The driver will at least need to close its hardware resources, and free memory, so it must have had one. This case was never actually used as can be seen from the fact that we would assert in fpi_drvcb_close_complete() if the state was wrong but never set it to the expected value.
This commit is contained in:
parent
b3f6ff5a36
commit
c91819f551
1 changed files with 2 additions and 6 deletions
|
@ -114,18 +114,14 @@ API_EXPORTED void fp_async_dev_close(struct fp_dev *dev,
|
|||
|
||||
drv = dev->drv;
|
||||
|
||||
g_return_if_fail (drv->close != NULL);
|
||||
|
||||
if (g_slist_index(opened_devices, (gconstpointer) dev) == -1)
|
||||
fp_err("device %p not in opened list!", dev);
|
||||
opened_devices = g_slist_remove(opened_devices, (gconstpointer) dev);
|
||||
|
||||
dev->close_cb = callback;
|
||||
dev->close_cb_data = user_data;
|
||||
|
||||
if (!drv->close) {
|
||||
fpi_drvcb_close_complete(dev);
|
||||
return;
|
||||
}
|
||||
|
||||
dev->state = DEV_STATE_DEINITIALIZING;
|
||||
drv->close(dev);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue