summaryrefslogtreecommitdiff
path: root/tools/iio/iio_utils.h
diff options
context:
space:
mode:
authorHartmut Knaack <knaack.h@gmx.de>2015-05-31 14:40:36 +0200
committerJonathan Cameron <jic23@kernel.org>2015-06-01 08:40:26 +0100
commit9d4752544d17a10a40be5fc5ef68edcae5363599 (patch)
tree16730c7cb8cd89c1d19d0635e496e5977a93baa9 /tools/iio/iio_utils.h
parente06e3d7112f2ec5494d2d934a8641a53885003ee (diff)
tools:iio:iio_utils: pass strings as const
Mark strings, which are not supposed to be changed (basedir, filename, value), as const in function parameters. Signed-off-by: Hartmut Knaack <knaack.h@gmx.de> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Diffstat (limited to 'tools/iio/iio_utils.h')
-rw-r--r--tools/iio/iio_utils.h15
1 files changed, 9 insertions, 6 deletions
diff --git a/tools/iio/iio_utils.h b/tools/iio/iio_utils.h
index e5eb46ade0a3..379eed9deaea 100644
--- a/tools/iio/iio_utils.h
+++ b/tools/iio/iio_utils.h
@@ -63,12 +63,15 @@ void bsort_channel_array_by_index(struct iio_channel_info **ci_array, int cnt);
int build_channel_array(const char *device_dir,
struct iio_channel_info **ci_array, int *counter);
int find_type_by_name(const char *name, const char *type);
-int write_sysfs_int(char *filename, char *basedir, int val);
-int write_sysfs_int_and_verify(char *filename, char *basedir, int val);
-int write_sysfs_string_and_verify(char *filename, char *basedir, char *val);
-int write_sysfs_string(char *filename, char *basedir, char *val);
-int read_sysfs_posint(char *filename, char *basedir);
-int read_sysfs_float(char *filename, char *basedir, float *val);
+int write_sysfs_int(const char *filename, const char *basedir, int val);
+int write_sysfs_int_and_verify(const char *filename, const char *basedir,
+ int val);
+int write_sysfs_string_and_verify(const char *filename, const char *basedir,
+ const char *val);
+int write_sysfs_string(const char *filename, const char *basedir,
+ const char *val);
+int read_sysfs_posint(const char *filename, const char *basedir);
+int read_sysfs_float(const char *filename, const char *basedir, float *val);
int read_sysfs_string(const char *filename, const char *basedir, char *str);
#endif /* _IIO_UTILS_H_ */