On Fri, 9 Oct 2020 19:34:10 +0200 Marek Vasut wrote:
> >>> To an untrained eye this looks pretty weird.    
> >>
> >> I see, I'm not quite sure how to address this comment.  
> > 
> > If ndev->phydev sometimes is not-NULL on open, then that's a valid
> > state to be in. Why not make sure that we're always in that state 
> > and can depend on ndev->phydev rather than rummaging around for 
> > the phy_device instance.  
> 
> Nope, the problem is in probe() in this case.

In that case it would be cleaner to pass fep and phydev as arguments
into fec_enet_clk_enable(), rather than netdev, and have only probe()
do the necessary dance.

Reply via email to