[PATCH] aiodev: Constify 'unit' in 'struct aiodev'

Andrey Smirnov andrew.smirnov at gmail.com
Mon Mar 26 06:14:45 PDT 2018


The way it is currently used, there's no reason for 'uint' field to be
mutable, so constify it in order to allow 'aiodev' drivers to pass
sting literals in that field.

Signed-off-by: Andrey Smirnov <andrew.smirnov at gmail.com>
---
 include/aiodev.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/include/aiodev.h b/include/aiodev.h
index 0d4f7a294..5e38b4fab 100644
--- a/include/aiodev.h
+++ b/include/aiodev.h
@@ -23,7 +23,7 @@
 struct aiodevice;
 struct aiochannel {
 	int index;
-	char *unit;
+	const char *unit;
 	struct aiodevice *aiodev;
 
 	int value;
-- 
2.14.3




More information about the barebox mailing list