From 7c61a54199de73c7c8745b867c9e4a59706de2c2 Mon Sep 17 00:00:00 2001 From: Maximilian Attems Date: Tue, 18 May 2010 14:03:19 +0000 Subject: [PATCH] add fedora patch for recent thinkpads svn path=/dists/trunk/linux-2.6/; revision=15740 --- debian/changelog | 1 + .../all/thinkpad-acpi-fix-backlight.patch | 60 +++++++++++++++++++ debian/patches/series/base | 1 + 3 files changed, 62 insertions(+) create mode 100644 debian/patches/bugfix/all/thinkpad-acpi-fix-backlight.patch diff --git a/debian/changelog b/debian/changelog index 1e93ede47..e2c096db5 100644 --- a/debian/changelog +++ b/debian/changelog @@ -17,6 +17,7 @@ linux-2.6 (2.6.34-1~experimental.1) UNRELEASED; urgency=low HID_NTRIG, HID_QUANTA, HID_STANTUM, HID_WACOM, USB_SERIAL_QCAUX, USB_SERIAL_VIVOPAY_SERIAL, MMC_RICOH_MMC, LEDS_DELL_NETBOOKS, LOGFS. * [x86] Enable EEEPC_WMI. + * Fix backlight support on some recent Thinkpads. [ Ben Hutchings ] * Prepare debconf templates for translation (Closes: #576758) diff --git a/debian/patches/bugfix/all/thinkpad-acpi-fix-backlight.patch b/debian/patches/bugfix/all/thinkpad-acpi-fix-backlight.patch new file mode 100644 index 000000000..0c74bbfe4 --- /dev/null +++ b/debian/patches/bugfix/all/thinkpad-acpi-fix-backlight.patch @@ -0,0 +1,60 @@ +From: Matthew Garrett +Date: Mon May 17 20:38:21 2010 UTC +Subject: Fix backlight support on some recent Thinkpads + +diff -up linux-2.6.34.noarch/drivers/platform/x86/thinkpad_acpi.c.orig linux-2.6.34.noarch/drivers/platform/x86/thinkpad_acpi.c +--- linux-2.6.34.noarch/drivers/platform/x86/thinkpad_acpi.c.orig 2010-05-17 16:28:13.254200070 -0400 ++++ linux-2.6.34.noarch/drivers/platform/x86/thinkpad_acpi.c 2010-05-17 16:29:56.471200083 -0400 +@@ -3397,7 +3397,7 @@ static int __init hotkey_init(struct ibm + /* update bright_acpimode... */ + tpacpi_check_std_acpi_brightness_support(); + +- if (tp_features.bright_acpimode && acpi_video_backlight_support()) { ++ if (acpi_video_backlight_support()) { + printk(TPACPI_INFO + "This ThinkPad has standard ACPI backlight " + "brightness control, supported by the ACPI " +@@ -6189,26 +6189,24 @@ static int __init brightness_init(struct + * going to publish a backlight interface + */ + b = tpacpi_check_std_acpi_brightness_support(); +- if (b > 0) { + +- if (acpi_video_backlight_support()) { +- if (brightness_enable > 1) { +- printk(TPACPI_NOTICE +- "Standard ACPI backlight interface " +- "available, not loading native one.\n"); +- return 1; +- } else if (brightness_enable == 1) { +- printk(TPACPI_NOTICE +- "Backlight control force enabled, even if standard " +- "ACPI backlight interface is available\n"); +- } +- } else { +- if (brightness_enable > 1) { +- printk(TPACPI_NOTICE +- "Standard ACPI backlight interface not " +- "available, thinkpad_acpi native " +- "brightness control enabled\n"); +- } ++ if (acpi_video_backlight_support()) { ++ if (brightness_enable > 1) { ++ printk(TPACPI_NOTICE ++ "Standard ACPI backlight interface " ++ "available, not loading native one.\n"); ++ return 1; ++ } else if (brightness_enable == 1) { ++ printk(TPACPI_NOTICE ++ "Backlight control force enabled, even if standard " ++ "ACPI backlight interface is available\n"); ++ } ++ } else { ++ if (brightness_enable > 1) { ++ printk(TPACPI_NOTICE ++ "Standard ACPI backlight interface not " ++ "available, thinkpad_acpi native " ++ "brightness control enabled\n"); + } + } + diff --git a/debian/patches/series/base b/debian/patches/series/base index b410495dc..a8d0e4a9e 100644 --- a/debian/patches/series/base +++ b/debian/patches/series/base @@ -70,3 +70,4 @@ + bugfix/all/3c503-Fix-IRQ-probing.patch + bugfix/x86/sis-agp-Remove-SIS-760-handled-by-amd64-agp.patch + bugfix/x86/amd64-agp-Probe-unknown-AGP-devices-the-right-way.patch ++ bugfix/all/thinkpad-acpi-fix-backlight.patch