linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] iio: ssp: use PLATFORM_DEVID_NONE
@ 2020-09-21 20:49 Krzysztof Kozlowski
  2020-09-23 20:32 ` Jonathan Cameron
  0 siblings, 1 reply; 2+ messages in thread
From: Krzysztof Kozlowski @ 2020-09-21 20:49 UTC (permalink / raw)
  To: Jonathan Cameron, Hartmut Knaack, Lars-Peter Clausen,
	Peter Meerwald-Stadler, linux-iio, linux-kernel
  Cc: Krzysztof Kozlowski

Use PLATFORM_DEVID_NONE define instead of "-1" value because:
 - it brings some meaning,
 - it might point attention why auto device ID was not used.

Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
---
 drivers/iio/common/ssp_sensors/ssp_dev.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/iio/common/ssp_sensors/ssp_dev.c b/drivers/iio/common/ssp_sensors/ssp_dev.c
index a94dbcf491ce..1aee87100038 100644
--- a/drivers/iio/common/ssp_sensors/ssp_dev.c
+++ b/drivers/iio/common/ssp_sensors/ssp_dev.c
@@ -503,7 +503,8 @@ static int ssp_probe(struct spi_device *spi)
 		return -ENODEV;
 	}
 
-	ret = mfd_add_devices(&spi->dev, -1, sensorhub_sensor_devs,
+	ret = mfd_add_devices(&spi->dev, PLATFORM_DEVID_NONE,
+			      sensorhub_sensor_devs,
 			      ARRAY_SIZE(sensorhub_sensor_devs), NULL, 0, NULL);
 	if (ret < 0) {
 		dev_err(&spi->dev, "mfd add devices fail\n");
-- 
2.17.1


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

* Re: [PATCH] iio: ssp: use PLATFORM_DEVID_NONE
  2020-09-21 20:49 [PATCH] iio: ssp: use PLATFORM_DEVID_NONE Krzysztof Kozlowski
@ 2020-09-23 20:32 ` Jonathan Cameron
  0 siblings, 0 replies; 2+ messages in thread
From: Jonathan Cameron @ 2020-09-23 20:32 UTC (permalink / raw)
  To: Krzysztof Kozlowski
  Cc: Hartmut Knaack, Lars-Peter Clausen, Peter Meerwald-Stadler,
	linux-iio, linux-kernel

On Mon, 21 Sep 2020 22:49:39 +0200
Krzysztof Kozlowski <krzk@kernel.org> wrote:

> Use PLATFORM_DEVID_NONE define instead of "-1" value because:
>  - it brings some meaning,
>  - it might point attention why auto device ID was not used.
> 
> Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
Applied to the togreg branch of iio.git.

Thanks,

Jonathan

> ---
>  drivers/iio/common/ssp_sensors/ssp_dev.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/iio/common/ssp_sensors/ssp_dev.c b/drivers/iio/common/ssp_sensors/ssp_dev.c
> index a94dbcf491ce..1aee87100038 100644
> --- a/drivers/iio/common/ssp_sensors/ssp_dev.c
> +++ b/drivers/iio/common/ssp_sensors/ssp_dev.c
> @@ -503,7 +503,8 @@ static int ssp_probe(struct spi_device *spi)
>  		return -ENODEV;
>  	}
>  
> -	ret = mfd_add_devices(&spi->dev, -1, sensorhub_sensor_devs,
> +	ret = mfd_add_devices(&spi->dev, PLATFORM_DEVID_NONE,
> +			      sensorhub_sensor_devs,
>  			      ARRAY_SIZE(sensorhub_sensor_devs), NULL, 0, NULL);
>  	if (ret < 0) {
>  		dev_err(&spi->dev, "mfd add devices fail\n");


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

end of thread, other threads:[~2020-09-23 20:33 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-09-21 20:49 [PATCH] iio: ssp: use PLATFORM_DEVID_NONE Krzysztof Kozlowski
2020-09-23 20:32 ` Jonathan Cameron

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).