I cannot compile asus_switcheroo anymore. I think it is linked to my upgrade to linux 3.2.
Here is the error:
/root/asus-switcheroo/asus-switcheroo.c:337:28: error: expected ')' before 'bool'
/root/asus-switcheroo/asus-switcheroo.c:338:32: error: expected ')' before string constant
/root/asus-switcheroo/asus-switcheroo.c:340:15: error: expected declaration specifiers or '...' before string constant
/root/asus-switcheroo/asus-switcheroo.c:341:20: error: expected declaration specifiers or '...' before string constant
/root/asus-switcheroo/asus-switcheroo.c:342:16: error: expected declaration specifiers or '...' before string constant
/root/asus-switcheroo/asus-switcheroo.c:343:16: error: expected declaration specifiers or '...' before string constant
make[2]: * [/root/asus-switcheroo/asus-switcheroo.o] Error 1
make[1]: * [module/root/asus-switcheroo] Error 2
make[1]: Leaving directory `/usr/src/linux-3.2.1-1-ARCH'
make: *\ [default] Error 2
I don't understand the cause of the problem. It seems to want to use a module_param prototype with only one parameter (the syntax error disappears when I put only the first parameter). But I can't find where this prototype would be declared, I can only find the 3 parameter variant in my include files.
Adding #include <linux/moduleparam.h> at the beginning of the includes makes this go away.
Then I have those:
/root/asus-switcheroo/asus-switcheroo.c:341:15: error: expected declaration specifiers or '...' before string constant
/root/asus-switcheroo/asus-switcheroo.c:342:20: error: expected declaration specifiers or '...' before string constant
/root/asus-switcheroo/asus-switcheroo.c:343:16: error: expected declaration specifiers or '...' before string constant
/root/asus-switcheroo/asus-switcheroo.c:344:16: error: expected declaration specifiers or '...' before string constant
This is solved by including <linux/module.h>, so the moduleparam.h is no longer necessary.
I had to do this in several files (i915_jprobe, nouveau_jprobe, byo_switcheroo).
Then everything compiled…
I don't know if something changed in the 3.2 kernel headers…
I cannot compile asus_switcheroo anymore. I think it is linked to my upgrade to linux 3.2.
Here is the error:
/root/asus-switcheroo/asus-switcheroo.c:337:28: error: expected ')' before 'bool' /root/asus-switcheroo/asus-switcheroo.c:338:32: error: expected ')' before string constant /root/asus-switcheroo/asus-switcheroo.c:340:15: error: expected declaration specifiers or '...' before string constant /root/asus-switcheroo/asus-switcheroo.c:341:20: error: expected declaration specifiers or '...' before string constant /root/asus-switcheroo/asus-switcheroo.c:342:16: error: expected declaration specifiers or '...' before string constant /root/asus-switcheroo/asus-switcheroo.c:343:16: error: expected declaration specifiers or '...' before string constant make[2]: * [/root/asus-switcheroo/asus-switcheroo.o] Error 1 make[1]: * [module/root/asus-switcheroo] Error 2 make[1]: Leaving directory `/usr/src/linux-3.2.1-1-ARCH' make: *\ [default] Error 2
I don't understand the cause of the problem. It seems to want to use a module_param prototype with only one parameter (the syntax error disappears when I put only the first parameter). But I can't find where this prototype would be declared, I can only find the 3 parameter variant in my include files.
Adding #include <linux/moduleparam.h> at the beginning of the includes makes this go away.
Then I have those: /root/asus-switcheroo/asus-switcheroo.c:341:15: error: expected declaration specifiers or '...' before string constant /root/asus-switcheroo/asus-switcheroo.c:342:20: error: expected declaration specifiers or '...' before string constant /root/asus-switcheroo/asus-switcheroo.c:343:16: error: expected declaration specifiers or '...' before string constant /root/asus-switcheroo/asus-switcheroo.c:344:16: error: expected declaration specifiers or '...' before string constant
This is solved by including <linux/module.h>, so the moduleparam.h is no longer necessary.
I had to do this in several files (i915_jprobe, nouveau_jprobe, byo_switcheroo).
Then everything compiled…
I don't know if something changed in the 3.2 kernel headers…