All of lore.kernel.org
 help / color / mirror / Atom feed
From: Nuno Sa <nuno.sa@analog.com>
To: <linux-iio@vger.kernel.org>, <devicetree@vger.kernel.org>
Cc: Jonathan Cameron <jic23@kernel.org>,
	Lars-Peter Clausen <lars@metafoo.de>,
	Michael Hennerich <Michael.Hennerich@analog.com>,
	Rob Herring <robh+dt@kernel.org>,
	Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>,
	Conor Dooley <conor+dt@kernel.org>
Subject: [PATCH 1/6] iio: temperature: ltc2983: make use of spi_get_device_match_data()
Date: Thu, 22 Feb 2024 13:55:52 +0100	[thread overview]
Message-ID: <20240222-ltc2983-misc-improv-v1-1-cf7d4457e98c@analog.com> (raw)
In-Reply-To: <20240222-ltc2983-misc-improv-v1-0-cf7d4457e98c@analog.com>

Use spi_get_device_match_data() as it simplifies the code. No functional
change intended...

Signed-off-by: Nuno Sa <nuno.sa@analog.com>
---
 drivers/iio/temperature/ltc2983.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/iio/temperature/ltc2983.c b/drivers/iio/temperature/ltc2983.c
index fcb96c44d954..acc631857e27 100644
--- a/drivers/iio/temperature/ltc2983.c
+++ b/drivers/iio/temperature/ltc2983.c
@@ -1614,9 +1614,7 @@ static int ltc2983_probe(struct spi_device *spi)
 
 	st = iio_priv(indio_dev);
 
-	st->info = device_get_match_data(&spi->dev);
-	if (!st->info)
-		st->info = (void *)spi_get_device_id(spi)->driver_data;
+	st->info = spi_get_device_match_data(spi);
 	if (!st->info)
 		return -ENODEV;
 

-- 
2.43.2


  reply	other threads:[~2024-02-22 12:53 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-02-22 12:55 [PATCH 0/6] iio: temperature: ltc2983: small improvements Nuno Sa
2024-02-22 12:55 ` Nuno Sa [this message]
2024-02-24 18:31   ` [PATCH 1/6] iio: temperature: ltc2983: make use of spi_get_device_match_data() Jonathan Cameron
2024-02-22 12:55 ` [PATCH 2/6] iio: temperature: ltc2983: rename ltc2983_parse_dt() Nuno Sa
2024-02-24 18:32   ` Jonathan Cameron
2024-02-22 12:55 ` [PATCH 3/6] iio: temperature: ltc2983: convert to dev_err_probe() Nuno Sa
2024-02-24 18:44   ` Jonathan Cameron
2024-02-26  8:41     ` Nuno Sá
2024-02-22 12:55 ` [PATCH 4/6] iio: temperature: ltc2983: explicitly set the name in chip_info Nuno Sa
2024-02-24 18:47   ` Jonathan Cameron
2024-02-22 12:55 ` [PATCH 5/6] dt-bindings: iio: temperature: ltc2983: document power supply Nuno Sa
2024-02-22 15:40   ` Conor Dooley
2024-02-22 16:41     ` Nuno Sá
2024-02-22 17:54       ` Conor Dooley
2024-02-22 19:15         ` Jonathan Cameron
2024-02-23  8:17         ` Nuno Sá
2024-02-23 18:43           ` Conor Dooley
2024-02-22 12:55 ` [PATCH 6/6] iio: temperature: ltc2983: support vdd regulator Nuno Sa

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20240222-ltc2983-misc-improv-v1-1-cf7d4457e98c@analog.com \
    --to=nuno.sa@analog.com \
    --cc=Michael.Hennerich@analog.com \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=jic23@kernel.org \
    --cc=krzysztof.kozlowski+dt@linaro.org \
    --cc=lars@metafoo.de \
    --cc=linux-iio@vger.kernel.org \
    --cc=robh+dt@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.