Received: by 2002:a05:6a10:d5a5:0:0:0:0 with SMTP id gn37csp4065908pxb; Mon, 4 Oct 2021 16:37:40 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwRJUZBNqJLp0m8vIwEZzRF6w88GD/OqBbr0pM2K5V2BF25G6h6vCm2vsBDYPghV/R4GLwi X-Received: by 2002:a17:906:e4b:: with SMTP id q11mr20307470eji.234.1633390660132; Mon, 04 Oct 2021 16:37:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1633390660; cv=none; d=google.com; s=arc-20160816; b=tDu9tkfbUn+5l1PhzxN2x5AOgNWqQbkKiseRe5J99G69k2/nKwBdE83WZ88Pxb7V5z Q/q0WNayvbM8IFzUdU+CQ94tEVxZGbBokgbmoNG9CU/rBA9HL+4Qexr4sJinuKWgQn5T ARnP8BiWKfL+cd8ObO3IaM2jFDz8KCBxJ9p+B0yYa4rmsaR5U0trdtrsfrXJnIDhNYVG /ldDDUYxKoDDzMOwq5iqWd5YUud+ead/eQf41Gi6k+x45aUermpa/6QNGY85XBlZviGq oI2KqW7PGmkpFOW/M/rt5VMd9J7WWONKHuuocE1w1lFIimlA4bNCNNAljzhl3t1or+ab aFgQ== 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 :references:in-reply-to:message-id:date:subject:cc:to:from; bh=VcJpw/FP6BN7/FwWyJd91kxkT6wCisglF2tFrmXerD4=; b=D05oR3XqOAjweXd7lXOfBVJB46HqUVuBExxlUlW7M13Q9mQ6qEZ0+MrFNNSvEyy7A3 4Rc1uhgy2bOKyCocz9IrkV8HhwczTOC41LFktz2omG6bgZx8z9ltjSFTRRHXbm2++mif KhWoUJo/nQuAShdFd90CT8Nq6yp9XxbTL6JVljGh6OM5lPSxus0yY5T4Wuxu9+P5vhiN hs32iJqe98UxJv/2/RW3ot/37wE51B398tjh/sgUvKSg7BbTKO1RS+R1tjhq3hEjPMpF DbWYcrnNh5+zwjKNZQlVk+aTtOcJys0DNChlkvVEQMYfqlQrBa7KO5nE0AsAfXCy3M1t xmSg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id bh21si20406320ejb.428.2021.10.04.16.37.17; Mon, 04 Oct 2021 16:37:40 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239050AbhJDT3n (ORCPT + 99 others); Mon, 4 Oct 2021 15:29:43 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36594 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238950AbhJDT3i (ORCPT ); Mon, 4 Oct 2021 15:29:38 -0400 Received: from relay02.th.seeweb.it (relay02.th.seeweb.it [IPv6:2001:4b7a:2000:18::163]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1579DC061755; Mon, 4 Oct 2021 12:27:48 -0700 (PDT) Received: from Marijn-Arch-PC.localdomain (94-209-165-62.cable.dynamic.v4.ziggo.nl [94.209.165.62]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by m-r1.th.seeweb.it (Postfix) with ESMTPSA id B45481F690; Mon, 4 Oct 2021 21:27:45 +0200 (CEST) From: Marijn Suijten To: phone-devel@vger.kernel.org, Andy Gross , Bjorn Andersson , Lee Jones , Daniel Thompson , Jingoo Han Cc: ~postmarketos/upstreaming@lists.sr.ht, AngeloGioacchino Del Regno , Konrad Dybcio , Martin Botka , Jami Kettunen , Pavel Dubrova , Marijn Suijten , Kiran Gunda , Courtney Cavin , Bryan Wu , linux-arm-msm@vger.kernel.org, dri-devel@lists.freedesktop.org, linux-fbdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 03/10] backlight: qcom-wled: Override num-strings when enabled-strings is set Date: Mon, 4 Oct 2021 21:27:34 +0200 Message-Id: <20211004192741.621870-4-marijn.suijten@somainline.org> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20211004192741.621870-1-marijn.suijten@somainline.org> References: <20211004192741.621870-1-marijn.suijten@somainline.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org DT-bindings do not specify num-strings as mandatory property, yet it is required to be specified even if enabled-strings is used. The length of that property-array should already be enough to determine exactly which and how many strings to enable. Fixes: 775d2ffb4af6 ("backlight: qcom-wled: Restructure the driver for WLED3") Signed-off-by: Marijn Suijten Reviewed-by: AngeloGioacchino Del Regno --- drivers/video/backlight/qcom-wled.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/video/backlight/qcom-wled.c b/drivers/video/backlight/qcom-wled.c index 9927ed98944a..29910e603c42 100644 --- a/drivers/video/backlight/qcom-wled.c +++ b/drivers/video/backlight/qcom-wled.c @@ -1536,6 +1536,8 @@ static int wled_configure(struct wled *wled) string_len, rc); return -EINVAL; } + + cfg->num_strings = string_len; } return 0; -- 2.33.0