45
45
46
46
struct bcm7xxx_phy_priv {
47
47
u64 * stats ;
48
- struct clk * clk ;
49
48
};
50
49
51
50
static int bcm7xxx_28nm_d0_afe_config_init (struct phy_device * phydev )
@@ -811,6 +810,7 @@ static void bcm7xxx_28nm_get_phy_stats(struct phy_device *phydev,
811
810
static int bcm7xxx_28nm_probe (struct phy_device * phydev )
812
811
{
813
812
struct bcm7xxx_phy_priv * priv ;
813
+ struct clk * clk ;
814
814
int ret = 0 ;
815
815
816
816
priv = devm_kzalloc (& phydev -> mdio .dev , sizeof (* priv ), GFP_KERNEL );
@@ -825,13 +825,9 @@ static int bcm7xxx_28nm_probe(struct phy_device *phydev)
825
825
if (!priv -> stats )
826
826
return - ENOMEM ;
827
827
828
- priv -> clk = devm_clk_get_optional (& phydev -> mdio .dev , NULL );
829
- if (IS_ERR (priv -> clk ))
830
- return PTR_ERR (priv -> clk );
831
-
832
- ret = clk_prepare_enable (priv -> clk );
833
- if (ret )
834
- return ret ;
828
+ clk = devm_clk_get_optional_enabled (& phydev -> mdio .dev , NULL );
829
+ if (IS_ERR (clk ))
830
+ return PTR_ERR (clk );
835
831
836
832
/* Dummy read to a register to workaround an issue upon reset where the
837
833
* internal inverter may not allow the first MDIO transaction to pass
@@ -844,13 +840,6 @@ static int bcm7xxx_28nm_probe(struct phy_device *phydev)
844
840
return ret ;
845
841
}
846
842
847
- static void bcm7xxx_28nm_remove (struct phy_device * phydev )
848
- {
849
- struct bcm7xxx_phy_priv * priv = phydev -> priv ;
850
-
851
- clk_disable_unprepare (priv -> clk );
852
- }
853
-
854
843
#define BCM7XXX_28NM_GPHY (_oui , _name ) \
855
844
{ \
856
845
.phy_id = (_oui), \
@@ -866,7 +855,6 @@ static void bcm7xxx_28nm_remove(struct phy_device *phydev)
866
855
.get_strings = bcm_phy_get_strings, \
867
856
.get_stats = bcm7xxx_28nm_get_phy_stats, \
868
857
.probe = bcm7xxx_28nm_probe, \
869
- .remove = bcm7xxx_28nm_remove, \
870
858
}
871
859
872
860
#define BCM7XXX_28NM_EPHY (_oui , _name ) \
@@ -882,7 +870,6 @@ static void bcm7xxx_28nm_remove(struct phy_device *phydev)
882
870
.get_strings = bcm_phy_get_strings, \
883
871
.get_stats = bcm7xxx_28nm_get_phy_stats, \
884
872
.probe = bcm7xxx_28nm_probe, \
885
- .remove = bcm7xxx_28nm_remove, \
886
873
.read_mmd = bcm7xxx_28nm_ephy_read_mmd, \
887
874
.write_mmd = bcm7xxx_28nm_ephy_write_mmd, \
888
875
}
@@ -908,7 +895,6 @@ static void bcm7xxx_28nm_remove(struct phy_device *phydev)
908
895
/* PHY_BASIC_FEATURES */ \
909
896
.flags = PHY_IS_INTERNAL, \
910
897
.probe = bcm7xxx_28nm_probe, \
911
- .remove = bcm7xxx_28nm_remove, \
912
898
.config_init = bcm7xxx_16nm_ephy_config_init, \
913
899
.config_aneg = genphy_config_aneg, \
914
900
.read_status = genphy_read_status, \
0 commit comments