Message ID | 20230106164856.1453819-3-steve@sk2.org |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:4e01:0:0:0:0:0 with SMTP id p1csp1084226wrt; Fri, 6 Jan 2023 16:01:20 -0800 (PST) X-Google-Smtp-Source: AMrXdXsvjJdc4Y210Ugnsdv7zi5dnvCXVoIfNi5Q2NP1V2roykqaIDa5HvUPv7cj4GPEWmu/JNp9 X-Received: by 2002:a17:90a:5994:b0:226:ae12:444d with SMTP id l20-20020a17090a599400b00226ae12444dmr12001156pji.43.1673049679958; Fri, 06 Jan 2023 16:01:19 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1673049679; cv=none; d=google.com; s=arc-20160816; b=a5dO9X7Mn2bDn3PfGXT2S8+awIFmyepJfSNNsgbJSaFxmDp+1U+UlO9Y0pg6gBiDRG ZDL2UuPvHU3cDXaLS1nuZo/gUiE0NPWLa6aZO2M+E9RLkkU9z+nAduVugdan6zTAEY2u ppTPMz7XgEqcvl8Vp81PjyIihYMAMRToJHa5Vb2REIHZF4CFcacppSejIAD8SHmxAC/R OW10muu50WRMrLFWig3ctHvJO0WokmRCdajXM+oBos3hDbGrY5Jz0SYxbs8/KcTT2FdS Jh+Hrcv2iAyJr9D47XBnwTi5TGlbbgqzyp55HrqaT375pjnL8TZmPsrnICHwH3SjPsqu PdUw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=MQ96qZz3YLpiKAEhsqpjZCyVKVw55aOz2bvmrCPIhPo=; b=ow5OuFo3Ovz05Y1XDtgvNTm/Xc0831jCihtbI5reJ6ijXGVxEJNuQzVmvNOiHaKvBK Jc6+H4trAank7VTDnmFfpiX84ZHQEVtuUoxSjS0AooBjQjHEurpoQLX4L00eFa1SCtir tL0D9EsaftOOH8kwbFaRekiWtYSN5x2b8vElml5gdDWHMk++zHyxueS7mWYWUOzgE7SR /x03XkxmZu46/OYKHZzeQCNtupWHZ69jrgh2UaOcsq3dIBRiiBchL+RoDHBjzodhEDn1 uXfH+CH5Ew8bN7ySAz+OdAO/11d/UqH2dSCACfgKTXxPFDtMdDp/dUjm+b7uZwP7ZQ8L WGXQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id v135-20020a63618d000000b004acf6fb7c81si1317825pgb.4.2023.01.06.16.01.05; Fri, 06 Jan 2023 16:01:19 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236614AbjAGAAE (ORCPT <rfc822;ahmedalshaiji.dev@gmail.com> + 99 others); Fri, 6 Jan 2023 19:00:04 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57966 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236676AbjAFX72 (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Fri, 6 Jan 2023 18:59:28 -0500 X-Greylist: delayed 25756 seconds by postgrey-1.37 at lindbergh.monkeyblade.net; Fri, 06 Jan 2023 15:59:17 PST Received: from 20.mo584.mail-out.ovh.net (20.mo584.mail-out.ovh.net [46.105.33.73]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id AE4FB1BC9E for <linux-kernel@vger.kernel.org>; Fri, 6 Jan 2023 15:59:17 -0800 (PST) Received: from director9.ghost.mail-out.ovh.net (unknown [10.109.143.136]) by mo584.mail-out.ovh.net (Postfix) with ESMTP id AE40A23444 for <linux-kernel@vger.kernel.org>; Fri, 6 Jan 2023 16:49:59 +0000 (UTC) Received: from ghost-submission-6684bf9d7b-dkv5l (unknown [10.110.171.46]) by director9.ghost.mail-out.ovh.net (Postfix) with ESMTPS id 0C2171FE9B; Fri, 6 Jan 2023 16:49:59 +0000 (UTC) Received: from sk2.org ([37.59.142.107]) by ghost-submission-6684bf9d7b-dkv5l with ESMTPSA id eB+zADdRuGOnAQEAwhnnFg (envelope-from <steve@sk2.org>); Fri, 06 Jan 2023 16:49:59 +0000 Authentication-Results: garm.ovh; auth=pass (GARM-107S00109038e94-ae10-4a84-be5c-29fce71eaa6f, 9FE29456621203A27B372E1E0503D45BE0167874) smtp.auth=steve@sk2.org X-OVh-ClientIp: 82.65.25.201 From: Stephen Kitt <steve@sk2.org> To: Lee Jones <lee@kernel.org>, Daniel Thompson <daniel.thompson@linaro.org>, Jingoo Han <jingoohan1@gmail.com> Cc: Sam Ravnborg <sam@ravnborg.org>, Stephen Kitt <steve@sk2.org>, Helge Deller <deller@gmx.de>, dri-devel@lists.freedesktop.org, linux-fbdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH RESEND 2/4] backlight: arcxcnn: Use backlight helper Date: Fri, 6 Jan 2023 17:48:53 +0100 Message-Id: <20230106164856.1453819-3-steve@sk2.org> X-Mailer: git-send-email 2.30.2 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Ovh-Tracer-Id: 5852146243471509211 X-VR-SPAMSTATE: OK X-VR-SPAMSCORE: -100 X-VR-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgedvhedrkedtgdelhecutefuodetggdotefrodftvfcurfhrohhfihhlvgemucfqggfjpdevjffgvefmvefgnecuuegrihhlohhuthemucehtddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenucfjughrpefhvfevufffkffoggfgsedtkeertdertddtnecuhfhrohhmpefuthgvphhhvghnucfmihhtthcuoehsthgvvhgvsehskhdvrdhorhhgqeenucggtffrrghtthgvrhhnpeelgeetueejffejfeejvefhtddufeejgfetleegtddukeelieelvddvteduveejtdenucfkphepuddvjedrtddrtddruddpfeejrdehledrudegvddruddtjeenucevlhhushhtvghrufhiiigvpedvnecurfgrrhgrmhepihhnvghtpeduvdejrddtrddtrddupdhmrghilhhfrhhomhepoehsthgvvhgvsehskhdvrdhorhhgqedpnhgspghrtghpthhtohepuddprhgtphhtthhopehlihhnuhigqdhkvghrnhgvlhesvhhgvghrrdhkvghrnhgvlhdrohhrghdpoffvtefjohhsthepmhhoheekgedpmhhouggvpehsmhhtphhouhht X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL,SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1754296193092262787?= X-GMAIL-MSGID: =?utf-8?q?1754319741164125614?= |
Series |
[RESEND,1/4] backlight: aat2870: Use backlight helper
|
|
Commit Message
Stephen Kitt
Jan. 6, 2023, 4:48 p.m. UTC
Instead of retrieving the backlight brightness in struct
backlight_properties manually, and then checking whether the backlight
should be on at all, use backlight_get_brightness() which does all
this and insulates this from future changes.
Signed-off-by: Stephen Kitt <steve@sk2.org>
---
drivers/video/backlight/arcxcnn_bl.c | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)
Comments
On Fri, Jan 06, 2023 at 05:48:53PM +0100, Stephen Kitt wrote: > Instead of retrieving the backlight brightness in struct > backlight_properties manually, and then checking whether the backlight > should be on at all, use backlight_get_brightness() which does all > this and insulates this from future changes. > > Signed-off-by: Stephen Kitt <steve@sk2.org> For the tools: Reviewed-by: Daniel Thompson <daniel.thompson@linaro.org> D.
On Fri, 06 Jan 2023, Stephen Kitt wrote: > Instead of retrieving the backlight brightness in struct > backlight_properties manually, and then checking whether the backlight > should be on at all, use backlight_get_brightness() which does all > this and insulates this from future changes. > > Signed-off-by: Stephen Kitt <steve@sk2.org> > --- > drivers/video/backlight/arcxcnn_bl.c | 5 +---- > 1 file changed, 1 insertion(+), 4 deletions(-) Applied, thanks
diff --git a/drivers/video/backlight/arcxcnn_bl.c b/drivers/video/backlight/arcxcnn_bl.c index 555b036643fb..e610d7a1d13d 100644 --- a/drivers/video/backlight/arcxcnn_bl.c +++ b/drivers/video/backlight/arcxcnn_bl.c @@ -130,12 +130,9 @@ static int arcxcnn_set_brightness(struct arcxcnn *lp, u32 brightness) static int arcxcnn_bl_update_status(struct backlight_device *bl) { struct arcxcnn *lp = bl_get_data(bl); - u32 brightness = bl->props.brightness; + u32 brightness = backlight_get_brightness(bl); int ret; - if (bl->props.state & (BL_CORE_SUSPENDED | BL_CORE_FBBLANK)) - brightness = 0; - ret = arcxcnn_set_brightness(lp, brightness); if (ret) return ret;