Input: cpcap-pwrbutton - do not set input parent explicitly
authorDmitry Torokhov <dmitry.torokhov@gmail.com>
Sat, 16 Oct 2021 05:25:58 +0000 (22:25 -0700)
committerDmitry Torokhov <dmitry.torokhov@gmail.com>
Sun, 17 Oct 2021 01:51:02 +0000 (18:51 -0700)
We are using devm_input_allocate_device() that already sets parent
of the input device, there is no need to do that again.

Reviewed-by: Sebastian Reichel <sebastian.reichel@collabora.com>
Link: https://lore.kernel.org/r/YWpiZqrfC9+GQsM4@google.com
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
drivers/input/misc/cpcap-pwrbutton.c

index 372cb44..879790b 100644 (file)
@@ -77,7 +77,6 @@ static int cpcap_power_button_probe(struct platform_device *pdev)
 
        button->idev->name = "cpcap-pwrbutton";
        button->idev->phys = "cpcap-pwrbutton/input0";
-       button->idev->dev.parent = button->dev;
        input_set_capability(button->idev, EV_KEY, KEY_POWER);
 
        err = devm_request_threaded_irq(&pdev->dev, irq, NULL,