From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id B62B82108 for ; Mon, 24 Apr 2023 13:34:27 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 3D8D1C4339B; Mon, 24 Apr 2023 13:34:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1682343267; bh=5tFhIybJQJN0Hb94BP2kJXGPvNh37fAzfNZ0oKQzSOA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Ee3CAh0OGYt0MNFMQ686qYohaGFXVvbeFe7lrHZnxaEidTHilpe+g0sRw9hBCOvIZ Yk9XMjVhMUuF/HS2Tdy1GFpuTvwkVZ9y612RzMCRnX6lPFTcx6dxUKE/dwnpAf4p7x 3k89Cs0mV1+EAHKn8mbXE9yesVWRvqOmHcbf9y+U= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Tom Rix , Brian Masney , Stable@vger.kernel.org, Jonathan Cameron Subject: [PATCH 5.10 30/68] iio: light: tsl2772: fix reading proximity-diodes from device tree Date: Mon, 24 Apr 2023 15:18:01 +0200 Message-Id: <20230424131128.799794118@linuxfoundation.org> X-Mailer: git-send-email 2.40.0 In-Reply-To: <20230424131127.653885914@linuxfoundation.org> References: <20230424131127.653885914@linuxfoundation.org> User-Agent: quilt/0.67 Precedence: bulk X-Mailing-List: patches@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit From: Brian Masney commit b1cb00d51e361cf5af93649917d9790e1623647e upstream. tsl2772_read_prox_diodes() will correctly parse the properties from device tree to determine which proximity diode(s) to read from, however it didn't actually set this value on the struct tsl2772_settings. Let's go ahead and fix that. Reported-by: Tom Rix Link: https://lore.kernel.org/lkml/20230327120823.1369700-1-trix@redhat.com/ Fixes: 94cd1113aaa0 ("iio: tsl2772: add support for reading proximity led settings from device tree") Signed-off-by: Brian Masney Link: https://lore.kernel.org/r/20230404011455.339454-1-bmasney@redhat.com Cc: Signed-off-by: Jonathan Cameron Signed-off-by: Greg Kroah-Hartman --- drivers/iio/light/tsl2772.c | 1 + 1 file changed, 1 insertion(+) --- a/drivers/iio/light/tsl2772.c +++ b/drivers/iio/light/tsl2772.c @@ -606,6 +606,7 @@ static int tsl2772_read_prox_diodes(stru return -EINVAL; } } + chip->settings.prox_diode = prox_diode_mask; return 0; }