linux-i3c.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] i3c: make sure the PID is set before registering the device
@ 2019-12-08 14:18 Przemysław Gaj
  2019-12-09  9:47 ` Boris Brezillon
  0 siblings, 1 reply; 9+ messages in thread
From: Przemysław Gaj @ 2019-12-08 14:18 UTC (permalink / raw)
  To: bbrezillon; +Cc: linux-i3c, Przemyslaw Gaj, rafalc, vitor.soares

From: Przemyslaw Gaj <pgaj@cadence.com>

Provisioned ID (PID) is the value with which device drivers are
matched. I check the value before registering the device.

Signed-off-by: Przemyslaw Gaj <pgaj@cadence.com>
---
 drivers/i3c/master.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/i3c/master.c b/drivers/i3c/master.c
index 043691656245..07ea8b0b7736 100644
--- a/drivers/i3c/master.c
+++ b/drivers/i3c/master.c
@@ -1449,7 +1449,8 @@ i3c_master_register_new_i3c_devs(struct i3c_master_controller *master)
 		return;
 
 	i3c_bus_for_each_i3cdev(&master->bus, desc) {
-		if (desc->dev || !desc->info.dyn_addr || desc == master->this)
+		if (desc->dev || !desc->info.dyn_addr ||
+		    desc == master->this || !desc->info.pid)
 			continue;
 
 		desc->dev = kzalloc(sizeof(*desc->dev), GFP_KERNEL);
-- 
2.18.0


_______________________________________________
linux-i3c mailing list
linux-i3c@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-i3c

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

end of thread, other threads:[~2019-12-11 12:22 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-12-08 14:18 [PATCH] i3c: make sure the PID is set before registering the device Przemysław Gaj
2019-12-09  9:47 ` Boris Brezillon
2019-12-09 12:20   ` Vitor Soares
2019-12-09 12:26     ` Boris Brezillon
2019-12-10 14:28       ` Vitor Soares
2019-12-10 14:42         ` Przemysław Gaj
2019-12-10 15:23           ` Vitor Soares
2019-12-11  9:33             ` Przemysław Gaj
2019-12-11 12:21               ` Vitor Soares

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).