From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-pj1-f54.google.com (mail-pj1-f54.google.com [209.85.216.54]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id EBDD94279F5 for ; Tue, 16 Jun 2026 10:27:00 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.216.54 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1781605622; cv=none; b=mXakyVJbJ9NWc4vuzhdaWo2u4vUc5/od8AvGfdVSeDwpHc16fJZuNTnQCVBgyN5ZC4ZJqZdtFkXA3dcTsk0COmdu4ChgK8LV57K1GZNKzEtFD/VSaMyn27KV0lyD5sDomjvluYOAL3AElEIEkf9Lzh6xz5dMaXf5DjnJVIOl+Cc= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1781605622; c=relaxed/simple; bh=b3q30hN8/8zTi8xRwokSZ6zlcxtUNegwQuHZnD/20BI=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=ODXD3RwnFteL+31kvKe9REmaUXpR07Rc4Lp8jS7HXzMTHelS3tGYXkQNNnMgnsKXpNh6xFniLTaYDxIQ5ynz0jo8ql9RcXFDXSxX6M8zpWB4xEhIB9F9M9omLh7ZgnHgJyprdLtMPHoKFb+GcrJ4L7DT+dErtRkc9ENBEzYA+2M= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=B/Z9ZdXy; arc=none smtp.client-ip=209.85.216.54 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="B/Z9ZdXy" Received: by mail-pj1-f54.google.com with SMTP id 98e67ed59e1d1-36bd175fdbaso2628977a91.0 for ; Tue, 16 Jun 2026 03:27:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1781605620; x=1782210420; darn=vger.kernel.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=XIpkRPu/+gZceoyeLzf2KDGQKKvzitCGsNedMKc2VSQ=; b=B/Z9ZdXyGZIxs6xqJjtY70OhytMFXhWngEaJj3zVGVg5SWYbF+VWTeEzzyxwS+3OMc VplnEjdLA+fgq8FTPqWAUQPpFpJ9jzS1Zh4U91IPwZ0PoOHljtF5gjRTqollxXuR+8b2 Gto4UAE9eG1ZjpshJGu8XQxMHqS2GGd3/EoZ5+1lf57ddSmEWvZIZXonWeuHZ5vtCm4e QCjihZVKnMLbPZgr91D17w91UlpUDNjhOex2GhksD19qh6oWd5r3tko2HSnDZyPAMX1F JUi13Zw1tcOVFhChFfHI8o5icyVz18lcpPqQZ5Jf9HKyIhTm+Lq+9+sfpJZQyYBNfRVt ydTw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1781605620; x=1782210420; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-gg:x-gm-message-state:from:to :cc:subject:date:message-id:reply-to; bh=XIpkRPu/+gZceoyeLzf2KDGQKKvzitCGsNedMKc2VSQ=; b=YVRaocf8Vv96RrQPWBCx35sVjoex52bLqCa5BICnrNqlu3vdRVmBJRg+UB0Ta2EhhT pStLDyCqEKd9GMLmtmX/kf4MHod7eJwmCQVEMS4VEm0EcmQ5eLmpSyZLcONNwXMB1JKf SJdcE0/1ro4dcyr9Sp/tSCvbDwZdP/5rtqkxY6f2fcWQclVLW186HaUXAWzTmPIv0tg7 4lXfnfskaDQGWD9qTV0UNDiSzKmiDqlYf8eAZZ+zXqf9VFZt4M7j/0iiQiuHzNfzVRYW bnK4QEhSy+MKKVuhroMSwuXISKhTCMQ61TASIb9AxAGBXGr3swP+FfH3GB/zhNOgDRaW QW3w== X-Forwarded-Encrypted: i=1; AFNElJ9snSfEH+mQ+yGbXB4dfzgzMp9sNdX4yvlmyK8HManqRE1utiz85HOYx9szYA7/mh3vUyaJn78Iegjb7Ok=@vger.kernel.org X-Gm-Message-State: AOJu0YyKaXqwaYDUBleyvBPbtkeUxmHNczU5Meac0jiESPJ98iAyMTaT nvfvb5DvRh2Kdw934U4Fj7ZsZ+WpWMuJH9C9JUuAvqObn/Q7h259D0jE X-Gm-Gg: Acq92OEjZ4rXALXfc3qVId0Y/fJzwONMrBM/qC7/l20UqofxbiWkoLoHcy0a18fnGkc d42Vu2QhMVubrjcE9fBz8bXegl+I/cMrKg3ipFKvRAsXNf9bpq6objQPgTabG1DhqclC0mbpkOL o4TSvVn5iZvsPBZKejlYGqTxytbQWNs/Q+CFJMadY1IFmqj1qD/Fm51Yw8iCMh+0n8y6U81aq7H wGAVF/Jg670Q2RfmqVcSGYnbO/5Ssqzq5xxUA/PWElzFeEjCMIDAZw/e/HiMEY8aPcJORNfrJNw JsUvCz3NyMia0e6hwv8itnYfLLmrJVavN2jfzecEFRz2Eyxy1CA8mYpyAS4R4I8rEfoqoIF0kRJ jGFsVN70fYhRNUoUwiSVRGbhTODZkhmFggHB9GZKHgfmDouMPJ18+ZYAUox39V6/T/9omx+Q6YY 9PbCBUm7sgOzpj6qt4qU43aNuBpW3G9UQzLaud6QusyZNxXsL5 X-Received: by 2002:a17:90a:6502:b0:37c:607b:2cd9 with SMTP id 98e67ed59e1d1-37c607b3288mr580665a91.0.1781605620467; Tue, 16 Jun 2026 03:27:00 -0700 (PDT) Received: from hu-ckantibh-hyd.qualcomm.com ([202.46.23.25]) by smtp.gmail.com with ESMTPSA id 98e67ed59e1d1-379e88d546dsm8079269a91.2.2026.06.16.03.26.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 16 Jun 2026 03:27:00 -0700 (PDT) From: Sanjay Chitroda X-Google-Original-From: Sanjay Chitroda Date: Tue, 16 Jun 2026 15:56:12 +0530 Subject: [PATCH 07/11] iio: temperature: hid-sensor-temperature: use common device for devres Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit Message-Id: <20260616-15-jun-hid-iio-alignment-v1-7-0cd544286575@gmail.com> References: <20260616-15-jun-hid-iio-alignment-v1-0-0cd544286575@gmail.com> In-Reply-To: <20260616-15-jun-hid-iio-alignment-v1-0-0cd544286575@gmail.com> To: Jonathan Cameron , David Lechner , =?utf-8?q?Nuno_S=C3=A1?= , Andy Shevchenko , Jiri Kosina , Srinivas Pandruvada Cc: linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org, linux-input@vger.kernel.org, Sanjay Chitroda X-Mailer: b4 0.15.2 From: Sanjay Chitroda kmemdup() is used for memory that is logically tied to the HID platform device, even though the driver binds into the IIO framework. Using &indio_dev->dev for devres allocations works functionally, but it results in two separate devres ownership trees—one for the HID platform device (pdev) and another for the IIO device (indio_dev). The devres framework is intended to have a single, well-defined parent device. Since the memory originates from HID sensor probing and is not IIO-specific, &pdev->dev is the correct and logical owner. Switch to using the platform device for devm_kmemdup() so that all resources are released deterministically and consistently. Signed-off-by: Sanjay Chitroda --- drivers/iio/temperature/hid-sensor-temperature.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/iio/temperature/hid-sensor-temperature.c b/drivers/iio/temperature/hid-sensor-temperature.c index 9f628a8e5cfb..31ebfd1a1fe2 100644 --- a/drivers/iio/temperature/hid-sensor-temperature.c +++ b/drivers/iio/temperature/hid-sensor-temperature.c @@ -213,8 +213,8 @@ static int hid_temperature_probe(struct platform_device *pdev) if (ret) return ret; - temp_chans = devm_kmemdup(&indio_dev->dev, temperature_channels, - sizeof(temperature_channels), GFP_KERNEL); + temp_chans = devm_kmemdup(&pdev->dev, temperature_channels, + sizeof(temperature_channels), GFP_KERNEL); if (!temp_chans) return -ENOMEM; -- 2.34.1