Skip to contentSkip to conversation

iio: proximity: ping: Replace OF specific code by device_get_match_data()

PATCH Applied Andy Shevchenko 2 participants 2 messages Apr 13, 2022 – Apr 16, 2022

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 iio: proximity: ping: Replace OF specific code by device_get_match_data()

Instead of calling the OF specific API, use device_get_match_data().

---
 drivers/iio/proximity/ping.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)
drivers/iio/proximity/ping.c +2 -3
index 24a97d41e115..d56e037378de 100644
@@ -29,9 +29,8 @@
 #include <linux/err.h>
 #include <linux/gpio/consumer.h>
 #include <linux/kernel.h>
+#include <linux/mod_devicetable.h>
 #include <linux/module.h>
-#include <linux/of.h>
-#include <linux/of_device.h>
 #include <linux/platform_device.h>
 #include <linux/property.h>
 #include <linux/sched.h>
@@ -288,7 +287,7 @@ static int ping_probe(struct platform_device *pdev)
 
 	data = iio_priv(indio_dev);
 	data->dev = dev;
-	data->cfg = of_device_get_match_data(dev);
+	data->cfg = device_get_match_data(dev);
 
 	mutex_init(&data->lock);
 	init_completion(&data->rising);
Signature · 1 line
2.35.1
maintainer Applied
#1 lore raw
Quoted 3 lines · On Wed, 13 Apr 2022 21:34:21 +0300 Andy Shevchenko…

Instead of calling the OF specific API, use device_get_match_data().

Applied.

Thanks,

Jonathan

Quoted 28 lines
---
 drivers/iio/proximity/ping.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)
drivers/iio/proximity/ping.c +2 -3
index 24a97d41e115..d56e037378de 100644
@@ -29,9 +29,8 @@
 #include <linux/err.h>
 #include <linux/gpio/consumer.h>
 #include <linux/kernel.h>
+#include <linux/mod_devicetable.h>
 #include <linux/module.h>
-#include <linux/of.h>
-#include <linux/of_device.h>
 #include <linux/platform_device.h>
 #include <linux/property.h>
 #include <linux/sched.h>
@@ -288,7 +287,7 @@ static int ping_probe(struct platform_device *pdev)
 
 	data = iio_priv(indio_dev);
 	data->dev = dev;
-	data->cfg = of_device_get_match_data(dev);
+	data->cfg = device_get_match_data(dev);
 
 	mutex_init(&data->lock);
 	init_completion(&data->rising);