From patchwork Thu Jan 14 08:41:48 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hans de Goede X-Patchwork-Id: 8030671 Return-Path: X-Original-To: patchwork-platform-driver-x86@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 169CDBEEE5 for ; Thu, 14 Jan 2016 08:42:15 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 4B4902044B for ; Thu, 14 Jan 2016 08:42:14 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 66B8920490 for ; Thu, 14 Jan 2016 08:42:13 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752218AbcANImM (ORCPT ); Thu, 14 Jan 2016 03:42:12 -0500 Received: from mx1.redhat.com ([209.132.183.28]:58431 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751125AbcANImM (ORCPT ); Thu, 14 Jan 2016 03:42:12 -0500 Received: from int-mx14.intmail.prod.int.phx2.redhat.com (int-mx14.intmail.prod.int.phx2.redhat.com [10.5.11.27]) by mx1.redhat.com (Postfix) with ESMTPS id 0031F19F255; Thu, 14 Jan 2016 08:42:11 +0000 (UTC) Received: from shalem.localdomain.com (vpn1-4-214.ams2.redhat.com [10.36.4.214]) by int-mx14.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id u0E8fpOC028469; Thu, 14 Jan 2016 03:42:07 -0500 From: Hans de Goede To: Darren Hart , Henrique de Moraes Holschuh , "Rafael J. Wysocki" Cc: platform-driver-x86@vger.kernel.org, ibm-acpi-devel@lists.sourceforge.net, Adrien Schildknecht , Zhang Rui , Len Brown , linux-acpi@vger.kernel.org, Hans de Goede Subject: [PATCH 4/4] Revert "thinkpad_acpi: Use acpi_video_handles_brightness_key_presses()" Date: Thu, 14 Jan 2016 09:41:48 +0100 Message-Id: <1452760908-15965-4-git-send-email-hdegoede@redhat.com> In-Reply-To: <1452760908-15965-1-git-send-email-hdegoede@redhat.com> References: <1452760908-15965-1-git-send-email-hdegoede@redhat.com> X-Scanned-By: MIMEDefang 2.68 on 10.5.11.27 Sender: platform-driver-x86-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: platform-driver-x86@vger.kernel.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP acpi_video_handles_brightness_key_presses()'s may return false if the i915 driver is not loaded yet when thinkpad_acpi loads, and then return true after the i915 driver has loaded. This means that thinkpad_acpi cannot use it as is since thinkpad_acpi caches the return value. This reverts commit 7714687a2b2d ("thinkpad_acpi: Use acpi_video_handles_brightness_key_presses()"). Signed-off-by: Hans de Goede Acked-by: Darren Hart Acked-by: Henrique de Moraes Holschuh --- drivers/platform/x86/thinkpad_acpi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/platform/x86/thinkpad_acpi.c b/drivers/platform/x86/thinkpad_acpi.c index f453d5d..0bed473 100644 --- a/drivers/platform/x86/thinkpad_acpi.c +++ b/drivers/platform/x86/thinkpad_acpi.c @@ -3488,7 +3488,7 @@ static int __init hotkey_init(struct ibm_init_struct *iibm) /* Do not issue duplicate brightness change events to * userspace. tpacpi_detect_brightness_capabilities() must have * been called before this point */ - if (acpi_video_handles_brightness_key_presses()) { + if (acpi_video_get_backlight_type() != acpi_backlight_vendor) { pr_info("This ThinkPad has standard ACPI backlight " "brightness control, supported by the ACPI " "video driver\n");