linux-input.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] Input: synaptics-rmi4 - Fix device hierarchy
@ 2021-10-29 13:42 Loic Poulain
  2021-11-06  2:46 ` Dmitry Torokhov
  0 siblings, 1 reply; 2+ messages in thread
From: Loic Poulain @ 2021-10-29 13:42 UTC (permalink / raw)
  To: dmitry.torokhov; +Cc: linux-input, aduggan, Loic Poulain

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 <loic.poulain@linaro.org>
---
 drivers/input/rmi4/rmi_bus.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/input/rmi4/rmi_bus.c b/drivers/input/rmi4/rmi_bus.c
index af706a58..a16c1dd 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;
 
-- 
2.7.4


^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-11-06  2:46 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-10-29 13:42 [PATCH] Input: synaptics-rmi4 - Fix device hierarchy Loic Poulain
2021-11-06  2:46 ` Dmitry Torokhov

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).