diff mbox series

staging: iio: ad2s1210: Remove platform data NULL check in probe

Message ID 20190606103409.28160-1-alexandru.ardelean@analog.com (mailing list archive)
State New, archived
Headers show
Series staging: iio: ad2s1210: Remove platform data NULL check in probe | expand

Commit Message

Alexandru Ardelean June 6, 2019, 10:34 a.m. UTC
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(-)

Comments

Jonathan Cameron June 8, 2019, 11:58 a.m. UTC | #1
On Thu, 6 Jun 2019 13:34:09 +0300
Alexandru Ardelean <alexandru.ardelean@analog.com> wrote:

> 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>

Applied to the togreg branch of iio.git and pushed out as testing for
the autobuilders to do not much with it.

Thanks,

Jonathan

> ---
>  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;
diff mbox series

Patch

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;