> -----Original Message----- > From: Fleming Andy > Sent: Monday, January 14, 2008 8:56 PM > To: Nicu Ioan Petru > Cc: netdev@vger.kernel.org; [EMAIL PROTECTED] > Subject: Re: [PATCH][v2] phylib: add module owner to the > mii_bus structure > > Any reason you didn't update the other drivers? > > > git grep mdiobus_register drivers/net/ // duplicates and > mdio_bus.c edited out > drivers/net/au1000_eth.c: mdiobus_register(&aup->mii_bus); > drivers/net/bfin_mac.c: mdiobus_register(&lp->mii_bus); > drivers/net/cpmac.c: res = mdiobus_register(&cpmac_mii); > drivers/net/fec_mpc52xx_phy.c: err = mdiobus_register(bus); > drivers/net/fs_enet/mii-bitbang.c: ret = > mdiobus_register(new_bus); > drivers/net/fs_enet/mii-fec.c: ret = mdiobus_register(new_bus); > drivers/net/gianfar_mii.c: err = mdiobus_register(new_bus); > drivers/net/macb.c: if (mdiobus_register(&bp->mii_bus)) > drivers/net/sb1250-mac.c: err = mdiobus_register(&sc->mii_bus); > drivers/net/ucc_geth_mii.c: err = mdiobus_register(new_bus); > > I'm guessing this was only tested on the UEC, because unless > I misunderstand the code, any other driver would now crash > when you try to get the owner. >
That's not true. If you look closely at the implementation of try_module_get(), you'll see it returns 1 when module is NULL. So my change should make no difference for the other drivers. If that's really a concern for you, I can update the other drivers as well. How do you propose to do this? Resubmit this patch or send a new one? Ionut. -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html