[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH v3 06/13] xen/arm: Introduce a generic way to describe device
On Tue, 2015-02-24 at 14:26 +0000, Julien Grall wrote: > Hi Ian, > > On 20/02/15 12:22, Ian Campbell wrote: > > On Fri, 2015-01-30 at 18:49 +0000, Julien Grall wrote: > >> @@ -2,8 +2,34 @@ > >> #define __ASM_ARM_DEVICE_H > >> > >> #include <xen/init.h> > >> + > >> +enum device_type > >> +{ > >> + DEV_DT, > > > > I suppose no #ifdef here because an empty enum is a bit silly? > > this code is ARM-specific and device tree is always supported for this > architecture. True. In that case the #ifdef HAS_DEVICE_TREE further down the file is not needed either, right? > >> +static inline struct dt_device_node *dev_to_dt(struct device *dev) > >> +{ > >> + ASSERT(dev->type == DEV_DT); > >> + > >> + return container_of(dev, struct dt_device_node, dev); > >> +} > > > > Given that x86 uses a difference struct and doesn't support DT shouldn't > > this either be wrapped in a HAVE_DEVICE_TREE or placed in the ARM header > > (or some other common-to-all-dt-platforms header)? > > That would be a mistake to include <xen/device_tree.h> on x86. Currently > all the #include to this header are protected with #ifdef HAVE_DEVICE_TREE. OK, thanks. _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx http://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |