diff options
Diffstat (limited to 'drivers/i2c/ast_i2c.c')
-rw-r--r-- | drivers/i2c/ast_i2c.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/i2c/ast_i2c.c b/drivers/i2c/ast_i2c.c index 214362d04b..2cdfb5561b 100644 --- a/drivers/i2c/ast_i2c.c +++ b/drivers/i2c/ast_i2c.c @@ -92,9 +92,9 @@ static int ast_i2c_ofdata_to_platdata(struct udevice *dev) struct ast_i2c_priv *priv = dev_get_priv(dev); int ret; - priv->regs = devfdt_get_addr_ptr(dev); - if (IS_ERR(priv->regs)) - return PTR_ERR(priv->regs); + priv->regs = dev_read_addr_ptr(dev); + if (!priv->regs) + return -EINVAL; ret = clk_get_by_index(dev, 0, &priv->clk); if (ret < 0) { |