From mboxrd@z Thu Jan 1 00:00:00 1970 From: Uwe =?iso-8859-1?Q?Kleine-K=F6nig?= Subject: Re: [PATCH] of: add const to struct of_device_id.data Date: Fri, 18 May 2012 16:43:17 +0200 Message-ID: <20120518144317.GD3710@pengutronix.de> References: <1335171381-24869-1-git-send-email-u.kleine-koenig@pengutronix.de> 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: <1335171381-24869-1-git-send-email-u.kleine-koenig-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: devicetree-discuss-bounces+gldd-devicetree-discuss=m.gmane.org-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org Sender: devicetree-discuss-bounces+gldd-devicetree-discuss=m.gmane.org-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org To: devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org, Arnd Bergmann Cc: kernel-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org List-Id: devicetree@vger.kernel.org Hello, On Mon, Apr 23, 2012 at 10:56:21AM +0200, Uwe Kleine-K=F6nig wrote: > Drivers should never need to modify the data of a device id. So it can > be const which in turn allows more consts in the driver. > = > Signed-off-by: Uwe Kleine-K=F6nig > --- > this might introduce warnings in drivers that access the data member > without using const, so this is definitly merge window material if it is > considered at all. > = > include/linux/mod_devicetable.h | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > = > diff --git a/include/linux/mod_devicetable.h b/include/linux/mod_deviceta= ble.h > index 501da4c..183f411 100644 > --- a/include/linux/mod_devicetable.h > +++ b/include/linux/mod_devicetable.h > @@ -222,7 +222,7 @@ struct of_device_id > char type[32]; > char compatible[128]; > #ifdef __KERNEL__ > - void *data; > + const void *data; > #else > kernel_ulong_t data; > #endif any thoughts on this one? I got no feed back and it doesn't appear in next-20120518. Best regards Uwe -- = Pengutronix e.K. | Uwe Kleine-K=F6nig | Industrial Linux Solutions | http://www.pengutronix.de/ |