[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <87inxz5z4e.fsf@ketchup.mtl.sfl>
Date: Fri, 27 May 2016 10:55:45 -0400
From: Vivien Didelot <vivien.didelot@...oirfairelinux.com>
To: Andrew Lunn <andrew@...n.ch>, netdev <netdev@...r.kernel.org>
Cc: Florian Fainelli <f.fainelli@...il.com>,
John Crispin <john@...ozen.org>, Bryan.Whitehead@...rochip.com,
Andrew Lunn <andrew@...n.ch>
Subject: Re: [RFC PATCH 12/16] dsa: Make mdio bus optional
Hi Andrew,
Andrew Lunn <andrew@...n.ch> writes:
> - mdiobus_unregister(ds->slave_mii_bus);
> + if (ds->slave_mii_bus && ds->drv->phy_read)
> + mdiobus_unregister(ds->slave_mii_bus);
So if a driver registered the slave MII bus itself, it may have
unregistered it itself as well, so checking ds->slave_mii_bus is OK
(assuming the driver correctly zero'ed it).
But is it necessary to check ds->drv->phy_read?
Thanks,
Vivien
Powered by blists - more mailing lists