[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20120607102014.GI22191@pengutronix.de>
Date: Thu, 7 Jun 2012 12:20:14 +0200
From: Uwe Kleine-König
<u.kleine-koenig@...gutronix.de>
To: devicetree-discuss@...ts.ozlabs.org, Arnd Bergmann <arnd@...db.de>,
linux-kernel@...r.kernel.org,
Grant Likely <grant.likely@...retlab.ca>
Cc: kernel@...gutronix.de
Subject: [PATCH RESEND] of: add const to struct of_device_id.data
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@...gutronix.de>
---
(Cc += lkml + Grant)
Hello,
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.
Best regards
Uwe
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 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
--
1.7.10
--
Pengutronix e.K. | Uwe Kleine-König |
Industrial Linux Solutions | http://www.pengutronix.de/ |
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists