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 mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id CA02DC4332F for ; Mon, 15 Nov 2021 18:47:43 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id B48BD63393 for ; Mon, 15 Nov 2021 18:47:43 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S242354AbhKOSuf (ORCPT ); Mon, 15 Nov 2021 13:50:35 -0500 Received: from mail.kernel.org ([198.145.29.99]:47376 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238229AbhKORfN (ORCPT ); Mon, 15 Nov 2021 12:35:13 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id 89F6360C4A; Mon, 15 Nov 2021 17:23:49 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1636997030; bh=G3DdGBAkQmHvWOxngKD3k38mY/FTETAuwwwHmu91kzk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=MIFaeQf94ejPr52GvNYz1L2GHxBwEYdjPTMn71vt+rG2kyxvlSZKv6HvYYu3FDrO9 pP88j6Uj1+ZDnqKD0SEuNV9Xb3I94A7l6GLSvlvuzDKb136pOlezAe6D2qKSPJh+qs tXY+w+wVzplz2JiD2E34lO/bbxrZHberjxqUgD9E= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Marek Vasut , =?UTF-8?q?Noralf=20Tr=C3=B8nnes?= , Daniel Thompson , Lee Jones Subject: [PATCH 5.4 349/355] video: backlight: Drop maximum brightness override for brightness zero Date: Mon, 15 Nov 2021 18:04:33 +0100 Message-Id: <20211115165325.041070657@linuxfoundation.org> X-Mailer: git-send-email 2.33.1 In-Reply-To: <20211115165313.549179499@linuxfoundation.org> References: <20211115165313.549179499@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Marek Vasut commit 33a5471f8da976bf271a1ebbd6b9d163cb0cb6aa upstream. The note in c2adda27d202f ("video: backlight: Add of_find_backlight helper in backlight.c") says that gpio-backlight uses brightness as power state. This has been fixed since in ec665b756e6f7 ("backlight: gpio-backlight: Correct initial power state handling") and other backlight drivers do not require this workaround. Drop the workaround. This fixes the case where e.g. pwm-backlight can perfectly well be set to brightness 0 on boot in DT, which without this patch leads to the display brightness to be max instead of off. Fixes: c2adda27d202f ("video: backlight: Add of_find_backlight helper in backlight.c") Cc: # 5.4+ Cc: # 4.19.x: ec665b756e6f7: backlight: gpio-backlight: Correct initial power state handling Signed-off-by: Marek Vasut Acked-by: Noralf Trønnes Reviewed-by: Daniel Thompson Signed-off-by: Lee Jones Signed-off-by: Greg Kroah-Hartman --- drivers/video/backlight/backlight.c | 6 ------ 1 file changed, 6 deletions(-) --- a/drivers/video/backlight/backlight.c +++ b/drivers/video/backlight/backlight.c @@ -630,12 +630,6 @@ struct backlight_device *of_find_backlig of_node_put(np); if (!bd) return ERR_PTR(-EPROBE_DEFER); - /* - * Note: gpio_backlight uses brightness as - * power state during probe - */ - if (!bd->props.brightness) - bd->props.brightness = bd->props.max_brightness; } }