linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] isa: Change driver to use dev_pm_ops infrastructure
@ 2013-08-10 15:20 Shuah Khan
  2013-08-10 15:20 ` [PATCH] mmc:au1xmmc change " Shuah Khan
                   ` (8 more replies)
  0 siblings, 9 replies; 14+ messages in thread
From: Shuah Khan @ 2013-08-10 15:20 UTC (permalink / raw)
  To: gregkh; +Cc: Shuah Khan, linux-kernel, shuahkhan

Change isa bus to register dev_pm_ops via bus_type.pm. Add freeze ops for
PM_EVENT_FREEZE handling.

Signed-off-by: Shuah Khan <shuah.kh@samsung.com>
---
 drivers/base/isa.c |   21 ++++++++++++++++++---
 1 file changed, 18 insertions(+), 3 deletions(-)

diff --git a/drivers/base/isa.c b/drivers/base/isa.c
index 91dba65..0f5943f 100644
--- a/drivers/base/isa.c
+++ b/drivers/base/isa.c
@@ -63,7 +63,7 @@ static void isa_bus_shutdown(struct device *dev)
 		isa_driver->shutdown(dev, to_isa_dev(dev)->id);
 }
 
-static int isa_bus_suspend(struct device *dev, pm_message_t state)
+static int __isa_bus_suspend(struct device *dev, pm_message_t state)
 {
 	struct isa_driver *isa_driver = dev->platform_data;
 
@@ -73,6 +73,16 @@ static int isa_bus_suspend(struct device *dev, pm_message_t state)
 	return 0;
 }
 
+static int isa_bus_suspend(struct device *dev)
+{
+	return __isa_bus_suspend(dev, PMSG_SUSPEND);
+}
+
+static int isa_bus_freeze(struct device *dev)
+{
+	return __isa_bus_suspend(dev, PMSG_FREEZE);
+}
+
 static int isa_bus_resume(struct device *dev)
 {
 	struct isa_driver *isa_driver = dev->platform_data;
@@ -83,14 +93,19 @@ static int isa_bus_resume(struct device *dev)
 	return 0;
 }
 
+static const struct dev_pm_ops isa_bus_dev_pm_ops = {
+	.suspend = isa_bus_suspend,
+	.freeze = isa_bus_freeze,
+	.resume = isa_bus_resume,
+};
+
 static struct bus_type isa_bus_type = {
 	.name		= "isa",
 	.match		= isa_bus_match,
 	.probe		= isa_bus_probe,
 	.remove		= isa_bus_remove,
 	.shutdown	= isa_bus_shutdown,
-	.suspend	= isa_bus_suspend,
-	.resume		= isa_bus_resume
+	.pm		= &isa_bus_dev_pm_ops,
 };
 
 static void isa_dev_release(struct device *dev)
-- 
1.7.10.4


^ permalink raw reply related	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2013-08-26  8:48 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-08-10 15:20 [PATCH] isa: Change driver to use dev_pm_ops infrastructure Shuah Khan
2013-08-10 15:20 ` [PATCH] mmc:au1xmmc change " Shuah Khan
2013-08-10 15:20 ` [PATCH] mmc:bfin_sdh " Shuah Khan
2013-08-12  2:33   ` Zhang, Sonic
2013-08-10 15:20 ` [PATCH] mmc:bfin_sdh fix build warning in sdh_dma_irq() Shuah Khan
2013-08-12  2:32   ` Zhang, Sonic
2013-08-10 15:20 ` [PATCH] mmc:cb710_mmc change driver to use dev_pm_ops infrastructure Shuah Khan
2013-08-10 15:20 ` [PATCH] mmc:msmsdcc " Shuah Khan
2013-08-10 15:20 ` [PATCH] mmc:mvsdio " Shuah Khan
2013-08-10 15:20 ` [PATCH] mmc:rtsx_pci_sdmmc " Shuah Khan
2013-08-10 15:20 ` [PATCH] mmc:tmio_mmc " Shuah Khan
2013-08-26  8:48   ` Guennadi Liakhovetski
2013-08-10 18:52 ` [PATCH] isa: Change " Greg KH
2013-08-12 17:02   ` Shuah Khan

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).