[RFC/PATCH 7/7] WIP: HACK/RFC: omap_device: begin to decouple platform_device from omap_device
Russell King - ARM Linux
linux at arm.linux.org.uk
Tue Aug 2 06:07:43 EST 2011
On Mon, Aug 01, 2011 at 09:50:09PM +0300, Felipe Balbi wrote:
> Hi,
>
> On Mon, Aug 01, 2011 at 04:44:20PM +0100, Grant Likely wrote:
> > On Mon, Aug 1, 2011 at 4:42 PM, Kevin Hilman <khilman at ti.com> wrote:
> > > diff --git a/arch/arm/include/asm/device.h b/arch/arm/include/asm/device.h
> > > index 9f390ce..bb777cd 100644
> > > --- a/arch/arm/include/asm/device.h
> > > +++ b/arch/arm/include/asm/device.h
> > > @@ -13,6 +13,7 @@ struct dev_archdata {
> > > };
> > >
> > > struct pdev_archdata {
> > > + void *p;
> > > };
> >
> > struct omap_device *p;
> >
> > Otherwise it is just asking for type safety problems.
>
> considering that struct omap_device isn't ARM-wide, is it really wise to
> to do that ? I guess a void * will do better here.
Help the typechecker do its job. As we have only one (at the moment...)
And make it:
+struct omap_device;
struct pdev_archdata {
+#ifdef CONFIG_ARCH_OMAP
+ struct omap_device *omap;
+#endif
};
for bonus points, so we only get the additional pointer for OMAP.
More information about the devicetree-discuss
mailing list