summaryrefslogtreecommitdiffstats
path: root/drivers/base
diff options
context:
space:
mode:
authorUwe Kleine-König <u.kleine-koenig@pengutronix.de>2015-04-14 22:00:47 +0200
committerSascha Hauer <s.hauer@pengutronix.de>2015-04-17 07:31:35 +0200
commitfd678c4973ceae400b13f6279a048ae7bc80baf7 (patch)
treef70848c568bcb15d3d03971dc49ff0f9c3142e13 /drivers/base
parentf49f067bdd0f317b8e21ead8dac917c4f971fb3f (diff)
downloadbarebox-fd678c4973ceae400b13f6279a048ae7bc80baf7.tar.gz
barebox-fd678c4973ceae400b13f6279a048ae7bc80baf7.tar.xz
drivers/base: Mark (of|platform)_device_id data as constant
There should be no reason to ever change the data pointed to by id_table or of_compatible. So make this offical by adding some 'const's. In Linux the corresponding pointers are marked as const, too. Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'drivers/base')
-rw-r--r--drivers/base/bus.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/base/bus.c b/drivers/base/bus.c
index c41e0b0438..1264e40250 100644
--- a/drivers/base/bus.c
+++ b/drivers/base/bus.c
@@ -58,7 +58,7 @@ int device_match(struct device_d *dev, struct driver_d *drv)
return 0;
if (drv->id_table) {
- struct platform_device_id *id = drv->id_table;
+ const struct platform_device_id *id = drv->id_table;
while (id->name) {
if (!strcmp(id->name, dev->name)) {
@@ -74,7 +74,7 @@ int device_match(struct device_d *dev, struct driver_d *drv)
int device_match_of_modalias(struct device_d *dev, struct driver_d *drv)
{
- struct platform_device_id *id = drv->id_table;
+ const struct platform_device_id *id = drv->id_table;
const char *of_modalias = NULL, *p;
int cplen;
const char *compat;