summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--drivers/xen/grant-table.c3
-rw-r--r--include/xen/grant_table.h12
2 files changed, 14 insertions, 1 deletions
diff --git a/drivers/xen/grant-table.c b/drivers/xen/grant-table.c
index 97e27f754d39..a6abf1ccd54c 100644
--- a/drivers/xen/grant-table.c
+++ b/drivers/xen/grant-table.c
@@ -1579,7 +1579,7 @@ static int gnttab_setup(void)
}
return gnttab_map(0, nr_grant_frames - 1);
}
-
+#ifdef CONFIG_HIBERNATE_CALLBACKS
int gnttab_resume(void)
{
gnttab_request_version();
@@ -1592,6 +1592,7 @@ int gnttab_suspend(void)
gnttab_interface->unmap_frames();
return 0;
}
+#endif
static int gnttab_expand(unsigned int req_entries)
{
diff --git a/include/xen/grant_table.h b/include/xen/grant_table.h
index 69ac6d80a006..a33a60a2ea72 100644
--- a/include/xen/grant_table.h
+++ b/include/xen/grant_table.h
@@ -84,8 +84,20 @@ struct gntab_unmap_queue_data
};
int gnttab_init(void);
+#ifdef CONFIG_HIBERNATE_CALLBACKS
int gnttab_suspend(void);
int gnttab_resume(void);
+#else
+static inline int gnttab_suspend(void)
+{
+ return 0;
+}
+
+static inline int gnttab_resume(void)
+{
+ return 0;
+}
+#endif
int gnttab_grant_foreign_access(domid_t domid, unsigned long frame,
int readonly);