summaryrefslogtreecommitdiffstats
path: root/include/driver.h
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 /include/driver.h
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 'include/driver.h')
-rw-r--r--include/driver.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/include/driver.h b/include/driver.h
index 0ee3b4554f..1745717315 100644
--- a/include/driver.h
+++ b/include/driver.h
@@ -77,7 +77,7 @@ struct device_d {
struct list_head cdevs;
- struct platform_device_id *id_entry;
+ const struct platform_device_id *id_entry;
struct device_node *device_node;
const struct of_device_id *of_id_entry;
@@ -107,8 +107,8 @@ struct driver_d {
struct bus_type *bus;
- struct platform_device_id *id_table;
- struct of_device_id *of_compatible;
+ const struct platform_device_id *id_table;
+ const struct of_device_id *of_compatible;
};
/*@}*/ /* do not delete, doxygen relevant */