diff mbox

[RESEND,2/2] mmc: mxcmmc: Convert to SIMPLE_DEV_PM_OPS

Message ID 1395478366-6276-2-git-send-email-shc_work@mail.ru (mailing list archive)
State New, archived
Headers show

Commit Message

Alexander Shiyan March 22, 2014, 8:52 a.m. UTC
Signed-off-by: Alexander Shiyan <shc_work@mail.ru>
---
 drivers/mmc/host/mxcmmc.c | 13 +++----------
 1 file changed, 3 insertions(+), 10 deletions(-)

Comments

Ulf Hansson April 14, 2014, 12:37 p.m. UTC | #1
On 22 March 2014 09:52, Alexander Shiyan <shc_work@mail.ru> wrote:
> Signed-off-by: Alexander Shiyan <shc_work@mail.ru>

Acked-by: Ulf Hansson <ulf.hansson@linaro.org>

> ---
>  drivers/mmc/host/mxcmmc.c | 13 +++----------
>  1 file changed, 3 insertions(+), 10 deletions(-)
>
> diff --git a/drivers/mmc/host/mxcmmc.c b/drivers/mmc/host/mxcmmc.c
> index 84d630e..86401c0 100644
> --- a/drivers/mmc/host/mxcmmc.c
> +++ b/drivers/mmc/host/mxcmmc.c
> @@ -1220,8 +1220,7 @@ static int mxcmci_remove(struct platform_device *pdev)
>         return 0;
>  }
>
> -#ifdef CONFIG_PM
> -static int mxcmci_suspend(struct device *dev)
> +static int __maybe_unused mxcmci_suspend(struct device *dev)
>  {
>         struct mmc_host *mmc = dev_get_drvdata(dev);
>         struct mxcmci_host *host = mmc_priv(mmc);
> @@ -1231,7 +1230,7 @@ static int mxcmci_suspend(struct device *dev)
>         return 0;
>  }
>
> -static int mxcmci_resume(struct device *dev)
> +static int __maybe_unused mxcmci_resume(struct device *dev)
>  {
>         struct mmc_host *mmc = dev_get_drvdata(dev);
>         struct mxcmci_host *host = mmc_priv(mmc);
> @@ -1241,11 +1240,7 @@ static int mxcmci_resume(struct device *dev)
>         return 0;
>  }
>
> -static const struct dev_pm_ops mxcmci_pm_ops = {
> -       .suspend        = mxcmci_suspend,
> -       .resume         = mxcmci_resume,
> -};
> -#endif
> +static SIMPLE_DEV_PM_OPS(mxcmci_pm_ops, mxcmci_suspend, mxcmci_resume);
>
>  static struct platform_driver mxcmci_driver = {
>         .probe          = mxcmci_probe,
> @@ -1254,9 +1249,7 @@ static struct platform_driver mxcmci_driver = {
>         .driver         = {
>                 .name           = DRIVER_NAME,
>                 .owner          = THIS_MODULE,
> -#ifdef CONFIG_PM
>                 .pm     = &mxcmci_pm_ops,
> -#endif
>                 .of_match_table = mxcmci_of_match,
>         }
>  };
> --
> 1.8.3.2
>
--
To unsubscribe from this list: send the line "unsubscribe linux-mmc" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/drivers/mmc/host/mxcmmc.c b/drivers/mmc/host/mxcmmc.c
index 84d630e..86401c0 100644
--- a/drivers/mmc/host/mxcmmc.c
+++ b/drivers/mmc/host/mxcmmc.c
@@ -1220,8 +1220,7 @@  static int mxcmci_remove(struct platform_device *pdev)
 	return 0;
 }
 
-#ifdef CONFIG_PM
-static int mxcmci_suspend(struct device *dev)
+static int __maybe_unused mxcmci_suspend(struct device *dev)
 {
 	struct mmc_host *mmc = dev_get_drvdata(dev);
 	struct mxcmci_host *host = mmc_priv(mmc);
@@ -1231,7 +1230,7 @@  static int mxcmci_suspend(struct device *dev)
 	return 0;
 }
 
-static int mxcmci_resume(struct device *dev)
+static int __maybe_unused mxcmci_resume(struct device *dev)
 {
 	struct mmc_host *mmc = dev_get_drvdata(dev);
 	struct mxcmci_host *host = mmc_priv(mmc);
@@ -1241,11 +1240,7 @@  static int mxcmci_resume(struct device *dev)
 	return 0;
 }
 
-static const struct dev_pm_ops mxcmci_pm_ops = {
-	.suspend	= mxcmci_suspend,
-	.resume		= mxcmci_resume,
-};
-#endif
+static SIMPLE_DEV_PM_OPS(mxcmci_pm_ops, mxcmci_suspend, mxcmci_resume);
 
 static struct platform_driver mxcmci_driver = {
 	.probe		= mxcmci_probe,
@@ -1254,9 +1249,7 @@  static struct platform_driver mxcmci_driver = {
 	.driver		= {
 		.name		= DRIVER_NAME,
 		.owner		= THIS_MODULE,
-#ifdef CONFIG_PM
 		.pm	= &mxcmci_pm_ops,
-#endif
 		.of_match_table	= mxcmci_of_match,
 	}
 };