[PATCH 2/4] macb: register the phy after the macb is init

Sascha Hauer s.hauer at pengutronix.de
Wed Feb 6 15:39:17 EST 2013


On Wed, Feb 06, 2013 at 09:34:28PM +0100, Jean-Christophe PLAGNIOL-VILLARD wrote:
> On 21:32 Wed 06 Feb     , Sascha Hauer wrote:
> > On Wed, Feb 06, 2013 at 09:16:24PM +0100, Jean-Christophe PLAGNIOL-VILLARD wrote:
> > > On 20:35 Wed 06 Feb     , Sascha Hauer wrote:
> > > > On Tue, Feb 05, 2013 at 11:15:04AM +0100, Jean-Christophe PLAGNIOL-VILLARD wrote:
> > > > > Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj at jcrosoft.com>
> > > > > ---
> > > > >  drivers/net/macb.c |    2 +-
> > > > >  1 file changed, 1 insertion(+), 1 deletion(-)
> > > > > 
> > > > > diff --git a/drivers/net/macb.c b/drivers/net/macb.c
> > > > > index 15b1e93..8eac4a8 100644
> > > > > --- a/drivers/net/macb.c
> > > > > +++ b/drivers/net/macb.c
> > > > > @@ -476,8 +476,8 @@ static int macb_probe(struct device_d *dev)
> > > > >  
> > > > >  	macb_writel(macb, NCFGR, ncfgr);
> > > > >  
> > > > > -	mdiobus_register(&macb->miibus);
> > > > >  	eth_register(edev);
> > > > > +	mdiobus_register(&macb->miibus);
> > > > 
> > > > Why?
> > > > 
> > > > Most other drivers do it the other way round and you do not provide
> > > > information why this is done.
> > > because the is not ready
> > > 
> > > as we init it as _init which is done during the eth_register
> > 
> > Then you should probably call macb_init from your probe function
> > manually. This implicit dependency is not good.
> 
> so init callback is for what?

For being scheduled to be removed.

Sascha

-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |



More information about the barebox mailing list