On Thu, Sep 23, 2010 at 11:14:24AM +0200, Giuseppe CAVALLARO wrote: > Signed-off-by: Giuseppe Cavallaro <peppe.cavallaro@xxxxxx> I'd prefer it the way sdhci-mv.c is doing it (just one #if-block and returning the code from the sdhci_*-functions). Then it should be fine. > --- > drivers/mmc/host/sdhci-pltfm.c | 22 ++++++++++++++++++++++ > 1 files changed, 22 insertions(+), 0 deletions(-) > > diff --git a/drivers/mmc/host/sdhci-pltfm.c b/drivers/mmc/host/sdhci-pltfm.c > index e045e3c..89ea64b 100644 > --- a/drivers/mmc/host/sdhci-pltfm.c > +++ b/drivers/mmc/host/sdhci-pltfm.c > @@ -165,6 +165,24 @@ static const struct platform_device_id sdhci_pltfm_ids[] = { > }; > MODULE_DEVICE_TABLE(platform, sdhci_pltfm_ids); > > +#ifdef CONFIG_PM > +static int sdhci_pltfm_suspend(struct platform_device *dev, pm_message_t pm) > +{ > + struct sdhci_host *host = platform_get_drvdata(dev); > + > + sdhci_suspend_host(host, pm); > + return 0; > +} > + > +static int sdhci_pltfm_resume(struct platform_device *dev) > +{ > + struct sdhci_host *host = platform_get_drvdata(dev); > + > + sdhci_resume_host(host); > + return 0; > +} > +#endif > + > static struct platform_driver sdhci_pltfm_driver = { > .driver = { > .name = "sdhci", > @@ -173,6 +191,10 @@ static struct platform_driver sdhci_pltfm_driver = { > .probe = sdhci_pltfm_probe, > .remove = __devexit_p(sdhci_pltfm_remove), > .id_table = sdhci_pltfm_ids, > +#ifdef CONFIG_PM > + .suspend = sdhci_pltfm_suspend, > + .resume = sdhci_pltfm_resume, > +#endif > }; > > /*****************************************************************************\ > -- > 1.5.5.6 > > -- > To unsubscribe from this list: send the line "unsubscribe linux-mmc" in > the body of a message to majordomo@xxxxxxxxxxxxxxx > More majordomo info at http://vger.kernel.org/majordomo-info.html -- Pengutronix e.K. | Wolfram Sang | Industrial Linux Solutions | http://www.pengutronix.de/ |
Attachment:
signature.asc
Description: Digital signature