[PATCH 2/5] glamo-mci: free irq after removing host, not before

Lars-Peter Clausen lars at metafoo.de
Sat Jun 19 22:16:13 CEST 2010


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Lars-Peter Clausen wrote:
> Thibaut Girka wrote:
>> --- drivers/mfd/glamo/glamo-mci.c |    5 +++-- 1 files changed, 3
>> insertions(+), 2 deletions(-)
>
>> diff --git a/drivers/mfd/glamo/glamo-mci.c
> b/drivers/mfd/glamo/glamo-mci.c
>> index c0c58f1..f44dfc8 100644 --- a/drivers/mfd/glamo/glamo-mci.c
>>  +++ b/drivers/mfd/glamo/glamo-mci.c @@ -878,12 +878,13 @@ static
>> int glamo_mci_remove(struct
> platform_device *pdev)
>> struct mmc_host    *mmc = platform_get_drvdata(pdev); struct
>> glamo_mci_host *host = mmc_priv(mmc);
>
>> -    free_irq(host->irq, host); - mmc_host_enable(mmc);
>> mmc_remove_host(mmc); mmc_host_disable(mmc);
>
>> +    synchronize_irq(host->irq); +    free_irq(host->irq, host);
>> + iounmap(host->mmio_base); iounmap(host->data_base);
>> release_mem_region(host->mmio_mem->start,
> Hi
>
> IMO we have to free the IRQ before we free the host. The irq
> handler uses the mmc_host struct and if it kicks in after the host
> has been remove we'll work on invalid data.
>
> - Lars
Hm... never mind what i said. Your patch is ok...
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAkwdJYwACgkQBX4mSR26RiPzIgCdGq4Qe5fw/9ROsMnRrqU+/1q4
lKIAnjINjI/9cpi3nBbi3nJTZvg/Vpov
=+RFN
-----END PGP SIGNATURE-----




More information about the openmoko-kernel mailing list