From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-pf1-f176.google.com (mail-pf1-f176.google.com [209.85.210.176]) (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 EB9223CAE95 for ; Mon, 27 Jul 2026 19:21:18 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.210.176 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1785180080; cv=none; b=LDVXq/fRLvTd5pZlOZMVA94dd380BSBA52MAldZ2vHSAJgo8Ad9oZ5Yl0qVJNIsHSUHmE6sUJqCG0yfLVqX5rUd3SIR/FVxOj77iO9BrYFusCeN5JkzYiFlot/3tZPU6Ic2FwmluK0s0MhN7JNrCVB49NdbOKz+FpwYhQDJnrcQ= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1785180080; c=relaxed/simple; bh=7nIC945Sv334N3OjbUN6ZCwKSgY6D/5noyhIzwHrKkk=; h=From:To:Cc:Subject:Date:Message-Id:MIME-Version; b=phOdDKjKshhN2ZLoly2F5x6LhUn1LOEtO01vqOLTdvRAcimVaPmybzjw4tYPZPAG7Sd1J+21Yk/4qrbEZiM/cEw1sCew9D1QMsPbFY2yDlfoRv07HLIpenoHmsak4Tdh+xhP9aQhCR8xWkw6grmxEuoL0pubVr4pAVFFr28z584= 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=FZyqosgq; arc=none smtp.client-ip=209.85.210.176 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="FZyqosgq" Received: by mail-pf1-f176.google.com with SMTP id d2e1a72fcca58-8486672f03cso3034766b3a.0 for ; Mon, 27 Jul 2026 12:21:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1785180078; x=1785784878; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to:content-type; bh=Z4mNCG9beTSG/GAQNF32mwCuWY/ZfBeusHCM5eRg8Sk=; b=FZyqosgqh6ColgWb3jWIBVyolZsuPHRyIOpVW1Jxr/2pVzIxAyPedzIyWAKPQqnW1W 9aLHfjXw5C956cqO1T9M1/pxB2P/ifscCX4VLQ070V0i+08tDt3zNaFAs5Zfpa/krVCI 5g1Zj1IAsyx3vHObw2xyGp27ULk4BcPzNy1zzSWJHNhXYOqR8l8BUm4xZKedCJv6FM5z JOCSa+OD2zr7X1nUDyy1L73atb5KTlAyGwZVWiMNAtBOmHri2oR33k+NAeJb8VFJT2Bf tfSFWS7IzWNjxUHYwYpEoQlJfpapcZAkM9fuVh3jqwdqXOVKP+CvhxnPMCyBuvXwoz9m 6hhA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1785180078; x=1785784878; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-gg:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to:content-type; bh=Z4mNCG9beTSG/GAQNF32mwCuWY/ZfBeusHCM5eRg8Sk=; b=V+w3ROO5qwglPCPk6FN5RBfG+kHdFJu1PvpSJu5/wA9T+vUb/q0ZTf8U8SSAJymeVd jAYA8ddDO6bpgrkjWB3EvvfRmXuNkRPDzgEoFsK+XvKE3rb+0Lgig+MCHo1shxfql+aB zVhcEWNkw7+Ko+yFhlvhb+KOZcmo6XesZ1pZDG0b/d6RuG3JnTF6Kojqh08HhIR9wINR 1A+SlqgZmLbOd1G0S6vrXBE3ECg81pN6kTUxnm/tskaUp0GP0vn+saJYS8hBFF64UWHG JoD02JsK2PF6HbUYy1u0c+TiAtqXNIeOoK7tv653Ul1TIuAqhCd+Jmy+ymvrTzKEbiAs SnSg== X-Forwarded-Encrypted: i=1; AHgh+Ro0keQElwDVmf+t42tA+x0/OiIknCDO2ULyWc+fMR3klI9yR2a41mLPnwNe+fik/zhmicfA9Bee60VEAnw=@vger.kernel.org X-Gm-Message-State: AOJu0YzeH49t1yn8kx+HsIiqp3pfyGENNOWIekpvpVEQKGOgK0HHZVZ8 6l9JMhq6N2wJmBr8FOk5qGNSCd/kkQ0kXD4IGYVjo2oqw4YnEXYkWDU34to0yqejMM32ew== X-Gm-Gg: AR+sD11r71MZOUpZaQ1jaLzzcEVr/zf+ecN90AinCKLPyCxFoeBIQytpe21ZhAqf0Hu mWAZgSamLsAlYXWZcnC2GEpSEJLNIFf68ODlVPWEibG0jOI5KM5lBpoZzqAN6uAW0+/vh9iCSML fiJzTPbDMmSuX13kQvA/U1+Cg6D3bz4h3iChqnHMovSq/9mA8cwon8J6TdwHrxBlIDU06PEvAqa /lf6R6M+Et4pf4qzz6UlKljrUHEMTvINu5s4HfZ6BflnWfQQ5aarZ3ioZhzIoA0QpM3oiWHVk7m lQiO4VVr/P12decQeM8expm5O0SRjr1AZF7uMF+rvVDN6R6Ns/eEeY+rnDj17voSuyiV7lNa9uK UJris6y1d7XIYLv4CgPlSXwbY1cDx7x65ki9Hh9UAlLnSLmjCw+4tt+103eRtC7YJh09HX4fhLb lEcl7uPS6rxyOcEl3zC1aOT5EL4qNuzPCRrWINQ3MLdCIdyDxnlguY X-Received: by 2002:a05:6a21:7107:b0:3bf:6c08:fb83 with SMTP id adf61e73a8af0-3c67e0e2d3bmr9083960637.51.1785180078287; Mon, 27 Jul 2026 12:21:18 -0700 (PDT) Received: from debian.ari ([152.58.178.230]) by smtp.gmail.com with ESMTPSA id 5a478bee46e88-314bc549b11sm37595470eec.18.2026.07.27.12.21.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 27 Jul 2026 12:21:17 -0700 (PDT) From: Archit Anant To: jic23@kernel.org Cc: dlechner@baylibre.com, andy@kernel.org, nuno.sa@analog.com, u.kleine-koenig@baylibre.com, linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org, Archit Anant Subject: [PATCH v2 0/6] iio: adc: ti-ads1015: modernize resource management Date: Tue, 28 Jul 2026 00:50:56 +0530 Message-Id: <20260727192102.37968-1-architanant5@gmail.com> X-Mailer: git-send-email 2.39.5 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit This series modernizes the ti-ads1015 by transitioning it to a fully devm_ architecture. By moving resource allocation, device registration, and runtime power management to the devm_ infrastructure, the teardown sequence is now guaranteed to execute safely in the reverse order of initialization. This allows for the complete removal of the ads1015_remove() function, eliminating boilerplate code and reducing the risk of future resource leaks. Additionally, housekeeping patches are included to ensure header includes remain alphabetically sorted, dev_err_probe() is used consistently, and PM macros are updated to modern standards. Changes in v2: - Split the monolithic v1 patch into a 6-patch series to isolate housekeeping, bug fixes, and API modernizations for easier review and backporting. - Patch 1: Added to modernize PM ops and remove #ifdef CONFIG_PM. - Patch 2: Added to fix a pre-existing PM leak on probe failure identified by Jonathan Cameron. - Patch 3: Extracted header sorting into a prerequisite patch. - Patch 4 & 5: Extracted the introduction of the local 'dev' pointer and dev_err_probe() conversions, suggested by Jonathan Cameron. - Patch 6: Now contains only the devm_ conversions and the removal of ads1015_remove(). Archit Anant (6): iio: adc: ti-ads1015: use DEFINE_RUNTIME_DEV_PM_OPS() iio: adc: ti-ads1015: fix PM leak on probe failure iio: adc: ti-ads1015: sort headers alphabetically iio: adc: ti-ads1015: use local device pointer in probe iio: adc: ti-ads1015: use dev_err_probe() for error handling iio: adc: ti-ads1015: convert to fully managed resources drivers/iio/adc/ti-ads1015.c | 114 +++++++++++++++-------------------- 1 file changed, 50 insertions(+), 64 deletions(-) -- 2.39.5