summaryrefslogtreecommitdiffstats
path: root/drivers/i2c/mxc_i2c.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/i2c/mxc_i2c.c')
-rw-r--r--drivers/i2c/mxc_i2c.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/drivers/i2c/mxc_i2c.c b/drivers/i2c/mxc_i2c.c
index d486dab043..0362ec6763 100644
--- a/drivers/i2c/mxc_i2c.c
+++ b/drivers/i2c/mxc_i2c.c
@@ -914,7 +914,7 @@ static int mxc_i2c_probe(struct udevice *bus)
}
i2c_bus->base = addr;
- i2c_bus->index = bus->seq;
+ i2c_bus->index = dev_seq(bus);
i2c_bus->bus = bus;
/* Enable clk */
@@ -930,7 +930,7 @@ static int mxc_i2c_probe(struct udevice *bus)
return ret;
}
#else
- ret = enable_i2c_clk(1, bus->seq);
+ ret = enable_i2c_clk(1, dev_seq(bus));
if (ret < 0)
return ret;
#endif
@@ -942,7 +942,7 @@ static int mxc_i2c_probe(struct udevice *bus)
ret = fdt_stringlist_search(fdt, node, "pinctrl-names", "gpio");
if (ret < 0) {
debug("i2c bus %d at 0x%2lx, no gpio pinctrl state.\n",
- bus->seq, i2c_bus->base);
+ dev_seq(bus), i2c_bus->base);
} else {
ret = gpio_request_by_name_nodev(offset_to_ofnode(node),
"scl-gpios", 0, &i2c_bus->scl_gpio,
@@ -955,7 +955,7 @@ static int mxc_i2c_probe(struct udevice *bus)
ret || ret2) {
dev_err(bus,
"i2c bus %d at 0x%2lx, fail to request scl/sda gpio\n",
- bus->seq, i2c_bus->base);
+ dev_seq(bus), i2c_bus->base);
return -EINVAL;
}
}
@@ -966,7 +966,7 @@ static int mxc_i2c_probe(struct udevice *bus)
*/
debug("i2c : controller bus %d at %lu , speed %d: ",
- bus->seq, i2c_bus->base,
+ dev_seq(bus), i2c_bus->base,
i2c_bus->speed);
return 0;
@@ -1072,7 +1072,7 @@ U_BOOT_DRIVER(i2c_mxc) = {
.id = UCLASS_I2C,
.of_match = mxc_i2c_ids,
.probe = mxc_i2c_probe,
- .priv_auto_alloc_size = sizeof(struct mxc_i2c_bus),
+ .priv_auto = sizeof(struct mxc_i2c_bus),
.ops = &mxc_i2c_ops,
.flags = DM_FLAG_PRE_RELOC,
};