summaryrefslogtreecommitdiffstats
path: root/drivers/xen/xenbus/xenbus_probe_frontend.c
diff options
context:
space:
mode:
authorKazuhiro SUZUKI <kaz@jp.fujitsu.com>2011-02-18 14:43:07 -0800
committerKonrad Rzeszutek Wilk <konrad.wilk@oracle.com>2011-03-16 13:06:29 -0400
commitc7853aea57d8e850b0979e7bdcbcabdcbbdd9e37 (patch)
tree2cfd0f35cdd1a115e672f78653b34fdced4bd251 /drivers/xen/xenbus/xenbus_probe_frontend.c
parent76ca07832842100b14a31ad8996dab7b0c28aa42 (diff)
xen: xenbus PM events support
Make xenbus frontend device subscribe to PM events to receive suspend/resume/freeze/thaw/restore notifications. Signed-off-by: Kenji Wakamiya <wkenji@jp.fujitsu.com> Signed-off-by: Kazuhiro Suzuki <kaz@jp.fujitsu.com> Signed-off-by: Shriram Rajagopalan <rshriram@cs.ubc.ca> Acked-by: Ian Campbell <ian.campbell@citrix.com> [shriram--minor mods and improved commit message] Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Diffstat (limited to 'drivers/xen/xenbus/xenbus_probe_frontend.c')
-rw-r--r--drivers/xen/xenbus/xenbus_probe_frontend.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/drivers/xen/xenbus/xenbus_probe_frontend.c b/drivers/xen/xenbus/xenbus_probe_frontend.c
index 5bcc2d6cf12..ea83999c02f 100644
--- a/drivers/xen/xenbus/xenbus_probe_frontend.c
+++ b/drivers/xen/xenbus/xenbus_probe_frontend.c
@@ -85,6 +85,12 @@ static struct device_attribute xenbus_frontend_dev_attrs[] = {
__ATTR_NULL
};
+static const struct dev_pm_ops xenbus_pm_ops = {
+ .suspend = xenbus_dev_suspend,
+ .resume = xenbus_dev_resume,
+ .thaw = xenbus_dev_cancel,
+};
+
static struct xen_bus_type xenbus_frontend = {
.root = "device",
.levels = 2, /* device/type/<id> */
@@ -100,8 +106,7 @@ static struct xen_bus_type xenbus_frontend = {
.shutdown = xenbus_dev_shutdown,
.dev_attrs = xenbus_frontend_dev_attrs,
- .suspend = xenbus_dev_suspend,
- .resume = xenbus_dev_resume,
+ .pm = &xenbus_pm_ops,
},
};