ar8216: Inline function ar8xxx_create_mii
authorFelix Fietkau <nbd@openwrt.org>
Thu, 18 Dec 2014 11:28:47 +0000 (11:28 +0000)
committerFelix Fietkau <nbd@openwrt.org>
Thu, 18 Dec 2014 11:28:47 +0000 (11:28 +0000)
Inline function ar8xxx_create_mii.

Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>
SVN-Revision: 43743

target/linux/generic/files/drivers/net/phy/ar8216.c

index b72eca01e4f2fc2c226b5f2c7592d6c3f5cf49d5..0dc55e83cfb047af2158a09ea6fe65dd3aa44574 100644 (file)
@@ -2775,18 +2775,6 @@ ar8xxx_free(struct ar8xxx_priv *priv)
        kfree(priv);
 }
 
-static struct ar8xxx_priv *
-ar8xxx_create_mii(struct mii_bus *bus)
-{
-       struct ar8xxx_priv *priv;
-
-       priv = ar8xxx_create();
-       if (priv)
-               priv->mii_bus = bus;
-
-       return priv;
-}
-
 static int
 ar8xxx_probe_switch(struct ar8xxx_priv *priv)
 {
@@ -2990,12 +2978,14 @@ ar8xxx_phy_probe(struct phy_device *phydev)
                if (priv->mii_bus == phydev->bus)
                        goto found;
 
-       priv = ar8xxx_create_mii(phydev->bus);
+       priv = ar8xxx_create();
        if (priv == NULL) {
                ret = -ENOMEM;
                goto unlock;
        }
 
+       priv->mii_bus = phydev->bus;
+
        ret = ar8xxx_probe_switch(priv);
        if (ret)
                goto free_priv;