summaryrefslogtreecommitdiffstats
path: root/drivers/gpio/vybrid_gpio.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/gpio/vybrid_gpio.c')
-rw-r--r--drivers/gpio/vybrid_gpio.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/drivers/gpio/vybrid_gpio.c b/drivers/gpio/vybrid_gpio.c
index 4efff5c364..fcce90c53c 100644
--- a/drivers/gpio/vybrid_gpio.c
+++ b/drivers/gpio/vybrid_gpio.c
@@ -93,7 +93,7 @@ static const struct dm_gpio_ops gpio_vybrid_ops = {
static int vybrid_gpio_probe(struct udevice *dev)
{
struct vybrid_gpios *gpios = dev_get_priv(dev);
- struct vybrid_gpio_platdata *plat = dev_get_platdata(dev);
+ struct vybrid_gpio_plat *plat = dev_get_plat(dev);
struct gpio_dev_priv *uc_priv = dev_get_uclass_priv(dev);
uc_priv->bank_name = plat->port_name;
@@ -104,9 +104,9 @@ static int vybrid_gpio_probe(struct udevice *dev)
return 0;
}
-static int vybrid_gpio_odata_to_platdata(struct udevice *dev)
+static int vybrid_gpio_odata_to_plat(struct udevice *dev)
{
- struct vybrid_gpio_platdata *plat = dev_get_platdata(dev);
+ struct vybrid_gpio_plat *plat = dev_get_plat(dev);
fdt_addr_t base_addr;
base_addr = dev_read_addr(dev);
@@ -114,7 +114,7 @@ static int vybrid_gpio_odata_to_platdata(struct udevice *dev)
return -EINVAL;
plat->base = base_addr;
- plat->chip = dev->req_seq;
+ plat->chip = dev_seq(dev);
plat->port_name = fdt_get_name(gd->fdt_blob, dev_of_offset(dev), NULL);
return 0;
@@ -130,8 +130,8 @@ U_BOOT_DRIVER(gpio_vybrid) = {
.id = UCLASS_GPIO,
.ops = &gpio_vybrid_ops,
.of_match = vybrid_gpio_ids,
- .ofdata_to_platdata = vybrid_gpio_odata_to_platdata,
+ .of_to_plat = vybrid_gpio_odata_to_plat,
.probe = vybrid_gpio_probe,
- .priv_auto_alloc_size = sizeof(struct vybrid_gpios),
- .platdata_auto_alloc_size = sizeof(struct vybrid_gpio_platdata),
+ .priv_auto = sizeof(struct vybrid_gpios),
+ .plat_auto = sizeof(struct vybrid_gpio_plat),
};