Skip to contentSkip to conversation

Input: da9063_onkey - avoid explicitly setting input's parent

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 explicitly setting input's parent

devm_input_allocate_device() already sets parent of the new input device, there's no need to set it up explicitly.

---
 drivers/input/misc/da9063_onkey.c | 1 -
 1 file changed, 1 deletion(-)
drivers/input/misc/da9063_onkey.c +0 -1
index ce499c28a7b2..c338765e0ecd 100644
@@ -211,7 +211,6 @@ static int da9063_onkey_probe(struct platform_device *pdev)
 	snprintf(onkey->phys, sizeof(onkey->phys), "%s/input0",
 		 onkey->config->name);
 	onkey->input->phys = onkey->phys;
-	onkey->input->dev.parent = &pdev->dev;
 
 	input_set_capability(onkey->input, EV_KEY, KEY_POWER);
 
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 9 lines

-----Original Message-----
From: Dmitry Torokhov <[email protected]>
Sent: Thursday, December 21, 2023 3:10 AM
To: Support Opensource <[email protected]>; Biju Das <[email protected]>
Cc: [email protected]; [email protected]
Subject: [PATCH] Input: da9063_onkey - avoid explicitly setting input's parent

Quoted 4 lines

devm_input_allocate_device() already sets parent of the new input device, there's no need to set it up explicitly.

Cheers,
Biju

Quoted 24 lines
---
 drivers/input/misc/da9063_onkey.c | 1 -
 1 file changed, 1 deletion(-)
drivers/input/misc/da9063_onkey.c +0 -2
index ce499c28a7b2..c338765e0ecd 100644
@@ -211,7 +211,6 @@ static int da9063_onkey_probe(struct platform_device
 *pdev)
 	snprintf(onkey->phys, sizeof(onkey->phys), "%s/input0",
 		 onkey->config->name);
 	onkey->input->phys = onkey->phys;
-	onkey->input->dev.parent = &pdev->dev;
 
 	input_set_capability(onkey->input, EV_KEY, KEY_POWER);
 
--

2.43.0.195.gebba966016-goog

--
Dmitry