summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'x11-drivers/psb-kmod/files/psb-kmod-fix-backlight-device-register-2.6.34.patch')
-rw-r--r--x11-drivers/psb-kmod/files/psb-kmod-fix-backlight-device-register-2.6.34.patch22
1 files changed, 22 insertions, 0 deletions
diff --git a/x11-drivers/psb-kmod/files/psb-kmod-fix-backlight-device-register-2.6.34.patch b/x11-drivers/psb-kmod/files/psb-kmod-fix-backlight-device-register-2.6.34.patch
new file mode 100644
index 0000000..b5b8432
--- /dev/null
+++ b/x11-drivers/psb-kmod/files/psb-kmod-fix-backlight-device-register-2.6.34.patch
@@ -0,0 +1,22 @@
+Fix call to backlight_device_register() changed in kernel 2.6.34 by commit
+a19a6ee6cad2b20292a774c2f56ba8039b0fac9c .
+
+Signed-off-by: Éric Piel <eric.piel@tremplin-utc.net>
+
+--- intel_lvds.c.bak 2010-04-02 00:26:45.489008304 +0200
++++ intel_lvds.c 2010-04-02 00:40:51.530267983 +0200
+@@ -801,7 +801,14 @@
+
+ if ((blc_type == BLC_I2C_TYPE) || (blc_type == BLC_PWM_TYPE)){
+ /* add /sys/class/backlight interface as standard */
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,34)
++ struct backlight_properties props;
++ memset(&props, 0, sizeof(struct backlight_properties));
++ props.max_brightness = BRIGHTNESS_MAX_LEVEL;
++ psbbl_device = backlight_device_register("psblvds", &dev->pdev->dev, dev, &psbbl_ops, &props);
++#else
+ psbbl_device = backlight_device_register("psblvds", &dev->pdev->dev, dev, &psbbl_ops);
++#endif
+ if (psbbl_device){
+ #if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,20)
+ down(&psbbl_device->sem); \ No newline at end of file