From: Marek Vasut <marek.vasut@gmail.com>
To: alsa-devel@alsa-project.org
Cc: avorontsov@ru.mvista.com, Robert Jarzmik <robert.jarzmik@free.fr>,
linux-arm-kernel@lists.infradead.org,
Mark Brown <broonie@opensource.wolfsonmicro.com>
Subject: [PATCH] Convert WM97xx-battery to dev_pm_ops
Date: Sat, 22 Aug 2009 01:05:52 +0200 [thread overview]
Message-ID: <200908220105.52244.marek.vasut@gmail.com> (raw)
[-- Attachment #1: Type: Text/Plain, Size: 122 bytes --]
Hi,
Anton, are you fine with this one? Mark, in case Anton is ok, would you mind
applying? Thanks!
Cheers!
Marek Vasut
[-- Attachment #2: 0001-Convert-WM97xx-battery-to-dev_pm_ops.patch --]
[-- Type: text/x-patch, Size: 1721 bytes --]
From 90955155d905ac8222af37317379cb084ba850ea Mon Sep 17 00:00:00 2001
From: Marek Vasut <marek.vasut@gmail.com>
Date: Sat, 22 Aug 2009 00:36:43 +0200
Subject: [PATCH] Convert WM97xx-battery to dev_pm_ops
Signed-off-by: Marek Vasut <marek.vasut@gmail.com>
---
drivers/power/wm97xx_battery.c | 17 ++++++++++-------
1 files changed, 10 insertions(+), 7 deletions(-)
diff --git a/drivers/power/wm97xx_battery.c b/drivers/power/wm97xx_battery.c
index 98f2f37..af6d3cd 100644
--- a/drivers/power/wm97xx_battery.c
+++ b/drivers/power/wm97xx_battery.c
@@ -144,20 +144,22 @@ static irqreturn_t wm97xx_chrg_irq(int irq, void *data)
}
#ifdef CONFIG_PM
-static int wm97xx_bat_suspend(struct platform_device *dev, pm_message_t state)
+static int wm97xx_bat_suspend(struct device *dev)
{
flush_scheduled_work();
return 0;
}
-static int wm97xx_bat_resume(struct platform_device *dev)
+static int wm97xx_bat_resume(struct device *dev)
{
schedule_work(&bat_work);
return 0;
}
-#else
-#define wm97xx_bat_suspend NULL
-#define wm97xx_bat_resume NULL
+
+static const struct dev_pm_ops wm97xx_bat_pm_ops = {
+ .suspend = wm97xx_bat_suspend,
+ .resume = wm97xx_bat_resume,
+};
#endif
static int __devinit wm97xx_bat_probe(struct platform_device *dev)
@@ -273,11 +275,12 @@ static struct platform_driver wm97xx_bat_driver = {
.driver = {
.name = "wm97xx-battery",
.owner = THIS_MODULE,
+#ifdef CONFIG_PM
+ .pm = &wm97xx_bat_pm_ops,
+#endif
},
.probe = wm97xx_bat_probe,
.remove = __devexit_p(wm97xx_bat_remove),
- .suspend = wm97xx_bat_suspend,
- .resume = wm97xx_bat_resume,
};
static int __init wm97xx_bat_init(void)
--
1.6.3.3
[-- Attachment #3: Type: text/plain, Size: 160 bytes --]
_______________________________________________
Alsa-devel mailing list
Alsa-devel@alsa-project.org
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel
WARNING: multiple messages have this Message-ID (diff)
From: marek.vasut@gmail.com (Marek Vasut)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] Convert WM97xx-battery to dev_pm_ops
Date: Sat, 22 Aug 2009 01:05:52 +0200 [thread overview]
Message-ID: <200908220105.52244.marek.vasut@gmail.com> (raw)
Hi,
Anton, are you fine with this one? Mark, in case Anton is ok, would you mind
applying? Thanks!
Cheers!
Marek Vasut
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Convert-WM97xx-battery-to-dev_pm_ops.patch
Type: text/x-patch
Size: 1661 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20090822/10ad7529/attachment.bin>
next reply other threads:[~2009-08-21 23:06 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-08-21 23:05 Marek Vasut [this message]
2009-08-21 23:05 ` [PATCH] Convert WM97xx-battery to dev_pm_ops Marek Vasut
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=200908220105.52244.marek.vasut@gmail.com \
--to=marek.vasut@gmail.com \
--cc=alsa-devel@alsa-project.org \
--cc=avorontsov@ru.mvista.com \
--cc=broonie@opensource.wolfsonmicro.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=robert.jarzmik@free.fr \
/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.