public inbox for linux-iio@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] staging: iio: ad2s1210: Remove platform data NULL check in probe
@ 2019-06-06 10:34 Alexandru Ardelean
  2019-06-08 11:58 ` Jonathan Cameron
  0 siblings, 1 reply; 2+ messages in thread
From: Alexandru Ardelean @ 2019-06-06 10:34 UTC (permalink / raw)
  To: linux-iio; +Cc: Alexandru Ardelean

The driver only needs to access GPIOs via GPIOLIB. And SPI can be
configured via device-tree or ACPI.

The platform data is a remnant from another time, and should not cause the
driver to error out during probing if it is NULL.
Also, it's not used.

Signed-off-by: Alexandru Ardelean <alexandru.ardelean@analog.com>
---
 drivers/staging/iio/resolver/ad2s1210.c | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/drivers/staging/iio/resolver/ad2s1210.c b/drivers/staging/iio/resolver/ad2s1210.c
index b6be0bc202f5..0c1bd108c386 100644
--- a/drivers/staging/iio/resolver/ad2s1210.c
+++ b/drivers/staging/iio/resolver/ad2s1210.c
@@ -647,9 +647,6 @@ static int ad2s1210_probe(struct spi_device *spi)
 	struct ad2s1210_state *st;
 	int ret;
 
-	if (!spi->dev.platform_data)
-		return -EINVAL;
-
 	indio_dev = devm_iio_device_alloc(&spi->dev, sizeof(*st));
 	if (!indio_dev)
 		return -ENOMEM;
-- 
2.20.1


^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2019-06-08 11:58 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-06-06 10:34 [PATCH] staging: iio: ad2s1210: Remove platform data NULL check in probe Alexandru Ardelean
2019-06-08 11:58 ` Jonathan Cameron

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox