diff mbox series

Input: rotary_encoder - don't double assign input->dev.parent

Message ID PH0P220MB0460B69CA018F5515F5FACDDDD53A@PH0P220MB0460.NAMP220.PROD.OUTLOOK.COM
State Accepted
Commit 0859c1764c77dd61adf46e3d0c440145118d9e0e
Headers show
Series Input: rotary_encoder - don't double assign input->dev.parent | expand

Commit Message

Roi L June 7, 2023, 9:10 a.m. UTC
devm_input_allocate_device() already assigns the @dev.parent field of the
input device/structure, so there's no need to reassign input->dev.parent
to dev.

Signed-off-by: Roi L <roeilev321_@outlook.com>
---
 drivers/input/misc/rotary_encoder.c | 1 -
 1 file changed, 1 deletion(-)

Comments

Dmitry Torokhov July 12, 2023, 9:11 p.m. UTC | #1
On Wed, Jun 07, 2023 at 12:10:40PM +0300, Roi L wrote:
> devm_input_allocate_device() already assigns the @dev.parent field of the
> input device/structure, so there's no need to reassign input->dev.parent
> to dev.
> 
> Signed-off-by: Roi L <roeilev321_@outlook.com>

Applied, thank you.
diff mbox series

Patch

diff --git a/drivers/input/misc/rotary_encoder.c b/drivers/input/misc/rotary_encoder.c
index 22ec62083065..5c11cbe30167 100644
--- a/drivers/input/misc/rotary_encoder.c
+++ b/drivers/input/misc/rotary_encoder.c
@@ -255,7 +255,6 @@  static int rotary_encoder_probe(struct platform_device *pdev)
 
 	input->name = pdev->name;
 	input->id.bustype = BUS_HOST;
-	input->dev.parent = dev;
 
 	if (encoder->relative_axis)
 		input_set_capability(input, EV_REL, encoder->axis);