[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20080929211009.GD31038@xi.wantstofly.org>
Date: Mon, 29 Sep 2008 23:10:09 +0200
From: Lennert Buytenhek <buytenh@...tstofly.org>
To: Trent Piepho <tpiepho@...escale.com>
Cc: netdev@...r.kernel.org, Byron Bradley <byron.bbradley@...il.com>,
Jesper Dangaard Brouer <jdb@...x.dk>,
Tim Ellis <tim.ellis@....com>,
Andy Fleming <afleming@...escale.com>,
Imre Kaloz <kaloz@...nwrt.org>, Nicolas Pitre <nico@....org>,
Dirk Teurlings <dirk@...xia.nl>,
Peter van Valderen <p.v.valderen@...il.com>
Subject: Re: [PATCH 1/6] phylib: add mdiobus_{read,write}
On Mon, Sep 29, 2008 at 01:27:11PM -0700, Trent Piepho wrote:
> > Add mdiobus_{read,write} routines to allow direct reading/writing
> > of registers on an mii bus without having to go through the PHY
> > abstraction, and make phy_{read,write} use these primitives.
> >
> > int phy_read(struct phy_device *phydev, u16 regnum)
> > {
> > - int retval;
> > - struct mii_bus *bus = phydev->bus;
> > -
> > - BUG_ON(in_interrupt());
> > -
> > - mutex_lock(&bus->mdio_lock);
> > - retval = bus->read(bus, phydev->addr, regnum);
> > - mutex_unlock(&bus->mdio_lock);
> > -
> > - return retval;
> > + return mdiobus_read(phydev->bus, phydev->addr, regnum);
> > }
> > EXPORT_SYMBOL(phy_read);
>
> Might want to make these function static inline. Since they are
> external, gcc won't be able to inline them automatically.
If i make them static inline, I won't be able to call them from
external code, which was sort of the idea.
Or are you suggesting that I move them to include/linux/phy.h ?
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists