dm: core: Access device ofnode through functions
[platform/kernel/u-boot.git] / drivers / net / mvmdio.c
index ec6805e..96f8dc6 100644 (file)
@@ -12,6 +12,7 @@
 #include <phy.h>
 #include <asm/io.h>
 #include <wait_bit.h>
+#include <linux/bitops.h>
 
 #define MVMDIO_SMI_DATA_SHIFT          0
 #define MVMDIO_SMI_PHY_ADDR_SHIFT      16
@@ -196,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;
 }
@@ -231,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),
 };