[PATCH] toi-fixes-3.16: fix resume_file undefined error

Oleksandr Natalenko <[email protected]> Sat, 06 Sep 2014 14:38:29 +0300
Newsgroups gmane.linux.swsusp.devel,gmane.linux.swsusp.general
Message-ID <2341339.TCFphf8s6n@spock>
This is a multi-part message in MIME format.

--nextPart1929259.fyCgTXzvhZ
Content-Transfer-Encoding: 7Bit
Content-Type: text/plain; charset="us-ascii"

If TOI parts are compiled as modules:
 
===
CONFIG_TOI_CORE=y
CONFIG_TOI_FILE=m
CONFIG_TOI_SWAP=m
CONFIG_TOI_CRYPTO=m
CONFIG_TOI_USERUI=m
===
 
we get the following error:
 
===
ERROR: "resume_file" [kernel/power/tuxonice_file.ko] undefined!
ERROR: "resume_file" [kernel/power/tuxonice_bio.ko] undefined!
scripts/Makefile.modpost:90: recipe for target '__modpost' failed
make[1]: *** [__modpost] Error 1
===
 
So just export resume_file variable from hibernate.c to fix the issue.

This patch also can be fetched via gists [1] or from my pf-kernel tree [2].

[1] https://gist.github.com/pfactum/84ef6292e088a11b1823
[2] https://github.com/pfactum/pf-kernel/commit/899119c90268a6043862a0781134f68444681de1


-- 
Oleksandr post-factum Natalenko, MSc
pf-kernel community
https://natalenko.name/
--nextPart1929259.fyCgTXzvhZ
Content-Disposition: attachment; filename="0001-toi-fixes-3.16-fix-resume_file-undefined-error.patch"
Content-Transfer-Encoding: 7Bit
Content-Type: text/x-patch; charset="UTF-8"; name="0001-toi-fixes-3.16-fix-resume_file-undefined-error.patch"

From 1f3d7d9bb866b455a11c1e26bbc871304660612a Mon Sep 17 00:00:00 2001
From: Oleksandr Natalenko <[email protected]>
Date: Sat, 6 Sep 2014 14:25:43 +0300
Subject: [PATCH] toi-fixes-3.16: fix resume_file undefined error

If TOI parts are compiled as modules:

===
CONFIG_TOI_CORE=y
CONFIG_TOI_FILE=m
CONFIG_TOI_SWAP=m
CONFIG_TOI_CRYPTO=m
CONFIG_TOI_USERUI=m
===

we get the following error:

===
ERROR: "resume_file" [kernel/power/tuxonice_file.ko] undefined!
ERROR: "resume_file" [kernel/power/tuxonice_bio.ko] undefined!
scripts/Makefile.modpost:90: recipe for target '__modpost' failed
make[1]: *** [__modpost] Error 1
===

So just export resume_file variable from hibernate.c to fix the issue.

Reported-by: Thaodan <[email protected]>
---
 kernel/power/hibernate.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/kernel/power/hibernate.c b/kernel/power/hibernate.c
index 4902e4e..c751688 100644
--- a/kernel/power/hibernate.c
+++ b/kernel/power/hibernate.c
@@ -39,6 +39,7 @@ static int nohibernate;
 static int resume_wait;
 static unsigned int resume_delay;
 char resume_file[256] = CONFIG_PM_STD_PARTITION;
+EXPORT_SYMBOL_GPL(resume_file);
 dev_t swsusp_resume_device;
 sector_t swsusp_resume_block;
 __visible int in_suspend __nosavedata;
-- 
2.1.0


--nextPart1929259.fyCgTXzvhZ
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

_______________________________________________
TuxOnIce-devel mailing list
[email protected]
http://lists.tuxonice.net/listinfo/tuxonice-devel
--nextPart1929259.fyCgTXzvhZ--