[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [RFC for-4.8 v2 4/7] xen/device-tree: Make dt_match_node match props
On Wed, Jun 08, 2016 at 09:44:51AM +0100, Julien Grall wrote: > Hi Edgar, Hi Julien, > > On 07/06/2016 21:43, Edgar E. Iglesias wrote: > >On Mon, Jun 06, 2016 at 06:39:39PM +0100, Julien Grall wrote: > >>On 03/06/16 14:29, Edgar E. Iglesias wrote: > > [...] > > >AFAIK, it's needed to instantiate the dynamically sized array of pointers. > >Another option is to make __DT_MATCH_PROPS take the char ** pointer. > >The descriptor declaration would instead of looking like this: > > { > > __DT_MATCH_COMPATIBLE("mmio-sram"), > > __DT_MATCH_PROPS("no-memory-wc"), > > .data = &mattr_device_rw, > > }, > > > >Look something like this: > > > >const char *props_no_mem_wc[] = { "no-memory-wc", NULL }; > > > >.... > > > > { > > __DT_MATCH_COMPATIBLE("mmio-sram"), > > __DT_MATCH_PROPS(props_no_mem_wc), > > .data = &mattr_device_rw, > > }, > > > > > >Or do you have better suggestions? > > How about defining props with the type "const char *props[]"? > That doesn't work for arrays of match descriptors (i.e you can't have arrays of variable sized objects)... Cheers, Edgar _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx http://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |