diff options
Diffstat (limited to 'doc/develop/driver-model/livetree.rst')
-rw-r--r-- | doc/develop/driver-model/livetree.rst | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/doc/develop/driver-model/livetree.rst b/doc/develop/driver-model/livetree.rst index 579eef5ca9f..20055d559a6 100644 --- a/doc/develop/driver-model/livetree.rst +++ b/doc/develop/driver-model/livetree.rst @@ -103,7 +103,7 @@ The new code is: struct udevice *bus; - i2c_bus->regs = (struct i2c_ctlr *)dev_read_addr(dev); + i2c_bus->regs = dev_read_addr_ptr(dev); plat->frequency = dev_read_u32_default(bus, "spi-max-frequency", 500000); The dev_read\_...() interface is more convenient and works with both the |