diff mbox series

i3c: master: Use dev_to_i3cmaster()

Message ID 20190816070825.5411-1-axel.lin@ingics.com (mailing list archive)
State Mainlined
Commit 6030f42d20cedc04df019891851320f3e257038b
Headers show
Series i3c: master: Use dev_to_i3cmaster() | expand

Commit Message

Axel Lin Aug. 16, 2019, 7:08 a.m. UTC
Since we have dev_to_i3cmaster() available, use it.

Signed-off-by: Axel Lin <axel.lin@ingics.com>
---
 drivers/i3c/master.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/drivers/i3c/master.c b/drivers/i3c/master.c
index 8ff527263f46..5c051dba32a5 100644
--- a/drivers/i3c/master.c
+++ b/drivers/i3c/master.c
@@ -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;
 }