]> Git Repo - J-u-boot.git/blobdiff - net/mdio-mux-uclass.c
Remove #include <version.h> from files which do not need it
[J-u-boot.git] / net / mdio-mux-uclass.c
index e425207d6e40044f4a8a9c8f807ac012cba633fc..780526c19e3f175d2f6368b5708174635efa5631 100644 (file)
@@ -6,6 +6,7 @@
 
 #include <common.h>
 #include <dm.h>
+#include <log.h>
 #include <miiphy.h>
 #include <dm/device-internal.h>
 #include <dm/uclass-internal.h>
@@ -64,7 +65,7 @@ static int mmux_change_sel(struct udevice *ch, bool sel)
        struct udevice *mux = ch->parent;
        struct mdio_mux_perdev_priv *priv = dev_get_uclass_priv(mux);
        struct mdio_mux_ops *ops = mdio_mux_get_ops(mux);
-       struct mdio_mux_ch_data *ch_data = dev_get_parent_platdata(ch);
+       struct mdio_mux_ch_data *ch_data = dev_get_parent_plat(ch);
        int err = 0;
 
        if (sel) {
@@ -146,7 +147,7 @@ static int mmux_reset(struct udevice *ch)
 /* Picks up the mux selection value for each child */
 static int dm_mdio_mux_child_post_bind(struct udevice *ch)
 {
-       struct mdio_mux_ch_data *ch_data = dev_get_parent_platdata(ch);
+       struct mdio_mux_ch_data *ch_data = dev_get_parent_plat(ch);
 
        ch_data->sel = dev_read_u32_default(ch, "reg", MDIO_MUX_SELECT_NONE);
 
@@ -162,7 +163,7 @@ static int dm_mdio_mux_post_bind(struct udevice *mux)
        ofnode ch_node;
        int err, first_err = 0;
 
-       if (!ofnode_valid(mux->node)) {
+       if (!dev_has_ofnode(mux)) {
                debug("%s: no mux node found, no child MDIO busses set up\n",
                      __func__);
                return 0;
@@ -227,6 +228,6 @@ UCLASS_DRIVER(mdio_mux) = {
        .child_post_bind = dm_mdio_mux_child_post_bind,
        .post_bind  = dm_mdio_mux_post_bind,
        .post_probe = dm_mdio_mux_post_probe,
-       .per_device_auto_alloc_size = sizeof(struct mdio_mux_perdev_priv),
-       .per_child_platdata_auto_alloc_size = sizeof(struct mdio_mux_ch_data),
+       .per_device_auto        = sizeof(struct mdio_mux_perdev_priv),
+       .per_child_plat_auto    = sizeof(struct mdio_mux_ch_data),
 };
This page took 0.027495 seconds and 4 git commands to generate.