Input: rotary_encoder - don't double assign input->dev.parent
authorRoi L <roeilev321_@outlook.com>
Wed, 12 Jul 2023 21:09:06 +0000 (14:09 -0700)
committerDmitry Torokhov <dmitry.torokhov@gmail.com>
Wed, 12 Jul 2023 21:10:32 +0000 (14:10 -0700)
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>
Link: https://lore.kernel.org/r/PH0P220MB0460B69CA018F5515F5FACDDDD53A@PH0P220MB0460.NAMP220.PROD.OUTLOOK.COM
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
drivers/input/misc/rotary_encoder.c

index fb3a34f8eccd2febab7dc2869bf35851b09e76c1..e94cab8133becb9b5970789a1658cb38c59ca5a2 100644 (file)
@@ -251,7 +251,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);