Skip to content

Commit

Permalink
xen: ifdef CONFIG_HIBERNATE_CALLBACKS xen_*_suspend
Browse files Browse the repository at this point in the history
xen_hvm_post_suspend, xen_pre_suspend, xen_post_suspend are only used if
CONFIG_HIBERNATE_CALLBACKS is defined, resulting in:

drivers/xen/manage.c:46:13: warning: ‘xen_hvm_post_suspend’ defined but not used [-Wunused-function]
drivers/xen/manage.c:52:13: warning: ‘xen_pre_suspend’ defined but not used [-Wunused-function]
drivers/xen/manage.c:59:13: warning: ‘xen_post_suspend’ defined but not used [-Wunused-function]

If the kernel config is missing CONFIG_HIBERNATE_CALLBACKS.

Simply ifdef CONFIG_HIBERNATE_CALLBACKS the three functions.

Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
  • Loading branch information
Stefano Stabellini authored and Konrad Rzeszutek Wilk committed Jun 28, 2013
1 parent 098b1ae commit 65e053a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/xen/manage.c
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ struct suspend_info {
void (*post)(int cancelled);
};

#ifdef CONFIG_HIBERNATE_CALLBACKS
static void xen_hvm_post_suspend(int cancelled)
{
xen_arch_hvm_post_suspend(cancelled);
Expand All @@ -63,7 +64,6 @@ static void xen_post_suspend(int cancelled)
xen_mm_unpin_all();
}

#ifdef CONFIG_HIBERNATE_CALLBACKS
static int xen_suspend(void *data)
{
struct suspend_info *si = data;
Expand Down

0 comments on commit 65e053a

Please sign in to comment.