View Single Post
Old 01-19-12, 07:09 PM   #145
chenxiaolong
Registered User
 
Join Date: Jan 2012
Posts: 1
Default Re: Linux backlight driver

Quote:
Originally Posted by lonestar_italy View Post
hi

nvidia_bl v0.71 doesn't compile against kernel 3.2.0:


make -C /lib/modules/3.2.0/build M=/usr/src/nvidiabl/nvidiabl modules
make[1]: Entering directory `/usr/src/linux-3.2'
CC [M] /usr/src/nvidiabl/nvidiabl/nvidiabl-module.o
/usr/src/nvidiabl/nvidiabl/nvidiabl-module.c:37:3: warning: #warning USE_BACKLIGHT_SUSPEND
CC [M] /usr/src/nvidiabl/nvidiabl/nvidiabl-models.o
/usr/src/nvidiabl/nvidiabl/nvidiabl-models.c:214:41: error: expected ) before numeric constant
/usr/src/nvidiabl/nvidiabl/nvidiabl-models.c:215:25: error: expected ) before string constant
make[2]: *** [/usr/src/nvidiabl/nvidiabl/nvidiabl-models.o] Errore 1
make[1]: *** [_module_/usr/src/nvidiabl/nvidiabl] Errore 2
make[1]: Leaving directory `/usr/src/linux-3.2'
make: *** [modules] Errore 2

I think syntax of module_param_named and MODULE_PARM_DESC are changed, but I don't know because I'm not a programmer.
any patch available?
The syntax wan't changed, it just needs the /usr/src/linux-$(uname -r)/include/linux/moduleparam.h file to be explicitly included I've pushed a fix to my github fork of nvidiabl (https://github.com/chenxiaolong/nvidiabl). You're welcome to compile from my git repo or apply the patch to the original source.

A copy of the patch:

Code:
From ed26f84824aad1efe9616477a63fe857c7971fa1 Mon Sep 17 00:00:00 2001
From: Xiao-Long Chen <chenxiaolong@cxl.epac.to>
Date: Thu, 19 Jan 2012 19:53:30 -0500
Subject: [PATCH] Fix build with Kernel 3.2

---
 nvidiabl-types.h |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/nvidiabl-types.h b/nvidiabl-types.h
index 571bd44..c63572e 100644
--- a/nvidiabl-types.h
+++ b/nvidiabl-types.h
@@ -18,6 +18,7 @@
 
 #include <linux/pci.h>
 #include <linux/fb.h>
+#include <linux/moduleparam.h>
 
 #define NVIDIABL_STR_1(s) #s
 #define NVIDIABL_STR(s) NVIDIABL_STR_1(s)
@@ -94,4 +95,4 @@ typedef struct {
         (kernel_ulong_t)&algorithm \
     }
 
-#endif
\ No newline at end of file
+#endif
-- 
1.7.8.4
chenxiaolong is offline   Reply With Quote