Skip to contentSkip to conversation

iio: ssp: use PLATFORM_DEVID_NONE

PATCH Applied Krzysztof Kozlowski 2 participants 2 messages Sep 21, 2020 – Sep 23, 2020 IIO

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 iio: ssp: use PLATFORM_DEVID_NONE

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.

---
 drivers/iio/common/ssp_sensors/ssp_dev.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/iio/common/ssp_sensors/ssp_dev.c +2 -1
index a94dbcf491ce..1aee87100038 100644
@@ -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");
Signature · 1 line
2.17.1
maintainer Applied
#1 lore raw
Quoted 5 lines · On Mon, 21 Sep 2020 22:49:39 +0200 Krzysztof Kozlowski <[email protected]> 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.

Applied to the togreg branch of iio.git.

Thanks,

Jonathan

Quoted 18 lines
---
 drivers/iio/common/ssp_sensors/ssp_dev.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/iio/common/ssp_sensors/ssp_dev.c +2 -1
index a94dbcf491ce..1aee87100038 100644
@@ -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");