Received: by 2002:ab2:6309:0:b0:1fb:d597:ff75 with SMTP id s9csp434245lqt; Thu, 6 Jun 2024 07:53:59 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWIYnn0/mX59cY7CxTskQXCituCvMUWFNsA+bWpXSPPvRg81zpFlcBwxpOdwP2WdKLjVFkDFh/ceNewOdIFvVF9xnv82Mw2Tsum+7RwoA== X-Google-Smtp-Source: AGHT+IFFMMBz9962ytYdTpfWRYj0gyD2SZBfCF0YBrxl6hK9YOWx40rmkJ5Openhiu71NrX5sou5 X-Received: by 2002:a05:6122:2091:b0:4df:1d07:5ffa with SMTP id 71dfb90a1353d-4eb3a3e7d2dmr7471876e0c.3.1717685639289; Thu, 06 Jun 2024 07:53:59 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1717685639; cv=pass; d=google.com; s=arc-20160816; b=O9op1yvNsM9tP0lfbH9KM53o0YeESj5bfehtM5YYTguge5QQK0m1mTWSDhsRMdaYN3 UNbDicQJX4QyNCwidU1pl61/VgNJoZD290RaVZpjG/6YurobgBpzbnMSNYweb8p6EGXl cQvq/cjFDCsTjA1cQjGO0Do9j08ak8+ekIiaOGbxTMOqLRMI7vBHYrFKW2/HlvMgvDQ3 gXeSJhn9Fg6qQgPVvB03odhelvusiajKzFi9bNy+8mQw4Ul+z145cinOoPpUytsJuVLo isvMdTJeSdEJpAFo5Ra1EnNnYmdnocexxiWZPW3h3uTFuydzWeSFVE0xonPxucgJUo4f HOnA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:list-unsubscribe:list-subscribe:list-id:precedence :subject:date:from:dkim-signature; bh=2/q5554CzENPlgyge011QeqaTXceaEzyntbYKINHAhg=; fh=vA+JrjQ+CO6flJ/lgR+rMYsqphBDIOA3rA/skKCNhEA=; b=MGCRMSkrj6jPZPNEFPbKpYWmkLRZyRRMtQYJgZptQB1KLWsBj50MoVYTtXSxzyMPyp DUifVdeVtyZAZ8KBpmo1WjwSMgKsPE5+klZXpkYvPJFekmVfKRGgClqmFq+RL8zWTkgc g8oJ5TAOgvHUUJ+95XKSvNq/O6wyv1zWxXbes+V2hBMT0pEFaZJ9fpae0VTszy9brUA+ +1rI5iZDH4FNx5kbCnVSa4U5b0arLqceO/2biQgI3F9hzX5IufbqBjHdV+inlY2VcCb9 8qXHDsl3Cpno4Q/xyDFqPDGFA1mLH4yQhmDA7LojVXgGl+8aUlHT1PTsf1pB4iDRh3ON YwiA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=be57IxCM; arc=pass (i=1 spf=pass spfdomain=linaro.org dkim=pass dkdomain=linaro.org dmarc=pass fromdomain=linaro.org); spf=pass (google.com: domain of linux-kernel+bounces-204465-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-204465-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id d75a77b69052e-44038a6d8a8si4538631cf.71.2024.06.06.07.53.59 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 06 Jun 2024 07:53:59 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-204465-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=be57IxCM; arc=pass (i=1 spf=pass spfdomain=linaro.org dkim=pass dkdomain=linaro.org dmarc=pass fromdomain=linaro.org); spf=pass (google.com: domain of linux-kernel+bounces-204465-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-204465-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id 772241C24B42 for ; Thu, 6 Jun 2024 14:53:54 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id EEFCC1AB915; Thu, 6 Jun 2024 14:27:06 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="be57IxCM" Received: from mail-wm1-f43.google.com (mail-wm1-f43.google.com [209.85.128.43]) (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 80B241AB534 for ; Thu, 6 Jun 2024 14:27:04 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.43 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717684026; cv=none; b=tJKWz3tZFYVyu7ZFCd4BexUnJDpuskOhLoF2MQqxKwXAOlr/1AZVkKnKevhxQ8LRjdbnD709aihBAR12Igi5GxsXmWmfRiy5u6tidAWymCDyPNR46N5N9QNyrBQ7g/zyGAkfl++sd2/NdXLcg4HliPIOLol31tkhJnkpDef0A6Q= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717684026; c=relaxed/simple; bh=YStrwMu9d0HF7v8g7UlEzFjEPSB04hbtpJeJ/x8+6Tg=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=Nq/X/ulUURn9iAaiBP+9Rw7Xjj4qDItprss8j/PR0ejX4B9KrszR6LcvRLoPTlcu6NbCeAfG1vR/530+WNx74Ldf+t5eI3RJ/lkI+sEBVZL87yKLIVy4ecY8u56ufBtJV5CBUBnxo786XBGIc7gHiOUP5emL87hbIRQSIa9pbCI= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org; spf=pass smtp.mailfrom=linaro.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b=be57IxCM; arc=none smtp.client-ip=209.85.128.43 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linaro.org Received: by mail-wm1-f43.google.com with SMTP id 5b1f17b1804b1-4213b94b8b5so10993895e9.0 for ; Thu, 06 Jun 2024 07:27:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1717684023; x=1718288823; 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=2/q5554CzENPlgyge011QeqaTXceaEzyntbYKINHAhg=; b=be57IxCMboKrqUOy5opXe7d6vt0ApjW8gU/fBV+0X4gQK76FUT/2fPTLX02HS0Jj9g uJJEQScCWRSkVxQ3EhBP+SSjMTA0QoGRvKGUtpKOloiQiqEvnuGTGXSRGaFeKV5zdF0l OFv1CcNu9QtXm8B/U8XwvtPkrzptpynWNTsWsC9vinHBinRNHA/wsEU0k4Ug0S1U+lcN 1ETfg05fBc7B1+66QRgUdZ4XrtftsMl1JnAyigoSbsatgeXnJi5qC3mTyBfZ8hKfwfAD 9B3dccIlksBQPqUMBTWQZH32OBuDReIiH1CCcv/h8zRmwBDEj+n9nalcEZuYnpKTTA3o t2XQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1717684023; x=1718288823; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=2/q5554CzENPlgyge011QeqaTXceaEzyntbYKINHAhg=; b=w0amJajhpGXGS/ifPzf5RfGEMGRaU9dFYV99Y54m/9/3ZXuLV5yBdF/N/LRVXolaf8 RDNjRqSmsDzD5D9S0t8G6OnJzM8QyThF+J0PpeChosgo8SOkcB9+r7alEfyZze75CkZf LDYDSbVLhvWmtJMcklrhADbEbbHi4Glj91ot0yYEBPzYUamCwPLkoe8/9zKvDfF3J6V5 GWyhN89qC//t78OSSJCzd04rzIxL9+Ffpk1oB9IM/+cSPqrM6E/1aoQ66NJDv/sEZqCn 73xBWSX3gvsmhwPiY63PotAOSlFV2i0DuOjquIqb34QyT/YBwrmorZ5s89B9RiuhyyVs uMyA== X-Forwarded-Encrypted: i=1; AJvYcCWX1qfQWqTzAiQpJ2vHcDuWrmEK8/eIAsKzXTEiUEoenhsoTh1/ERlc4fJxMXpYKh+NrJmK9XCy5IZyCoVENWroom9yrtU25YyjSFuy X-Gm-Message-State: AOJu0YxuICUETICguovhk3CATgXS7qGyUP1j3AbMCWYoS4AZ9TTRw+ry wltSTLL9NcxlSniUf9HaROJGX4fNi6E8KRaCNLvKUGAM/3AHM6XsHIBVFartfDg= X-Received: by 2002:a05:600c:4f83:b0:41f:ed4c:b8b6 with SMTP id 5b1f17b1804b1-4215635859fmr42301955e9.38.1717684023003; Thu, 06 Jun 2024 07:27:03 -0700 (PDT) Received: from [127.0.1.1] ([110.93.11.116]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-42158110dfesm59158615e9.19.2024.06.06.07.27.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 06 Jun 2024 07:27:02 -0700 (PDT) From: Krzysztof Kozlowski Date: Thu, 06 Jun 2024 16:26:46 +0200 Subject: [PATCH 4/8] iio: adc: ti-ads131e08: simplify with spi_get_device_match_data() 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: 7bit Message-Id: <20240606-spi-match-data-v1-4-320b291ee1fe@linaro.org> References: <20240606-spi-match-data-v1-0-320b291ee1fe@linaro.org> In-Reply-To: <20240606-spi-match-data-v1-0-320b291ee1fe@linaro.org> To: Lucas Stankus , Lars-Peter Clausen , Michael Hennerich , Jonathan Cameron , Puranjay Mohan , Ramona Bolboaca , Oleksij Rempel , kernel@pengutronix.de, Cosmin Tanislav , Marius Cristea Cc: linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org, Krzysztof Kozlowski X-Mailer: b4 0.13.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=811; i=krzysztof.kozlowski@linaro.org; h=from:subject:message-id; bh=YStrwMu9d0HF7v8g7UlEzFjEPSB04hbtpJeJ/x8+6Tg=; b=owEBbQKS/ZANAwAKAcE3ZuaGi4PXAcsmYgBmYccrM2JPjmayiwY1qQnAIETB5ED1hb/J1fYj0 UoY7hXocZ+JAjMEAAEKAB0WIQTd0mIoPREbIztuuKjBN2bmhouD1wUCZmHHKwAKCRDBN2bmhouD 16mPD/4s2zen2qL8Xyl5g8T7SvW51gO4ywnLwFj9Pg2kwfy1Cms39SBppTSUHv4L6PZA+7/J6TN BAdPfk7NPYWU3LUZbmnV2dnlooTg1lFwUlidyOthd6o9TyukGldMo6h+uzDzQPGjCLTryhozwR6 PFU5S8qzshkHrwEVmgHFt5pSDjvJzQZH6faicNtjfFm3Kcvb3bwxCDur+UD6CrCOvwa3RXU4kGo dQkBpJnk+PrbPHTdJigzvoE8bCCgAl3i7zyX3wdPWfgxfpupgHkOZl85yg5dZ4MzjJ+sw9grlvy 7qHC8PsfR9tsdpbiZMDILl4z7glqjv3D2Mu66KaGlDHQmIVns3vILDyGUSOzw5wzkT0JpJU9kDT WM5DgJEV2b6O0mGdyNpY2vhHh8qPaKFf4ifNM5eG8PBr1ipoD7xTATDpfj43uCqO8hJ8H0p0+xz 24sL6Tzsx0Wr6S0YpxOX6c+nQmolwCRcNOgWc2I20iw4D03AyhQffUguvOou8Buvzi6Yv645OPq p5RZoBQB6/5KRwxxsCLmAl67AmcdWfKQG23KIceWTU4FFwE+UpWFIILOk4oO/n7lKZHbWlPHOzX 7jqfnDFcutXKxGwBHoBFdjmHUtukhoYPWKBlPB1FNejm/TobmOTflZr2KZqCTrEATNi8UB7JLRl JlwUyDyEIp4P9ug== X-Developer-Key: i=krzysztof.kozlowski@linaro.org; a=openpgp; fpr=9BD07E0E0C51F8D59677B7541B93437D3B41629B Use spi_get_device_match_data() helper to simplify a bit the driver. Signed-off-by: Krzysztof Kozlowski --- drivers/iio/adc/ti-ads131e08.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/iio/adc/ti-ads131e08.c b/drivers/iio/adc/ti-ads131e08.c index cb04a29b3dba..96dd9366f8ff 100644 --- a/drivers/iio/adc/ti-ads131e08.c +++ b/drivers/iio/adc/ti-ads131e08.c @@ -802,9 +802,7 @@ static int ads131e08_probe(struct spi_device *spi) unsigned long adc_clk_ns; int ret; - info = device_get_match_data(&spi->dev); - if (!info) - info = (void *)spi_get_device_id(spi)->driver_data; + info = spi_get_device_match_data(spi); if (!info) { dev_err(&spi->dev, "failed to get match data\n"); return -ENODEV; -- 2.43.0