* of_match_table on non-DT builds
@ 2010-11-09 15:27 Rob Herring
[not found] ` <4CD9684E.7080606-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
0 siblings, 1 reply; 3+ messages in thread
From: Rob Herring @ 2010-11-09 15:27 UTC (permalink / raw)
To: Grant Likely; +Cc: devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ
Grant,
With the of_match_table pointer only enabled with CONFIG_OF in struct
device_driver, all drivers will have to have #ifdefs around their
of_match_table if you want to build them for non-devicetree platforms.
This is just the tip of the iceberg as all probe related OF calls have
to be ifdef'ed. Is this the intention?
Rob
^ permalink raw reply [flat|nested] 3+ messages in thread[parent not found: <4CD9684E.7080606-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>]
* Re: of_match_table on non-DT builds [not found] ` <4CD9684E.7080606-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> @ 2010-11-09 16:01 ` Grant Likely [not found] ` <AANLkTi=11Jok3eujFwvji8ON1urcdeebCkJZgNrF=em5-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org> 0 siblings, 1 reply; 3+ messages in thread From: Grant Likely @ 2010-11-09 16:01 UTC (permalink / raw) To: Rob Herring; +Cc: devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ, Greg Kroah-Hartman On Tue, Nov 9, 2010 at 8:27 AM, Rob Herring <robherring2-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > Grant, > > With the of_match_table pointer only enabled with CONFIG_OF in struct > device_driver, all drivers will have to have #ifdefs around their > of_match_table if you want to build them for non-devicetree platforms. This > is just the tip of the iceberg as all probe related OF calls have to be > ifdef'ed. Is this the intention? Not really, and I'm not entirely sure about the best way to handle this. I might handle the of_match_table pointer using a macro so that the #ifdefs can be dropped in each individual device driver definition, or I might ask Greg to drop the #ifdefs around of_match_table in struct device_driver, but I don't really want to increase the size of struct device_driver for non-devicetree users. Regardless, device drivers will still need #ifdefs around the CONFIG_OF specific code in the probe routine; probably by breaking the CONFIG_OF specific stuff into a helper function so that the #ifdef isn't in the middle of a function. g. ^ permalink raw reply [flat|nested] 3+ messages in thread
[parent not found: <AANLkTi=11Jok3eujFwvji8ON1urcdeebCkJZgNrF=em5-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>]
* Re: of_match_table on non-DT builds [not found] ` <AANLkTi=11Jok3eujFwvji8ON1urcdeebCkJZgNrF=em5-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org> @ 2010-11-09 16:07 ` Greg KH 0 siblings, 0 replies; 3+ messages in thread From: Greg KH @ 2010-11-09 16:07 UTC (permalink / raw) To: Grant Likely; +Cc: devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ On Tue, Nov 09, 2010 at 09:01:17AM -0700, Grant Likely wrote: > On Tue, Nov 9, 2010 at 8:27 AM, Rob Herring <robherring2-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > Grant, > > > > With the of_match_table pointer only enabled with CONFIG_OF in struct > > device_driver, all drivers will have to have #ifdefs around their > > of_match_table if you want to build them for non-devicetree platforms. This > > is just the tip of the iceberg as all probe related OF calls have to be > > ifdef'ed. Is this the intention? > > Not really, and I'm not entirely sure about the best way to handle > this. I might handle the of_match_table pointer using a macro so that > the #ifdefs can be dropped in each individual device driver > definition, or I might ask Greg to drop the #ifdefs around > of_match_table in struct device_driver, but I don't really want to > increase the size of struct device_driver for non-devicetree users. That's ok, it's not that big of a deal to drop the #ifdef, especially if it makes the .c files more "sane". I'll work on merging the dma stuff in 'struct device' to a single pointer, to get the space back, so you should be fine. thanks, greg k-h ^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2010-11-09 16:07 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-11-09 15:27 of_match_table on non-DT builds Rob Herring
[not found] ` <4CD9684E.7080606-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2010-11-09 16:01 ` Grant Likely
[not found] ` <AANLkTi=11Jok3eujFwvji8ON1urcdeebCkJZgNrF=em5-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2010-11-09 16:07 ` Greg KH
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.