Skip to content
Snippets Groups Projects
Commit 580113ae authored by Alessandro Rubini's avatar Alessandro Rubini
Browse files

new fmc-bus and fix in destroy(), to match new dev->release


fmc-bus is now fixed WRT the dev->release(). Now devices are correctly
released when their use count reaches zero. Thus, we can't release them
ourselves.

This commit picks the new fmc-bus and adapts th own releae method.

Signed-off-by: default avatarAlessandro Rubini <rubini@gnudd.com>
parent dcafaf66
Branches
Tags
No related merge requests found
...@@ -449,10 +449,12 @@ out_free: ...@@ -449,10 +449,12 @@ out_free:
void spec_fmc_destroy(struct spec_dev *spec) void spec_fmc_destroy(struct spec_dev *spec)
{ {
/* undo the things in the reverse order, but pin the device first */
get_device(&spec->fmc->dev);
spec_gpio_exit(spec->fmc); spec_gpio_exit(spec->fmc);
fmc_device_unregister(spec->fmc); fmc_device_unregister(spec->fmc);
spec_irq_exit(spec->fmc); spec_irq_exit(spec->fmc);
spec_i2c_exit(spec->fmc); spec_i2c_exit(spec->fmc);
kfree(spec->fmc); put_device(&spec->fmc->dev);
spec->fmc = NULL; spec->fmc = NULL;
} }
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment