From patchwork Mon Oct 24 11:35:08 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Akihiko Odaki X-Patchwork-Id: 13017614 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id A149BC38A2D for ; Mon, 24 Oct 2022 13:24:10 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 2228210E6EC; Mon, 24 Oct 2022 13:23:44 +0000 (UTC) Received: from mail-oa1-x2a.google.com (mail-oa1-x2a.google.com [IPv6:2001:4860:4864:20::2a]) by gabe.freedesktop.org (Postfix) with ESMTPS id 0839910E399 for ; Mon, 24 Oct 2022 11:39:42 +0000 (UTC) Received: by mail-oa1-x2a.google.com with SMTP id 586e51a60fabf-132fb4fd495so11443234fac.12 for ; Mon, 24 Oct 2022 04:39:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=daynix-com.20210112.gappssmtp.com; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=aZbgIVSQ8XgPbVH9Q8Dsp65eLaVcafrOLYAAqQNA3Ms=; b=svkp4e3b3SUT9ftxU+ZLPImVGkrLdjZmAyL4NTDy8zBkyhJo1e5stHvrAz9NnYp+CP AJCGi7A9ny35dbEocVhIsAphKsiD9jZ63/JsrAZueG69IuE95V0TJ6aCnZ+DlNNn13Lm 831reFgJM1LtLUpK9rtNkyvUYZDd26w6QRWfhKIvwmBIQcQJmYTS+V4i6U7+Z4Lpc4d3 s0vv4ZqyrCx4Ys2lKyq0BeBUhRZCS490rmEtluTEKpS152uos0ylqsE7d3kzUq0kQqND becInYrHn+JiAKLdk4p+qnOcD5r2SuDSv8VLrjEkovHL0yMYiNLipQex+iGsarVfust+ Uvsg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=aZbgIVSQ8XgPbVH9Q8Dsp65eLaVcafrOLYAAqQNA3Ms=; b=ACJNy/7s0+p4qYgky4IxKYVa/HRfG6ELH0sbpgNoS2rEKFCUtHAPWS27WKyXsLqN0N R1iFfPqVaUsedYdG44Eknoq0tf8x4CF+AvoZ2QdpTNcE3C0jNNeRdhqjd6HpNJdKcKnQ D+NbYdsyNUlOdgQl/2y5RgReaHijaJari3/oJ7RhQqv0182RoNCHOCVhOgH0rOamZ/KQ kBNjB52OT0EJhe4LwGLxmAqenmBvqJX5bHmM5/FQ9m+jQa3ZwVfdKshotm+VPykS8kNn 1qzqQ7qe1mZ4HIYVFZ25kpP25xAx6uE+fzznd5sgDqKUPRjP4WSUlZ1pXM0k2qvLQovG TpMw== X-Gm-Message-State: ACrzQf2jE9+KRz/0xDeY9UzkvbwdjpAkPnCD3oRMk9Uc+vjXaneFUfNN epR53rwAyVhA4sHipxdDVAuUEy8uMlsOo2bY X-Google-Smtp-Source: AMsMyM4RUBGzO3rLlIoesY9MV9xSVNvjZ7XRsAYwgRf2MzR+vsTZOlvX93IbLwXDaavbHv/ooxaUtA== X-Received: by 2002:a17:90a:6405:b0:203:6eaa:4999 with SMTP id g5-20020a17090a640500b002036eaa4999mr73460182pjj.8.1666611484014; Mon, 24 Oct 2022 04:38:04 -0700 (PDT) Received: from fedora.flets-east.jp ([2400:4050:c360:8200:8ae8:3c4:c0da:7419]) by smtp.gmail.com with ESMTPSA id b8-20020a170903228800b001830ed575c3sm19475075plh.117.2022.10.24.04.37.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 24 Oct 2022 04:38:03 -0700 (PDT) From: Akihiko Odaki To: Date: Mon, 24 Oct 2022 20:35:08 +0900 Message-Id: <20221024113513.5205-18-akihiko.odaki@daynix.com> X-Mailer: git-send-email 2.37.3 In-Reply-To: <20221024113513.5205-1-akihiko.odaki@daynix.com> References: <20221024113513.5205-1-akihiko.odaki@daynix.com> MIME-Version: 1.0 X-Mailman-Approved-At: Mon, 24 Oct 2022 13:23:26 +0000 Subject: [Intel-gfx] [PATCH 17/22] platform/x86: thinkpad_acpi: Use acpi_video_get_backlight_types() X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-fbdev@vger.kernel.org, Ike Panhc , "Rafael J. Wysocki" , dri-devel@lists.freedesktop.org, Azael Avalos , Mattia Dongili , Daniel Dadap , Henrique de Moraes Holschuh , Akihiko Odaki , David Airlie , Daniel Thompson , Jonathan Woithe , Jonathan Corbet , "Lee, Chun-Yi" , Helge Deller , Lee Jones , Robert Moore , linux-acpi@vger.kernel.org, Cezary Jackiewicz , Len Brown , Kenneth Chan , Corentin Chary , intel-gfx@lists.freedesktop.org, acpi4asus-user@lists.sourceforge.net, Maxime Ripard , Mark Gross , Hans de Goede , Rodrigo Vivi , Daniel Vetter , platform-driver-x86@vger.kernel.org, devel@acpica.org, ibm-acpi-devel@lists.sourceforge.net, Jingoo Han , linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, Thomas Zimmermann , =?utf-8?q?Pali_Roh=C3=A1r?= Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" acpi_video_get_backlight_type() is now deprecated. Signed-off-by: Akihiko Odaki --- drivers/platform/x86/thinkpad_acpi.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/platform/x86/thinkpad_acpi.c b/drivers/platform/x86/thinkpad_acpi.c index 6a823b850a77..d756d2ce54d1 100644 --- a/drivers/platform/x86/thinkpad_acpi.c +++ b/drivers/platform/x86/thinkpad_acpi.c @@ -3547,7 +3547,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_get_backlight_type() != acpi_backlight_vendor) { + if (!(acpi_video_get_backlight_types() & ACPI_BACKLIGHT_VENDOR)) { pr_info("This ThinkPad has standard ACPI backlight brightness control, supported by the ACPI video driver\n"); pr_notice("Disabling thinkpad-acpi brightness events by default...\n"); @@ -6983,7 +6983,7 @@ static int __init brightness_init(struct ibm_init_struct *iibm) return -ENODEV; } - if (acpi_video_get_backlight_type() != acpi_backlight_vendor) { + if (!(acpi_video_get_backlight_types() & ACPI_BACKLIGHT_VENDOR)) { if (brightness_enable > 1) { pr_info("Standard ACPI backlight interface available, not loading native one\n"); return -ENODEV;