diff mbox

[19/25] of: add const to struct *of_device_id.data

Message ID 1343034810-3386-20-git-send-email-u.kleine-koenig@pengutronix.de (mailing list archive)
State Superseded, archived
Headers show

Commit Message

Uwe Kleine-König July 23, 2012, 9:13 a.m. UTC
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 <u.kleine-koenig@pengutronix.de>
---
 include/linux/mod_devicetable.h |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Greg KH July 23, 2012, 3:32 p.m. UTC | #1
On Mon, Jul 23, 2012 at 11:13:24AM +0200, Uwe Kleine-König 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önig <u.kleine-koenig@pengutronix.de>

Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
diff mbox

Patch

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