i3c: master: Use dev_to_i3cmaster()
authorAxel Lin <axel.lin@ingics.com>
Fri, 16 Aug 2019 07:08:25 +0000 (15:08 +0800)
committerBoris Brezillon <boris.brezillon@collabora.com>
Tue, 27 Aug 2019 07:43:59 +0000 (09:43 +0200)
Since we have dev_to_i3cmaster() available, use it.

Signed-off-by: Axel Lin <axel.lin@ingics.com>
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
drivers/i3c/master.c

index 8ff527263f469024cfffed25d78f74192992a096..5c051dba32a51fa8a00b3e7304cbc7bc9cad2aee 100644 (file)
@@ -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;
 }