dm: core: Access device ofnode through functions
[platform/kernel/u-boot.git] / drivers / net / mvmdio.c
index a8e93e8..96f8dc6 100644 (file)
@@ -197,8 +197,8 @@ static int mvmdio_write(struct udevice *dev, int addr, int devad, int reg,
  */
 static int mvmdio_bind(struct udevice *dev)
 {
-       if (ofnode_valid(dev->node))
-               device_set_name(dev, ofnode_get_name(dev->node));
+       if (ofnode_valid(dev_ofnode(dev)))
+               device_set_name(dev, ofnode_get_name(dev_ofnode(dev)));
 
        return 0;
 }
@@ -232,6 +232,6 @@ U_BOOT_DRIVER(mvmdio) = {
        .bind                   = mvmdio_bind,
        .probe                  = mvmdio_probe,
        .ops                    = &mvmdio_ops,
-       .priv_auto_alloc_size   = sizeof(struct mvmdio_priv),
+       .priv_auto      = sizeof(struct mvmdio_priv),
 };