Skip to contentSkip to conversation

i3c: master: Use dev_to_i3cmaster()

PATCH New Axel Lin 1 participant 1 message Aug 22, 2019 I3C

lore
Share & tools
lore

Axel Lin

author
#0 lore raw

PATCH 1/1 i3c: master: Use dev_to_i3cmaster()

Since we have dev_to_i3cmaster() available, use it.

---
 drivers/i3c/master.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/i3c/master.c +1 -1
index 8ff527263f46..5c051dba32a5 100644
@@ -123,7 +123,7 @@ static struct i3c_dev_desc *dev_to_i3cdesc(struct device *dev)
 	if (dev->type == &i3c_device_type)
 		return dev_to_i3cdev(dev)->desc;
 
-	master = container_of(dev, struct i3c_master_controller, dev);
+	master = dev_to_i3cmaster(dev);
 
 	return master->this;
 }
Signature · 7 lines
2.20.1


_______________________________________________
linux-i3c mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-i3c