[ltp] tp-smapi module dkms install error with grsecurity patched
kernel
Evgeni Golov
linux-thinkpad@linux-thinkpad.org
Sat, 16 Jul 2016 13:24:11 +0200
Hi Sean,
On Sat, Jul 16, 2016 at 01:47:02AM -0400, Sean Behan wrote:
> /var/lib/dkms/tp_smapi-dkms/0.42/build/hdaps.c:738:33: error: constified variable ‘hdaps_whitelist’ placed into writable section ".init.data"
> struct dmi_system_id __initdata hdaps_whitelist[] = {
Can you try the following patch please?
--- a/hdaps.c
+++ b/hdaps.c
@@ -735,7 +735,7 @@ static int __init hdaps_dmi_match_invert(const struct dmi_system_id *id)
Note that HDAPS_DMI_MATCH_NORMAL("ThinkPad T42") would match
"ThinkPad T42p", and enumeration stops after first match,
so the order of the entries matters. */
-struct dmi_system_id __initdata hdaps_whitelist[] = {
+struct dmi_system_id __initconst hdaps_whitelist[] = {
HDAPS_DMI_MATCH_INVERT("IBM", "ThinkPad R50p", HDAPS_ORIENT_INVERT_XY),
HDAPS_DMI_MATCH_INVERT("IBM", "ThinkPad R60", HDAPS_ORIENT_INVERT_XY),
HDAPS_DMI_MATCH_INVERT("IBM", "ThinkPad T41p", HDAPS_ORIENT_INVERT_XY),
Basically just change __initdata to __initconst.
Greets
Evgeni