[PATCH] net/fec: fix compile error introduced by dt support

Shawn Guo shawn.guo at freescale.com
Fri Apr 1 18:49:16 EST 2011


On Thu, Mar 31, 2011 at 10:09:40AM -0600, Grant Likely wrote:
> On Fri, Mar 25, 2011 at 03:13:58PM +0800, Shawn Guo wrote:
> > After fec dt support is added, the following compile error will be
> > seen when building a pure non-dt kernel.
> > 
> > drivers/net/fec.c: In function ‘fec_probe’:
> > drivers/net/fec.c:1383: error: implicit declaration of function ‘of_match_device’
> > drivers/net/fec.c:1383: warning: assignment makes pointer from integer without a cast
> 
> Earlier today I suggested fixing this by adding an empty
> implementation of of_match_device, but I forgot that an .of_match
> pointer has been added to struct device for exactly this purpose.  You
> can use that instead.
> 
> That change is currently in mainline, but it has not been backported
> to the Linaro 2.6.38 tree (yet).
> 
This simply is a fix to commit 54898b86fa9813313b3eb981c44610ff483b0067
"net/fec: add device tree matching support", which only sits on branch
devicetree/test-2.6.38 right now.  However, .of_match is not available
on that tree yet.  So I can not do anything until ether this patch
shows on devicetree/test or .of_match is back ported on
devicetree/test-2.6.38.  Or you can simply ignore this patch since I
just want let you know such a compile error.

-- 
Regards,
Shawn



More information about the devicetree-discuss mailing list