Received: by 2002:ab2:6309:0:b0:1fb:d597:ff75 with SMTP id s9csp434799lqt; Thu, 6 Jun 2024 07:54:55 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCW8RndB8zmE75HXSRr9afSABFmLuCzTpmVDWEjsweYV+hfXU0tAVy53I2Y04gfqko8/iEzRC5TsD5jsOGDNh6W7T6MKBgR9rXEFlU3Q5g== X-Google-Smtp-Source: AGHT+IExZyflWuf8D3nqRVDKq0gmSnW+mnSieAXqNhjJrYhM3ACPcBNyLPGwZnRvQiG8OPQq55LF X-Received: by 2002:a05:6e02:1aad:b0:374:a4fd:cde with SMTP id e9e14a558f8ab-374b1f65f68mr59677955ab.30.1717685695326; Thu, 06 Jun 2024 07:54:55 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1717685695; cv=pass; d=google.com; s=arc-20160816; b=nmuAv728WfSucVgtCQlRtAFVIyNWJ+cK94zht0KnotbUyZyZRU4ZdoxsP32TRiQsEo w6MQ0GEU/7b+xLYJTQA+Y/HCj6T553DQGO/heHKcEQ8zRRqV6WmrJqhWylbR/5AER4ow nwqjvKWAGuasIn97Q+4lMFupRNmL3h8YdvIXc5mdpRmqjptDhXlT4szAfOKq7ac9pCwh m9XHOAb/qwBmR3IBQWf29/cX+E7ZkkZ8zP4NntUeHljCLUpDFpYStZ0RKrxoNGU/jgio k0Ly7akFWUzdD5beK8aO2SRO9lQC03MJHsjBudNv9t7a6EqQT4gU3YUCPfXA3nlf6XHh WI4g== 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=npuZ6pimIot2dk7Ox3pzVTiM/tsReKLWyZCaqFTENgE=; fh=O3zJ6iQy5KG90WIInDcY7jAYPcuzGDqVZNqtf7GdNHA=; b=GmDLKgSB1GjVmOnFeyzInSumdlxY/PFcHs5moAD2eRocMBYaOpXmQZjSNdceKW4tpX M9i+JrqbySqa7eZPBmlZqde3Q6yEH+OWsPB4f2Firx/5drQVQFSNhjgDasHmaFHlAjw2 MBoAT0t16n3gQDPpm89MPKsBb6kSy7pID1RsVOXoXrJUgduRv3qDU2ddyhnPP+oXSIO4 GiDZP54sXcX6YTlckfvBDj5ruMhWPAeRJJ5FjcV0RGk6xb9jSdYsrPOpDQNRRNSfN0k0 PUO4EP8aztE4XCPqK+AXs9OYqFd+ggrqHJdwKsOiFiSbUCSvEZyBk7BwWBMC79EXWAR8 8JmA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=ufORBg7h; 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-204466-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-204466-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id 41be03b00d2f7-6de2073c3a2si1277827a12.70.2024.06.06.07.54.55 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 06 Jun 2024 07:54:55 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-204466-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=ufORBg7h; 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-204466-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-204466-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 sv.mirrors.kernel.org (Postfix) with ESMTPS id 906E9287A79 for ; Thu, 6 Jun 2024 14:54:08 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 3D2091ABCB2; Thu, 6 Jun 2024 14:27:08 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="ufORBg7h" Received: from mail-wm1-f51.google.com (mail-wm1-f51.google.com [209.85.128.51]) (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 C5BFC1AB8FB for ; Thu, 6 Jun 2024 14:27:05 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.51 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717684027; cv=none; b=qlHKcWA8aaxHryH1PrvmDvDUNTBnNoR/jjmEMas8iOCimT5czNs1onjbU/eoCcxJMrj5VN0rE2YOEz/Qk+KCUMIgpHX8hS3KinWjtQpj5Ei+1LUdDsWjyLHA7jmsesZMPnO6q4hl5DDzsS0X2ZMT5QMqK5gb4aA+VdUsTE9FmU4= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717684027; c=relaxed/simple; bh=FBc8qGFzWnElA/PFQ9TDs3wAx45tlZ1u89JH2VfgkwE=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=L8dORr1d2TtXTJOpnvMd5SOD87LRGqD10UTwjjFNruVkKrcUfwOagmGuaqPG/+nPOl/XZzYDVWaQWCBwhCvLq413bAY7dC0jToFKhLEfYADn+ctZKTlpEqMACmVa3uv3Xd2+6Orb970L3IFHe6RhorBUiMIfBkZ4wUMdfZCTixo= 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=ufORBg7h; arc=none smtp.client-ip=209.85.128.51 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-f51.google.com with SMTP id 5b1f17b1804b1-4213b94b8b5so10994185e9.0 for ; Thu, 06 Jun 2024 07:27:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1717684024; x=1718288824; 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=npuZ6pimIot2dk7Ox3pzVTiM/tsReKLWyZCaqFTENgE=; b=ufORBg7htAJkM1k26WybudmrclbVeO531Rgq6A1uFKviNtubozpnncBt/6G0ng1SBh /fHow0uJdLWxZ24rd/kLNEh3NPm1BeQbhv9KAMx65vt6RY31F4tJgr3RRpA5gAYpEQ7E OBZK8lWCWdYY/lmweT1HL5HbPh2MqxjD7nGu4YarVlhdOIC8MDLsIOEbpRrZYFYPfver oTyuPoXeeAjtfsrZiUoNG0pAolVWMk4989HveLuO722s7sEKrewk//a/vgOEMkMkV6to lLnaustJ1NfFVQEMQo5YcLrarrSUPTYeaPdm7Iipo8YjSHz8fxdCqTrrm5YQwpoexnX6 lteA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1717684024; x=1718288824; 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=npuZ6pimIot2dk7Ox3pzVTiM/tsReKLWyZCaqFTENgE=; b=qr1OHjn8lz2oRk2HqKyL518ftHSymNVosgH5gPhrDeU88ezjpVuvvQaglD/dqFNoAM a5ofwx9VrK+p9kOeoji/ax3y/2cBUXJti3UuIpzGKzahLTfQhADHUXuYpS78kzXnnYIr mR+sZDo+yq1zaOILPm3kN/uLlRRcCAS/zpElCZqZ/T/511UFH07XN8uOUlK2zyNbupWd i5Ui+od5jdazaPE8vwPYpyWeIY0QYMIPu4+PscqATCRST4sSvZT5/dmr57nVg0IEcVNX jogt7QlztZocIA/SwFyAUcH+dm5tquplDMPXN1cDNlnKVVkg1YyIy/tiMxtt7oujQ2KO AVeQ== X-Forwarded-Encrypted: i=1; AJvYcCXaPhNwODH6GU7s2nd+u9u1KGzTMfXMx2qbOgKfBE0q1SJKspvArgOcoDlVmOS7ugrvkRx/EpBfio/6x9XkpsEBEEk+YzIYrH6IEHrL X-Gm-Message-State: AOJu0Ywun4Zq5ln2NWUlPV6+E5VeweS495k4O3Cg2VRjeO/W5vIihqmx AzKcFBSvagAhTGMTvelvQR8Nsc1XLTUCjreyVH45UScehgBIId2AgYi3+BWePAY= X-Received: by 2002:a05:600c:4fc7:b0:416:88f9:f5ea with SMTP id 5b1f17b1804b1-42156f4b8c6mr49522825e9.34.1717684024331; Thu, 06 Jun 2024 07:27:04 -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.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 06 Jun 2024 07:27:03 -0700 (PDT) From: Krzysztof Kozlowski Date: Thu, 06 Jun 2024 16:26:47 +0200 Subject: [PATCH 5/8] iio: adc: ti-tsc2046: 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-5-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=808; i=krzysztof.kozlowski@linaro.org; h=from:subject:message-id; bh=FBc8qGFzWnElA/PFQ9TDs3wAx45tlZ1u89JH2VfgkwE=; b=owEBbQKS/ZANAwAKAcE3ZuaGi4PXAcsmYgBmYccs927/di3mcm7oyt9XXcT2cHYL/pmf+UHsV ohH0QMR3wSJAjMEAAEKAB0WIQTd0mIoPREbIztuuKjBN2bmhouD1wUCZmHHLAAKCRDBN2bmhouD 19/3D/45osNDrzMrpzw50q9ybIhCEj6nXNeo5muXsRcYCgoMnOGCjKOEWPWsmImgoaOVaw0m7A/ S4hRRgVngbsMeEsNd1UpR5Z3os+dUOuVFFc4W3zKF4q9nyo+tiobJEwU0xNFGS1N7To8wLGmvmW v2hvCW8bvCGDUHAIJ/b2zyy4Z3p6gCbDNzID4apmKEci7FwmxzszE0hBkKuG7f9bBjr67cyxvTz 8SyGXBd9CvFPH+hm1zzZ/8l8H+KpudEcIKkCaH1Y0CRaIwssQP+lVbrVcT878svS6ZQ0gnBNLu1 595nde/uwPBjsAet+kfReYD8h9/jNF9zKFgojakZ0ItWE6TTMzmVWRv+oHdkxS6wHCIjf036qjP i0TfuYUqDnAjTGrJaEyylJA/ReeXPFkRvAtZBqByg92YeJ6/t0q95e0f1HDi3IMWKJkWW5LpVy5 B8UeFeEe7qOyZfPhxAhEFRiaz6ON4hCx1AN6ikH8roBlgxA3MDU3j2b4akqrziZlW3R+oWcNpEG ifIZmKqRdHo5OH5uw1l5pv165p1D5zJrUT4SL4jJ+9iKa7Y8bBBZV71jVO1p6lGk0ww2AQv09vF ZeUuNbE5uq8Iqd2niFKCiNou4a/LaFqD6qchnLHP6xTfisjqGTs1Cp3BAelAPevojKWne/qGaG0 hBE2y089c5l0IVg== 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-tsc2046.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/drivers/iio/adc/ti-tsc2046.c b/drivers/iio/adc/ti-tsc2046.c index 1bbb51a6683c..edcef8f11522 100644 --- a/drivers/iio/adc/ti-tsc2046.c +++ b/drivers/iio/adc/ti-tsc2046.c @@ -804,12 +804,7 @@ static int tsc2046_adc_probe(struct spi_device *spi) return -EINVAL; } - dcfg = device_get_match_data(dev); - if (!dcfg) { - const struct spi_device_id *id = spi_get_device_id(spi); - - dcfg = (const struct tsc2046_adc_dcfg *)id->driver_data; - } + dcfg = spi_get_device_match_data(spi); if (!dcfg) return -EINVAL; -- 2.43.0