From: Ben Dooks <ben-Y5A6D6n0/KfQXOPxS62xeg@public.gmane.org>
To: spi-devel-general-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org
Cc: dbrownell-Rn4VEauK+AKRv+LV9MX5uipxlwaOVQ5f@public.gmane.org
Subject: [patch 5/6] spi_s3c24xx: use dev_pm_ops
Date: Tue, 28 Jul 2009 21:51:42 +0100 [thread overview]
Message-ID: <20090728205239.591586104@fluff.org> (raw)
In-Reply-To: 20090728205137.613851078@fluff.org
[-- Attachment #1: spi-use-pmops.patch --]
[-- Type: text/plain, Size: 2376 bytes --]
Change the spi_s3c24xx driver to use dev_pm_ops to avoid the
following warning during probe:
Platform driver 's3c2410-spi' needs updating - please use dev_pm_ops
Signed-off-by: Ben Dooks <ben-Y5A6D6n0/KfQXOPxS62xeg@public.gmane.org>
---
---
drivers/spi/spi_s3c24xx.c | 22 +++++++++++++---------
1 file changed, 13 insertions(+), 9 deletions(-)
Index: b/drivers/spi/spi_s3c24xx.c
===================================================================
--- a/drivers/spi/spi_s3c24xx.c 2009-07-28 15:20:16.000000000 +0100
+++ b/drivers/spi/spi_s3c24xx.c 2009-07-28 15:20:22.000000000 +0100
@@ -418,9 +418,9 @@ static int __exit s3c24xx_spi_remove(str
#ifdef CONFIG_PM
-static int s3c24xx_spi_suspend(struct platform_device *pdev, pm_message_t msg)
+static int s3c24xx_spi_suspend(struct device *dev)
{
- struct s3c24xx_spi *hw = platform_get_drvdata(pdev);
+ struct s3c24xx_spi *hw = platform_get_drvdata(to_platform_device(dev));
if (hw->pdata && hw->pdata->gpio_setup)
hw->pdata->gpio_setup(hw->pdata, 0);
@@ -429,27 +429,31 @@ static int s3c24xx_spi_suspend(struct pl
return 0;
}
-static int s3c24xx_spi_resume(struct platform_device *pdev)
+static int s3c24xx_spi_resume(struct device *dev)
{
- struct s3c24xx_spi *hw = platform_get_drvdata(pdev);
+ struct s3c24xx_spi *hw = platform_get_drvdata(to_platform_device(dev));
s3c24xx_spi_initialsetup(hw);
return 0;
}
+static struct dev_pm_ops s3c24xx_spi_pmops = {
+ .suspend = s3c24xx_spi_suspend,
+ .resume = s3c24xx_spi_resume,
+};
+
+#define S3C24XX_SPI_PMOPS &s3c24xx_spi_pmops
#else
-#define s3c24xx_spi_suspend NULL
-#define s3c24xx_spi_resume NULL
-#endif
+#define S3C24XX_SPI_PMOPS NULL
+#endif /* CONFIG_PM */
MODULE_ALIAS("platform:s3c2410-spi");
static struct platform_driver s3c24xx_spi_driver = {
.remove = __exit_p(s3c24xx_spi_remove),
- .suspend = s3c24xx_spi_suspend,
- .resume = s3c24xx_spi_resume,
.driver = {
.name = "s3c2410-spi",
.owner = THIS_MODULE,
+ .pm = S3C24XX_SPI_PMOPS,
},
};
--
------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
trial. Simplify your report design, integration and deployment - and focus on
what you do best, core application coding. Discover what's new with
Crystal Reports now. http://p.sf.net/sfu/bobj-july
next prev parent reply other threads:[~2009-07-28 20:51 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-07-28 20:51 [patch 0/6] 2.6.31-rc4 spi and spi_s3c24xx updates Ben Dooks
2009-07-28 20:51 ` [patch 1/6] spi: fix spelling of automatically in documentation Ben Dooks
2009-07-28 20:51 ` [patch 2/6] spi_s3c24xx: fix clock rate calculation Ben Dooks
2009-07-28 20:51 ` [patch 3/6] spi_s3c24xx; Fix transfer setup code Ben Dooks
2009-07-28 20:51 ` [patch 4/6] spi_s3c24xx: fix header includes Ben Dooks
2009-07-28 20:51 ` Ben Dooks [this message]
2009-07-28 20:51 ` [patch 6/6] spi_s3c24xx: cache device setup data Ben Dooks
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=20090728205239.591586104@fluff.org \
--to=ben-y5a6d6n0/kfqxopxs62xeg@public.gmane.org \
--cc=dbrownell-Rn4VEauK+AKRv+LV9MX5uipxlwaOVQ5f@public.gmane.org \
--cc=spi-devel-general-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.