]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
net: ksz9477: move struct ksz_dsa_priv *priv declaration
authorRomain Naour <romain.naour@smile.fr>
Tue, 8 Oct 2024 07:54:24 +0000 (09:54 +0200)
committerTom Rini <trini@konsulko.com>
Sun, 27 Oct 2024 16:19:44 +0000 (10:19 -0600)
struct ksz_dsa_priv *priv should be declared before dev_dbg()

Signed-off-by: Romain Naour <romain.naour@smile.fr>
drivers/net/ksz9477.c

index 43baa6996191485d5dfc1817223e333063743c53..091e96894878929081ccf418cb653fc472d6ebe1 100644 (file)
@@ -355,12 +355,12 @@ static int ksz_port_setup(struct udevice *dev, int port,
                          phy_interface_t interface)
 {
        struct dsa_pdata *pdata = dev_get_uclass_plat(dev);
+       struct ksz_dsa_priv *priv = dev_get_priv(dev);
        u8 data8;
 
        dev_dbg(dev, "%s P%d %s\n", __func__, port + 1,
                (port == pdata->cpu_port) ? "cpu" : "");
 
-       struct ksz_dsa_priv *priv = dev_get_priv(dev);
        if (port != pdata->cpu_port) {
                if (priv->features & NEW_XMII)
                        /* phy port: config errata and leds */