#define MESON_G12A_MDIO_INTERNAL_ID 1
 
 struct g12a_mdio_mux {
-       bool pll_is_enabled;
        void __iomem *regs;
        void *mux_handle;
        struct clk *pll;
        int ret;
 
        /* Enable the phy clock */
-       if (!priv->pll_is_enabled) {
+       if (!__clk_is_enabled(priv->pll)) {
                ret = clk_prepare_enable(priv->pll);
                if (ret)
                        return ret;
        }
 
-       priv->pll_is_enabled = true;
-
        /* Initialize ephy control */
        writel(EPHY_G12A_ID, priv->regs + ETH_PHY_CNTL0);
 
        writel_relaxed(0x0, priv->regs + ETH_PHY_CNTL2);
 
        /* Disable the phy clock if enabled */
-       if (priv->pll_is_enabled) {
+       if (__clk_is_enabled(priv->pll))
                clk_disable_unprepare(priv->pll);
-               priv->pll_is_enabled = false;
-       }
 
        return 0;
 }
 
        mdio_mux_uninit(priv->mux_handle);
 
-       if (priv->pll_is_enabled)
+       if (__clk_is_enabled(priv->pll))
                clk_disable_unprepare(priv->pll);
 
        return 0;