diff mbox series

Input: da9063_onkey - avoid explicitly setting input's parent

Message ID ZYOseYfVgg0Ve6Zl@google.com (mailing list archive)
State Mainlined
Commit 0c64117d112b35dc3ba2020108ec26f538b95ae6
Headers show
Series Input: da9063_onkey - avoid explicitly setting input's parent | expand

Commit Message

Dmitry Torokhov Dec. 21, 2023, 3:09 a.m. UTC
devm_input_allocate_device() already sets parent of the new input
device, there's no need to set it up explicitly.

Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
---
 drivers/input/misc/da9063_onkey.c | 1 -
 1 file changed, 1 deletion(-)

Comments

Biju Das Jan. 4, 2024, 7:09 p.m. UTC | #1
Hi Dmitry Torokhov,

Thanks for the patch.

> -----Original Message-----
> From: Dmitry Torokhov <dmitry.torokhov@gmail.com>
> Sent: Thursday, December 21, 2023 3:10 AM
> To: Support Opensource <support.opensource@diasemi.com>; Biju Das
> <biju.das.jz@bp.renesas.com>
> Cc: linux-input@vger.kernel.org; linux-kernel@vger.kernel.org
> Subject: [PATCH] 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.
> 
> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>

Reviewed-by: Biju Das <biju.das.jz@bp.renesas.com>

Cheers,
Biju

> ---
>  drivers/input/misc/da9063_onkey.c | 1 -
>  1 file changed, 1 deletion(-)
> 
> diff --git a/drivers/input/misc/da9063_onkey.c
> b/drivers/input/misc/da9063_onkey.c
> index ce499c28a7b2..c338765e0ecd 100644
> --- a/drivers/input/misc/da9063_onkey.c
> +++ b/drivers/input/misc/da9063_onkey.c
> @@ -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
diff mbox series

Patch

diff --git a/drivers/input/misc/da9063_onkey.c b/drivers/input/misc/da9063_onkey.c
index ce499c28a7b2..c338765e0ecd 100644
--- a/drivers/input/misc/da9063_onkey.c
+++ b/drivers/input/misc/da9063_onkey.c
@@ -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);