From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-pl1-f169.google.com (mail-pl1-f169.google.com [209.85.214.169]) (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 911902BF3D7 for ; Sun, 19 Apr 2026 17:19:59 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.214.169 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1776619200; cv=none; b=ZwaFab6cFHqVJhNGEEHvRBiAYEb3rNOpedcvi4FIp9k7wbv9JxnFEUUEzsmar4w8ZT6PZI/fol8GuUqsso9U+LPOsUrnPa3m1tVhVJvjkm7v/JA9cyvQXV73xSRMfoEGk5dmTIiUTOJEV5K9MvA3QzEUyUAvnwjuLnCiNCf2tbI= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1776619200; c=relaxed/simple; bh=e4j+BhEu4raFMdJ0HWT0eK9mgj1i0Q1736UU+Anhq9E=; h=Date:From:To:CC:Subject:In-Reply-To:References:Message-ID: MIME-Version:Content-Type; b=Y1qopGHM4ujjajbyC/4XcW5RmSKSFoDrTT3gjXIkuUBPNLmL5URMZbjlsXGlTGOjdnFgTkUDNxtEBEwdIKXy2VKuyG1jSrOKS3Jhf9kkW9KbjHCSo5TaTM6ITBGNaQMXqjN6u7lsuD0ed3bci8gdMs7YkTkfKpPdt9V7SxL7cYg= 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=GCBeiRfV; arc=none smtp.client-ip=209.85.214.169 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="GCBeiRfV" Received: by mail-pl1-f169.google.com with SMTP id d9443c01a7336-2b25cf1b5f0so13785055ad.3 for ; Sun, 19 Apr 2026 10:19:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1776619199; x=1777223999; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:message-id:references :in-reply-to:user-agent:subject:cc:to:from:date:from:to:cc:subject :date:message-id:reply-to; bh=nCSRMM43uDYePvUzqbDgkNVVQiMesYoO97geG8VwOTU=; b=GCBeiRfVqWPHV+FxK5DfmlQ4kn7Nvmm6qRPvoBgeQGjAVqfokOT6GtA2rpKl5H1gWq 9jjN1uUelgukJAu/D6hDgAO8qqk6E71d3BOWdBqa4HBVDpATgBIgkUQUKvKdnllPCJf0 ild8JaEd+klGqY7MFBx1sxsxy8ivXII6xr7SV49OIZfJHzLPtp/cKkuASTzA78oGORXD RZrZywIziizSy3t9ItPE5wfvJPB9BvMFELZbiFGZMRyddiQY7ctNHlLmDc2ay3+s5Duv A18erPK4Pr7CVxin2F7Ql1aPGi4ItRIuKXgLlwJQrnMb4jCpqVII4K7R0xc/Z0c7SXaJ JYPw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1776619199; x=1777223999; h=content-transfer-encoding:mime-version:message-id:references :in-reply-to:user-agent:subject:cc:to:from:date:x-gm-gg :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=nCSRMM43uDYePvUzqbDgkNVVQiMesYoO97geG8VwOTU=; b=OLGpMYZxUdwTzobjuU8rVCZTVxXQfZB/puJS1g5YArvdKYbtZB5OnafsBG5qPY1I/T QZEXZcmC6oC+5q5uTbhTAzxBVfNeL6JCw1BIpNpGufAxe+C6xvlEoPLzS3XMXev41H/h YRPxWgR1O1ELG5ZI00x6V0+f1dKVKcTDry3fF2in/esGFCAzYr5Di1KpSILNLqS8lBIu 7Z4B2hCOybRemJD8ExF6650ZVsVAoOVDBABxd+QkN7jVEXRCKy7WS8B7oijfHYg5dIrQ kuqNodAICBhPuZ5R/YjmoE4KOQjuITGZjKYOPHrj9SXVCxedqz0WugUx73qKMSYb+mYW /TeA== X-Forwarded-Encrypted: i=1; AFNElJ+I7NJsMJg7hNJ8vI4H/h2qFtdHscChd1lgguQGg8ogwJDWpVECoZlyRdvix+Ag83GHzPhgwxgZsT9L75w=@vger.kernel.org X-Gm-Message-State: AOJu0YycGxWemArt2t3TJ7Ospq/4p11TMVMk9onmhfh6HSUkyvFKeuk8 f58oN2QazurMoziB91IpwPmrDW8mIytGZmXaQOkcX8IqfWs07M+X/w+U X-Gm-Gg: AeBDieuxCl0XhP9RqCkeSaiXf+06+wYXH1Kd7dCyCLUsIyMeajYT1l028RfOFg28CLK iS3Qp9Y6PGFiej7RIywmDpsVeyIA0D+C7Ad77CH8MT6mH7ZIXYEKQrXhhlSqF6N0QyP+zjr75r4 4n8qvfHt22o6MkGIvCB/HmxUVUGQaXXU+WlwZPH2HPHY5m/ecNFZuZ1xR7tByfUji770zhPVeDq 4UOAjv9dgnQtkwEJmvkazTJdF2xbKbu2FtABO8UEjJ1n/DdWg0VY3EeGr35uinrxe+r4CkQEOxs UDRmwo1BeWUFTNTBDxRLnR+MW3FUzk2L6HVx2zJuLUtAyVTDBKqHlTRxHWcWJWaDzl1KroyVTks 9gRa6zaPuqGc98nf/8VJcjU5Ahe/N9csT17qkZrNTpWxMSwYSZSq1miYsZQpRzeg8jD0eJcI7ZJ bsoEJWw1CyntfbGBvwNNVI+SkQOCkxrchIxtINXkI1+Ejs X-Received: by 2002:a17:902:f550:b0:2b2:4611:5dca with SMTP id d9443c01a7336-2b5f9f1c1edmr109550165ad.24.1776619198879; Sun, 19 Apr 2026 10:19:58 -0700 (PDT) Received: from ehlo.thunderbird.net ([2401:4900:5760:5b30::e36:fcc4]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-2b5fa9ff390sm77101295ad.9.2026.04.19.10.19.57 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sun, 19 Apr 2026 10:19:58 -0700 (PDT) Date: Sun, 19 Apr 2026 22:49:53 +0530 From: Sanjay Chitroda To: Jonathan Cameron CC: lucas.p.stankus@gmail.com, lars@metafoo.de, Michael.Hennerich@analog.com, puranjay@kernel.org, cosmin.tanislav@analog.com, marcelo.schmitt@analog.com, antoniu.miclaus@analog.com, ramona.gradinariu@analog.com, dlechner@baylibre.com, nuno.sa@analog.com, andy@kernel.org, linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org Subject: =?US-ASCII?Q?Re=3A_=5BPATCH_0/2=5D_iio=3A_accel=3A_small_cle?= =?US-ASCII?Q?anups_and_error-handling_improvements?= User-Agent: Thunderbird for Android In-Reply-To: <20260419173408.0d17995a@jic23-huawei> References: <20260417124924.353189-1-sanjayembedded@gmail.com> <20260419173408.0d17995a@jic23-huawei> Message-ID: 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: quoted-printable On 19 April 2026 10:04:08=E2=80=AFpm IST, Jonathan Cameron wrote: >On Fri, 17 Apr 2026 18:19:16 +0530 >Sanjay Chitroda wrote: > >> From: Sanjay Chitroda >>=20 >> Hi all, >>=20 >> This series contains a few small cleanups and robustness improvements t= o >> adxl313, adxl380, adxl355, adxl367 and adxl372 IIO accelerometer driver= s=2E > >0/2 in patch title? It's fine for that bit to change from version to ver= sion=2E > >Anyhow, I tweaked as Andy suggested whilst applying and picked up the lot= =2E > >Note however, that the advantage of devm_mutex_init() is minor at best, >which is why we didn't bother with mutex_destroy() most of the time >before this convenient way of calling it existed=2E Combined with >dev_err_probe() being nice but minor cleanup, I'd generally reserved thes= e >sorts of changes for when someone is otherwise working on a driver or >doing a more thorough modernisation=2E > >I don't mind people doing this sort of thing for one of their first >few patches, so what you have here is fine, but it's not suitable materia= l >for a mass cleanup of the whole subsystem! > >Thanks, > >Jonathan Hi Jonathan, Thank you for your input, assistance and considering the changes=2E I understand and agree, will take care this part=2E > >>=20 >> The changes modernize mutex handling using devm-managed helpers=2E >> In addition, error handling during probe is cleaned up by switching to >> dev_err_probe() to better handle deferred probing=2E >>=20 >> Changes in v2: >> - Drop guard() changes as it's already available in iio/testing=2E >> - Rebase changes on top of iio/testing with guidance from Andy=2E >> - Added new change for additional iio accel drivers=2E >>=20 >> No functional changes are intended=2E >>=20 >> Testing: >> - Compiled with W=3D1 >> - Build-tested on QEMU x86_64 >>=20 >> Thanks, >> Sanjay Chitroda >>=20 >> Sanjay Chitroda (8): >> iio: accel: adxl313_core: Use devm-managed mutex initialization >> iio: accel: adxl313: Use dev_err_probe >> iio: accel: adxl380: Use devm-managed mutex initialization >> iio: accel: adxl355_core: Use devm-managed mutex initialization >> iio: accel: adxl355: Use dev_err_probe >> iio: accel: adxl367: Use devm-managed mutex initialization >> iio: accel: adxl372: Use devm-managed mutex initialization >> iio: accel: adxl372: Use dev_err_probe >>=20 >> drivers/iio/accel/adxl313_core=2Ec | 10 +++++----- >> drivers/iio/accel/adxl313_i2c=2Ec | 10 ++++------ >> drivers/iio/accel/adxl313_spi=2Ec | 10 ++++------ >> drivers/iio/accel/adxl355_core=2Ec | 28 +++++++++++----------------- >> drivers/iio/accel/adxl355_i2c=2Ec | 11 ++++------- >> drivers/iio/accel/adxl355_spi=2Ec | 11 ++++------- >> drivers/iio/accel/adxl367=2Ec | 4 +++- >> drivers/iio/accel/adxl372=2Ec | 10 +++++----- >> drivers/iio/accel/adxl380=2Ec | 4 +++- >> 9 files changed, 43 insertions(+), 55 deletions(-) >>=20 >>=20 >> base-commit: 0ccdcdc698b7ba52f2c9bc09bfdf9f020ca0e6e6 >