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 30504223DF6; Tue, 26 Aug 2025 13:29:47 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1756214987; cv=none; b=gRZK27FkGTMd4c8c2IhJVMuwmqPYpExNmLiqW1FQ81oJA7RUr1UdJsSUt6RALvzn0JqEPaBojYJxBzMOjGY5Eovz1yGSJ2nOr1O3QKYTi3L2h4AA48iyh29GVr2Wg5pdNZyPin5ao/Hz6PMMH79b0hkVDxSK6ldhlcaJwiD272E= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1756214987; c=relaxed/simple; bh=ojt5ghIsP5Nn7SV9XamEs7i93X5GSDpDH261/JAAm9k=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=g8PnFv48O9w+NNVmCQkfzlvwkc0nHHWfrccXN7X3c3qclGm+GwQWpFU4yAa9f3W91rBTuykUu/CdNFXKk8D9vttYLIQZBTO7GHdng8GF7Qu1heZ710LvLpFWQLTi9JbGuNnNPfTdVObPXa/7/0YF4STY93gFEhFS8pqlT1+aMiM= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=SdAFVxst; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="SdAFVxst" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 910E2C4CEF1; Tue, 26 Aug 2025 13:29:46 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1756214987; bh=ojt5ghIsP5Nn7SV9XamEs7i93X5GSDpDH261/JAAm9k=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=SdAFVxstzY0n7diPCIzS5447a0iroTbKumK+avyXT29YIgW8HU4AGI/Jw/9O8WMHx zySmcxiBLDpj4eRZ/IV82tBi5E+vQSAiVRxk1a+b3+p+gPZueybOPPIO2K01El2jAW f8MNnqz6zH5vTflWeqsc4HTDuoPySPGZjNN6CC9w= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Zhang Lixu , Srinivas Pandruvada , Jonathan Cameron , Sasha Levin Subject: [PATCH 6.1 344/482] iio: hid-sensor-prox: Restore lost scale assignments Date: Tue, 26 Aug 2025 13:09:57 +0200 Message-ID: <20250826110939.326799632@linuxfoundation.org> X-Mailer: git-send-email 2.50.1 In-Reply-To: <20250826110930.769259449@linuxfoundation.org> References: <20250826110930.769259449@linuxfoundation.org> User-Agent: quilt/0.68 X-stable: review X-Patchwork-Hint: ignore Precedence: bulk X-Mailing-List: patches@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 6.1-stable review patch. If anyone has any objections, please let me know. ------------------ From: Zhang Lixu [ Upstream commit 83ded7cfaccccd2f4041769c313b58b4c9e265ad ] The variables `scale_pre_decml`, `scale_post_decml`, and `scale_precision` were assigned in commit d68c592e02f6 ("iio: hid-sensor-prox: Fix scale not correct issue"), but due to a merge conflict in commit 9c15db92a8e5 ("Merge tag 'iio-for-5.13a' of https://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio into staging-next"), these assignments were lost. Add back lost assignments and replace `st->prox_attr` with `st->prox_attr[0]` because commit 596ef5cf654b ("iio: hid-sensor-prox: Add support for more channels") changed `prox_attr` to an array. Cc: stable@vger.kernel.org # 5.13+ Fixes: 9c15db92a8e5 ("Merge tag 'iio-for-5.13a' of https://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio into staging-next") Signed-off-by: Zhang Lixu Acked-by: Srinivas Pandruvada Link: https://patch.msgid.link/20250331055022.1149736-2-lixu.zhang@intel.com Signed-off-by: Jonathan Cameron [ changed st->prox_attr[0] array access to st->prox_attr single struct member ] Signed-off-by: Sasha Levin Signed-off-by: Greg Kroah-Hartman --- drivers/iio/light/hid-sensor-prox.c | 5 +++++ 1 file changed, 5 insertions(+) --- a/drivers/iio/light/hid-sensor-prox.c +++ b/drivers/iio/light/hid-sensor-prox.c @@ -222,6 +222,11 @@ static int prox_parse_report(struct plat dev_dbg(&pdev->dev, "prox %x:%x\n", st->prox_attr.index, st->prox_attr.report_id); + st->scale_precision = hid_sensor_format_scale(hsdev->usage, + &st->prox_attr, + &st->scale_pre_decml, + &st->scale_post_decml); + return ret; }