Skip to contentSkip to conversation

Input: da9063_onkey - avoid using OF-specific APIs

PATCH In review Dmitry Torokhov 2 participants 2 messages Dec 21, 2023 – Jan 4, 2024

Subsystems (3)
lore
Share & tools
lore

Dmitry Torokhov

author maintainer
#0 lore raw

PATCH 1/1 Input: da9063_onkey - avoid using OF-specific APIs

There is nothing OF-specific in the driver, so switch from OF properties helpers to generic device helpers.

---
 drivers/input/misc/da9063_onkey.c | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)
drivers/input/misc/da9063_onkey.c +4 -3
index a8b7f1cd0ec2..ce499c28a7b2 100644
@@ -9,11 +9,12 @@
 #include <linux/errno.h>
 #include <linux/input.h>
 #include <linux/interrupt.h>
+#include <linux/mod_devicetable.h>
 #include <linux/platform_device.h>
 #include <linux/pm_wakeirq.h>
+#include <linux/property.h>
 #include <linux/workqueue.h>
 #include <linux/regmap.h>
-#include <linux/of.h>
 #include <linux/mfd/da9063/core.h>
 #include <linux/mfd/da9063/registers.h>
 #include <linux/mfd/da9062/core.h>
@@ -199,8 +200,8 @@ static int da9063_onkey_probe(struct platform_device *pdev)
 		return dev_err_probe(&pdev->dev, -ENXIO,
 				     "Parent regmap unavailable.\n");
 
-	onkey->key_power = !of_property_read_bool(pdev->dev.of_node,
-						  "dlg,disable-key-power");
+	onkey->key_power = !device_property_read_bool(&pdev->dev,
+						      "dlg,disable-key-power");
 
 	onkey->input = devm_input_allocate_device(&pdev->dev);
 	if (!onkey->input)
Signature · 5 lines
2.43.0.195.gebba966016-goog


-- 
Dmitry
Reviewed-by on v1 1/1
#1 lore raw

Hi Dmitry Torokhov,

Thanks for the patch.

Quoted 8 lines

-----Original Message-----
From: Dmitry Torokhov <[email protected]>
Sent: Thursday, December 21, 2023 3:09 AM
To: Support Opensource <[email protected]>; Biju Das <[email protected]>
Cc: [email protected]; [email protected]
Subject: [PATCH] Input: da9063_onkey - avoid using OF-specific APIs

Quoted 4 lines

There is nothing OF-specific in the driver, so switch from OF properties helpers to generic device helpers.

Quoted 40 lines
---
 drivers/input/misc/da9063_onkey.c | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)
drivers/input/misc/da9063_onkey.c +2 -1
index a8b7f1cd0ec2..ce499c28a7b2 100644
@@ -9,11 +9,12 @@
 #include <linux/errno.h>
 #include <linux/input.h>
 #include <linux/interrupt.h>
+#include <linux/mod_devicetable.h>
 #include <linux/platform_device.h>
 #include <linux/pm_wakeirq.h>
+#include <linux/property.h>
 #include <linux/workqueue.h>
 #include <linux/regmap.h>
-#include <linux/of.h>
 #include <linux/mfd/da9063/core.h>
 #include <linux/mfd/da9063/registers.h>  #include

<linux/mfd/da9062/core.h> @@ -199,8 +200,8 @@ static int da9063_onkey_probe(struct platform_device *pdev)

drivers/input/misc/da9063_onkey.c +2 -3
 		return dev_err_probe(&pdev->dev, -ENXIO,
 				     "Parent regmap unavailable.\n");
 
-	onkey->key_power = !of_property_read_bool(pdev->dev.of_node,
-						  "dlg,disable-key-power");
+	onkey->key_power = !device_property_read_bool(&pdev->dev,
+						      "dlg,disable-key-power");
 
 	onkey->input = devm_input_allocate_device(&pdev->dev);
 	if (!onkey->input)
--

2.43.0.195.gebba966016-goog

--
Dmitry