From: Brian Norris <computersforpeace@gmail.com>
To: <linux-mtd@lists.infradead.org>
Cc: Ezequiel Garcia <ezequiel.garcia@free-electrons.com>,
Brian Norris <computersforpeace@gmail.com>
Subject: [PATCH 2/2] mtd: pxa3xx_nand: switch to device PM
Date: Mon, 12 Oct 2015 13:33:12 -0700 [thread overview]
Message-ID: <1444681992-4208-2-git-send-email-computersforpeace@gmail.com> (raw)
In-Reply-To: <1444681992-4208-1-git-send-email-computersforpeace@gmail.com>
The old PM model is deprecated. This is equivalent.
Signed-off-by: Brian Norris <computersforpeace@gmail.com>
---
drivers/mtd/nand/pxa3xx_nand.c | 16 +++++++++-------
1 file changed, 9 insertions(+), 7 deletions(-)
diff --git a/drivers/mtd/nand/pxa3xx_nand.c b/drivers/mtd/nand/pxa3xx_nand.c
index cce5a32eef60..e074a3b406f6 100644
--- a/drivers/mtd/nand/pxa3xx_nand.c
+++ b/drivers/mtd/nand/pxa3xx_nand.c
@@ -1889,21 +1889,21 @@ static int pxa3xx_nand_probe(struct platform_device *pdev)
}
#ifdef CONFIG_PM
-static int pxa3xx_nand_suspend(struct platform_device *pdev, pm_message_t state)
+static int pxa3xx_nand_suspend(struct device *dev)
{
- struct pxa3xx_nand_info *info = platform_get_drvdata(pdev);
+ struct pxa3xx_nand_info *info = dev_get_drvdata(dev);
if (info->state) {
- dev_err(&pdev->dev, "driver busy, state = %d\n", info->state);
+ dev_err(dev, "driver busy, state = %d\n", info->state);
return -EAGAIN;
}
return 0;
}
-static int pxa3xx_nand_resume(struct platform_device *pdev)
+static int pxa3xx_nand_resume(struct device *dev)
{
- struct pxa3xx_nand_info *info = platform_get_drvdata(pdev);
+ struct pxa3xx_nand_info *info = dev_get_drvdata(dev);
/* We don't want to handle interrupt without calling mtd routine */
disable_int(info, NDCR_INT_MASK);
@@ -1934,11 +1934,13 @@ static struct platform_driver pxa3xx_nand_driver = {
.driver = {
.name = "pxa3xx-nand",
.of_match_table = pxa3xx_nand_dt_ids,
+ .pm = {
+ .suspend = pxa3xx_nand_suspend,
+ .resume = pxa3xx_nand_resume,
+ },
},
.probe = pxa3xx_nand_probe,
.remove = pxa3xx_nand_remove,
- .suspend = pxa3xx_nand_suspend,
- .resume = pxa3xx_nand_resume,
};
module_platform_driver(pxa3xx_nand_driver);
--
2.6.0.rc2.230.g3dd15c0
next prev parent reply other threads:[~2015-10-12 20:33 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-10-12 20:33 [PATCH 1/2] mtd: pxa3xx_nand: don't duplicate MTD suspend/resume Brian Norris
2015-10-12 20:33 ` Brian Norris [this message]
2015-10-12 21:07 ` [PATCH 2/2] mtd: pxa3xx_nand: switch to device PM Brian Norris
2015-10-15 18:32 ` Ezequiel Garcia
2015-10-16 15:24 ` Ezequiel Garcia
2015-10-16 16:35 ` Brian Norris
2015-10-15 18:33 ` [PATCH 1/2] mtd: pxa3xx_nand: don't duplicate MTD suspend/resume Ezequiel Garcia
2015-10-16 15:26 ` Ezequiel Garcia
2015-10-16 16:37 ` Brian Norris
2015-10-16 16:50 ` Ezequiel Garcia
2015-10-20 19:33 ` Robert Jarzmik
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1444681992-4208-2-git-send-email-computersforpeace@gmail.com \
--to=computersforpeace@gmail.com \
--cc=ezequiel.garcia@free-electrons.com \
--cc=linux-mtd@lists.infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).