From mboxrd@z Thu Jan 1 00:00:00 1970 From: Russell King - ARM Linux Subject: Re: [RFC/PATCH 7/7] WIP: HACK/RFC: omap_device: begin to decouple platform_device from omap_device Date: Mon, 1 Aug 2011 21:07:43 +0100 Message-ID: <20110801200743.GA21535@n2100.arm.linux.org.uk> References: <1311292338-11830-1-git-send-email-khilman@ti.com> <1311292338-11830-9-git-send-email-khilman@ti.com> <20110730120332.GA15539@n2100.arm.linux.org.uk> <20110731025807.GA24334@ponder.secretlab.ca> <20110731150540.GA3019@n2100.arm.linux.org.uk> <871ux5nnop.fsf@ti.com> <20110801185009.GA5217@legolas.emea.dhcp.ti.com> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: QUOTED-PRINTABLE Return-path: Content-Disposition: inline In-Reply-To: <20110801185009.GA5217@legolas.emea.dhcp.ti.com> Sender: linux-omap-owner@vger.kernel.org To: Felipe Balbi Cc: Grant Likely , Kevin Hilman , linux-omap@vger.kernel.org, Paul Walmsley , "G. Manjunath Kondaiah" , devicetree-discuss@lists.ozlabs.org, linux-arm-kernel@lists.infradead.org List-Id: devicetree@vger.kernel.org On Mon, Aug 01, 2011 at 09:50:09PM +0300, Felipe Balbi wrote: > Hi, >=20 > On Mon, Aug 01, 2011 at 04:44:20PM +0100, Grant Likely wrote: > > On Mon, Aug 1, 2011 at 4:42 PM, Kevin Hilman 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 { > > > =A0}; > > > > > > =A0struct pdev_archdata { > > > + =A0 =A0 =A0 void *p; > > > =A0}; > >=20 > > struct omap_device *p; > >=20 > > Otherwise it is just asking for type safety problems. >=20 > 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. -- To unsubscribe from this list: send the line "unsubscribe linux-omap" i= n the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html From mboxrd@z Thu Jan 1 00:00:00 1970 From: linux@arm.linux.org.uk (Russell King - ARM Linux) Date: Mon, 1 Aug 2011 21:07:43 +0100 Subject: [RFC/PATCH 7/7] WIP: HACK/RFC: omap_device: begin to decouple platform_device from omap_device In-Reply-To: <20110801185009.GA5217@legolas.emea.dhcp.ti.com> References: <1311292338-11830-1-git-send-email-khilman@ti.com> <1311292338-11830-9-git-send-email-khilman@ti.com> <20110730120332.GA15539@n2100.arm.linux.org.uk> <20110731025807.GA24334@ponder.secretlab.ca> <20110731150540.GA3019@n2100.arm.linux.org.uk> <871ux5nnop.fsf@ti.com> <20110801185009.GA5217@legolas.emea.dhcp.ti.com> Message-ID: <20110801200743.GA21535@n2100.arm.linux.org.uk> To: linux-arm-kernel@lists.infradead.org List-Id: linux-arm-kernel.lists.infradead.org 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 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.