Received: by 2002:ab2:6309:0:b0:1fb:d597:ff75 with SMTP id s9csp454354lqt; Thu, 6 Jun 2024 08:21:36 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXs0Z9XMnYs9rnl8yLIL7RtvJJPzb7lWY2fpxXZuDdvBfZOmJwX4JH+LHOkraUqNY8ThHiqn3o8F/u+F++1vzEpZLwgkyiT1UTaWJ3pJQ== X-Google-Smtp-Source: AGHT+IHdWYqoLx6ewMGi8+YsWbFZVXftGrXc7as1ptuiSuQLjoUtnGsBvzXp6cNp222yI+gXxxQ9 X-Received: by 2002:a17:902:f54c:b0:1f4:bcef:e96e with SMTP id d9443c01a7336-1f6b8c85cc7mr43214505ad.10.1717687296071; Thu, 06 Jun 2024 08:21:36 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1717687296; cv=pass; d=google.com; s=arc-20160816; b=txg0hliTXHbc1ekj7Pa4ZIxR3L/oIwqtHss01Ar1B4ROiNQPSqFCucP518bVUoExx7 kUmwTrIr05qfUbHQmff7ty0A9XosUx+zrGvYTBJl6FIk2gIB4/RHyZbh9P4ExB3lSrcO K5sIx7Zf2u+7eHsh69WVzhmMWDPYTtZkNJulxdgwcv+rQ9qi/yZxHcA0nMwAkhT4yp5k 3VquqI2JHAPtScl75VYa4WtOe2BRTwr/wH6WRPxRdmRJOQvaekc41bNqfuSVGs5Eal1i lTAznR7t6C1/BHU0yB2rOMW4uLjDxB9ZUYfcvsLrQRMC7NpUhgSvIqb+JEBRHTrXcG+R kMGw== 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=L85NsvGoDUeQoY3YtE8+i2I/DxvNN1zDXSSC47EQKas=; fh=b3TD/knX/aI/WOP8miyr0pzt8K8UTR02pXJ2Q//zTAY=; b=n8gjsQgR1Nc3edsQyTujXVrhHurBNX4zZYBctuWe+dVX069Tl5PJF1zOIbkjK3mo0j VDFEj5NTKYdE3O8BWAXqGbSa/gXQYJywRxMqx7eYagcFQwOpK4xf/mfIvDrmlRtsRkzp qN4uiAYpaAcN6Xx3x1uh9hh/YFOMkoOFHX+uAjMPeD1xsPyIGp2dtPi8jjo075ZA8Kut 2pfdsUQucfuSvvHc7dtPhRo5LvfUpfLOwOtZhNJI0xLAgHI10h0GGBfaJ/GiKpFE+Ing CFVX+yGkrU1m8Rr+dBUWLQTgN+/2X+mSR7YXFIN93xZxJfyHPQPKAlwZ/cFZGhqRNkUc d+pg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Wz1GnV2t; 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-204464-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-204464-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [147.75.48.161]) by mx.google.com with ESMTPS id 41be03b00d2f7-6de2895a6c7si1331859a12.623.2024.06.06.08.21.35 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 06 Jun 2024 08:21:36 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-204464-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) client-ip=147.75.48.161; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Wz1GnV2t; 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-204464-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-204464-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 sy.mirrors.kernel.org (Postfix) with ESMTPS id 3B8FBB2ADCE for ; Thu, 6 Jun 2024 14:53:40 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 92F0C1AB8F5; Thu, 6 Jun 2024 14:27:05 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="Wz1GnV2t" Received: from mail-wm1-f42.google.com (mail-wm1-f42.google.com [209.85.128.42]) (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 2C36B1AB515 for ; Thu, 6 Jun 2024 14:27:02 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.42 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717684024; cv=none; b=ZRgfWOGdyEO5pcTmEZDiAtmn3w9tPnUAZSXjo73PhZldxtBypq9E6j3bSevNM28dGdbxeTLXK4Rh3KEwpDbLN2tY6APuM/VoZzwrdd4UlpXiLLEipXJBxhIP35lhBn7W2bQo9QlH3YgcUN1o4keO5qAZaanz30ahOHlDPTqiVF8= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717684024; c=relaxed/simple; bh=GEQpZ/AnK0wMBcP0xVmMauOZlz+QTE3U8F59z75ODIs=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=F637+mZLOlpRuPkm45fzQmJiLE9WoLyIxoMjNUk7yZQkxaPzX+JDgIhjhZcIvpMHa4vspjLk0SjNTgODGdOjCVXOVA4jdsY6Q/KvdBpFOH0cbd6fFRLFEDxzkcNu4kYTzLcqeLNssr3RtlyABNI2RcCdJA1dmu26XF+2H7X1fJI= 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=Wz1GnV2t; arc=none smtp.client-ip=209.85.128.42 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-f42.google.com with SMTP id 5b1f17b1804b1-421396e3918so13722795e9.0 for ; Thu, 06 Jun 2024 07:27:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1717684021; x=1718288821; 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=L85NsvGoDUeQoY3YtE8+i2I/DxvNN1zDXSSC47EQKas=; b=Wz1GnV2t6HzlETKByCJK1yXnPY9uYtRIza67KgmSaQdp4fBaeV51kfpX9PxB7xgNjJ MTIKDm7hII3+SvfOcslbtvQ8dwLxJYAB2q0Enjn/ilDaBvevszIGUDdmg/MaEcWGHUxT CeTBMwxPnw3Gd9IP2+bNQeg0wn22w+9VyYss5VwYva/FcWCMYc65GUPplYFkq3dpAatO ujm+N+E+QKly3KN0LJug36/P1QecCp3/742BbxL+gyqQZNp7SvVUjUoL35yL2u2HB7/Q 5lrE9Sp87trQdJlJxTuNn90aQzbyoCmxvJCO9oOxLlJDEwIzewz4lZ3eYRBT1od9kHoz aqMQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1717684021; x=1718288821; 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=L85NsvGoDUeQoY3YtE8+i2I/DxvNN1zDXSSC47EQKas=; b=vvirJOmOGy5hOUP4wqSVSR0/RkS1kJI8znculq6LZGxYTJFfvN623/g2mdxZDIrlhp lvR4RShTF6tE3uDNj7sb3v0rA7H/QBK3wCYeSVUKZDVDTs4z99JHwXpqiorsjbX2By8K iCnRcAbtAPr9AiDfOUCJttwqb3n0INc7AMMcAvMJWD9aEFSApIzY3KnRhR1IzH5CJ3em 075O4uoKjEsllED40swuT+LQ+sp8Q7/ZDSZ5yaJUHCqPkk5kbUGIjZISvnzaFDEEkTer z0V+84yRa57XOPkjnYiTk2rdTToTbCOdkkdGOLdJbY0o190AsNk7sRUjiZys8vDURZsY bVNw== X-Forwarded-Encrypted: i=1; AJvYcCUYlaSl4J+qduktXt062icVfY2NVBsaBNrBXLOZhEKI7CCZn1sskTP06EAPMFWdZ6bXzb4W8fB3n1f9u8y15v1HBk523AG/RWZn3Wk2 X-Gm-Message-State: AOJu0YwmOe9MRgQqeHaypDOGHuR8cPzu1zWSxIBFz9HAQra2D51xRIoJ xCUU1FOXwYxnY9Nb7l+RnmOAPwH9gxNaYoh1vcLh/hk3gSPR0UA7RWbrELI2Mog= X-Received: by 2002:a05:600c:4f8e:b0:421:59b0:f364 with SMTP id 5b1f17b1804b1-42159b0f616mr41722905e9.40.1717684021630; Thu, 06 Jun 2024 07:27:01 -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.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 06 Jun 2024 07:27:01 -0700 (PDT) From: Krzysztof Kozlowski Date: Thu, 06 Jun 2024 16:26:45 +0200 Subject: [PATCH 3/8] iio: adc: max11205: 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-3-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=886; i=krzysztof.kozlowski@linaro.org; h=from:subject:message-id; bh=GEQpZ/AnK0wMBcP0xVmMauOZlz+QTE3U8F59z75ODIs=; b=owEBbQKS/ZANAwAKAcE3ZuaGi4PXAcsmYgBmYccqs/TdFoQX8Hj7tD+FCm9HPlS2XvTzAWiZq DTX2QJspb+JAjMEAAEKAB0WIQTd0mIoPREbIztuuKjBN2bmhouD1wUCZmHHKgAKCRDBN2bmhouD 1zRbD/9AUW+4LTW3tPTMqOfojfkOFb8pejCotSDMTJFUxA4rjhhVexJHSt/jq+FpPtM7ZJgkK/O Q4cwSlOe0xuELztzpNuxrub3iNctxULPh4pJVGvtwh8haeb7PU+1MZXlqOzzUDnrQYVovEM6lJ/ esCjFMwcVn0943KaXwQ8YSO3DYgiCOOPTdlekz/n34YExOgIO+x8POhaSwbV0Sp/F6manata7as QkJmony+BOQkKtZHi14SpQpJcE8+yLsPYgBPKewSJi3zmXOd4SaJ2GMpNkNyAETY7XaeBKMzQZ0 D4cwv05n91l+s8NhKKT+rxYLYJKXIZwT+LNhbH2DaDwDqDFQu+1Apj2dd3GlocytKAiK7G0e0bd 4+H4Pe8LJsWLyjNJQz7575z6cdScFvduuhzHIPPvfWBvmEU5Zb9DsJAtD63Y5ToKSk6it9YIAQI ZZlk+upT/6fH0VkpEbHDQ7myQQeUW7opuRw2uICCPyB7l8G7uImtbR8uhAi+hpbyV82N8VLxFJV +vd7SSLJoMkX7zNxF8GzFSf4sQvWWX4ica4P/rUALWrjYqzxXGNPzzrbnl1+hTMNmnD7srYLV0R N2XvRvmHJtM5v3wBievswHHJEWdvB3QzcbNxQicbL896X5FfGGNmKgnglt3rxIISi6RvUROE851 mH7aNKr5pNd8Hdg== 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/max11205.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/drivers/iio/adc/max11205.c b/drivers/iio/adc/max11205.c index 65fc32971ba5..9d8bc0b154dd 100644 --- a/drivers/iio/adc/max11205.c +++ b/drivers/iio/adc/max11205.c @@ -116,10 +116,7 @@ static int max11205_probe(struct spi_device *spi) ad_sd_init(&st->sd, indio_dev, spi, &max11205_sigma_delta_info); - st->chip_info = device_get_match_data(&spi->dev); - if (!st->chip_info) - st->chip_info = - (const struct max11205_chip_info *)spi_get_device_id(spi)->driver_data; + st->chip_info = spi_get_device_match_data(spi); indio_dev->name = st->chip_info->name; indio_dev->modes = INDIO_DIRECT_MODE; -- 2.43.0