Commit 580113ae authored by Alessandro Rubini's avatar Alessandro Rubini

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: Alessandro Rubini's avatarAlessandro Rubini <rubini@gnudd.com>
parent dcafaf66
......@@ -449,10 +449,12 @@ out_free:
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);
fmc_device_unregister(spec->fmc);
spec_irq_exit(spec->fmc);
spec_i2c_exit(spec->fmc);
kfree(spec->fmc);
put_device(&spec->fmc->dev);
spec->fmc = NULL;
}
Markdown is supported
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