[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20080717172945.3481eefa@mjolnir.drzeus.cx>
Date: Thu, 17 Jul 2008 17:29:45 +0200
From: Pierre Ossman <drzeus-mmc@...eus.cx>
To: Ben Dooks <ben-linux@...ff.org>
Cc: linux-kernel@...r.kernel.org, Ben Dooks <ben-linux@...ff.org>
Subject: Re: MMC: s3cmci: ensure host stopped on machine shutdown
On Thu, 17 Jul 2008 15:32:54 +0100
Ben Dooks <ben-linux@...ff.org> wrote:
> Ensure that the s3cmci host controller is turned off
> when the machine is shutdown, otherwise we end up
> leaving the card powered and processing insertion and
> removal events after the system prints "System halted."
>
> Signed-off-by: Ben Dooks <ben-linux@...ff.org>
>
> Index: linux-2.6.26-quilt3/drivers/mmc/host/s3cmci.c
> ===================================================================
> --- linux-2.6.26-quilt3.orig/drivers/mmc/host/s3cmci.c 2008-07-17 15:15:35.000000000 +0100
> +++ linux-2.6.26-quilt3/drivers/mmc/host/s3cmci.c 2008-07-17 15:29:23.000000000 +0100
> @@ -1331,21 +1331,30 @@ static int __devinit s3cmci_probe(struct
> return ret;
> }
>
> +static void s3cmci_shutdown(struct platform_device *pdev)
> +{
> + struct mmc_host *mmc = platform_get_drvdata(pdev);
> + struct s3cmci_host *host = mmc_priv(mmc);
> +
> + if (host->irq_cd >= 0)
> + free_irq(host->irq_cd, host);
> +
> + mmc_remove_host(mmc);
> + clk_disable(host->clk);
> +}
> +
The core can send requests your way until mmc_remove_host() returns so
you can't remove the interrupt before then.
Rgds
--
-- Pierre Ossman
Linux kernel, MMC maintainer http://www.kernel.org
rdesktop, core developer http://www.rdesktop.org
WARNING: This correspondence is being monitored by the
Swedish government. Make sure your server uses encryption
for SMTP traffic and consider using PGP for end-to-end
encryption.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists