From: Loic Poulain Date: Fri, 29 Oct 2021 13:42:51 +0000 (+0200) Subject: Input: synaptics-rmi4 - Fix device hierarchy X-Git-Tag: v6.1~32^2~64^2~6 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=6e4860410b828f8576c0c003d412fcf8a7d433f9;p=platform%2Fkernel%2Flinux-starfive.git Input: synaptics-rmi4 - Fix device hierarchy The created rmi device is orphan, which breaks the real device hierarchy, and can cause some trouble, especially during suspend and resume sequences. E.g. in case of I2C, rmi dev should be child of the I2C client device. Fix this, assigning the transport device as parent of the rmi device. Signed-off-by: Loic Poulain Link: https://lore.kernel.org/r/1635514971-18415-1-git-send-email-loic.poulain@linaro.org Signed-off-by: Dmitry Torokhov --- diff --git a/drivers/input/rmi4/rmi_bus.c b/drivers/input/rmi4/rmi_bus.c index 24f31a5..50a0134 100644 --- a/drivers/input/rmi4/rmi_bus.c +++ b/drivers/input/rmi4/rmi_bus.c @@ -90,6 +90,7 @@ int rmi_register_transport_device(struct rmi_transport_dev *xport) rmi_dev->dev.bus = &rmi_bus_type; rmi_dev->dev.type = &rmi_device_type; + rmi_dev->dev.parent = xport->dev; xport->rmi_dev = rmi_dev;