generic: ar8216: don't use static variable in ar8236_hw_init
authorjuhosg <juhosg@3c298f89-4303-0410-b956-a3cf2f4a3e73>
Thu, 8 Mar 2012 10:21:12 +0000 (10:21 +0000)
committerjuhosg <juhosg@3c298f89-4303-0410-b956-a3cf2f4a3e73>
Thu, 8 Mar 2012 10:21:12 +0000 (10:21 +0000)
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@30856 3c298f89-4303-0410-b956-a3cf2f4a3e73

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

index 34322dd..ba9bca0 100644 (file)
@@ -650,11 +650,10 @@ ar8216_hw_init(struct ar8216_priv *priv)
 
 static int
 ar8236_hw_init(struct ar8216_priv *priv) {
-       static int initialized;
        int i;
        struct mii_bus *bus;
 
-       if (initialized)
+       if (priv->initialized)
                return 0;
 
        /* Initialize the PHYs */
@@ -671,7 +670,7 @@ ar8236_hw_init(struct ar8216_priv *priv) {
        ar8216_rmw(priv, AR8216_REG_GLOBAL_CTRL,
                   AR8316_GCTRL_MTU, 9018 + 8 + 2);
 
-       initialized = true;
+       priv->initialized = true;
        return 0;
 }
 
This page took 0.03439 seconds and 4 git commands to generate.