From patchwork Fri Jul 13 12:32:13 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [10/11] of: add const to struct of_device_id.data Date: Fri, 13 Jul 2012 02:32:13 -0000 From: y@pengutronix.de X-Patchwork-Id: 170882 Message-Id: <1342182734-321-12-git-send-email-y> To: Grant Likely , Arnd Bergmann Cc: devicetree-discuss@lists.ozlabs.org, Greg Kroah-Hartman , Rob Herring , kernel@pengutronix.de, =?UTF-8?q?Uwe=20Kleine-K=C3=B6nig?= , linux-arm-kernel@lists.infradead.org From: Uwe Kleine-König 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önig Cc: Greg Kroah-Hartman --- 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_devicetable.h index 5db9382..98fb3fe 100644 --- a/include/linux/mod_devicetable.h +++ b/include/linux/mod_devicetable.h @@ -224,7 +224,7 @@ struct of_device_id char type[32]; char compatible[128]; #ifdef __KERNEL__ - void *data; + const void *data; #else kernel_ulong_t data; #endif