From 53cb270293a72f78c15dcb67b2fd013a4ba76edf Mon Sep 17 00:00:00 2001 From: Bartosz Golaszewski Date: Tue, 9 Jul 2019 13:02:24 +0200 Subject: [PATCH] tests: gpio-mockup: constify num_lines The array pointed to by num_lines is never modified so make it really constant. Signed-off-by: Bartosz Golaszewski --- tests/mockup/gpio-mockup.c | 4 ++-- tests/mockup/gpio-mockup.h | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/mockup/gpio-mockup.c b/tests/mockup/gpio-mockup.c index 5a2b64c..d8a80f7 100644 --- a/tests/mockup/gpio-mockup.c +++ b/tests/mockup/gpio-mockup.c @@ -165,7 +165,7 @@ EXPORT void gpio_mockup_unref(struct gpio_mockup *ctx) } static char *make_module_param_string(unsigned int num_chips, - unsigned int *num_lines, int flags) + const unsigned int *num_lines, int flags) { char *params, *new; unsigned int i; @@ -250,7 +250,7 @@ static struct gpio_mockup_chip *make_chip(const char *sysname, } EXPORT int gpio_mockup_probe(struct gpio_mockup *ctx, unsigned int num_chips, - unsigned int *chip_sizes, int flags) + const unsigned int *chip_sizes, int flags) { const char *devpath, *devnode, *sysname, *action; struct gpio_mockup_chip *chip; diff --git a/tests/mockup/gpio-mockup.h b/tests/mockup/gpio-mockup.h index a4f3058..d91f3f8 100644 --- a/tests/mockup/gpio-mockup.h +++ b/tests/mockup/gpio-mockup.h @@ -17,7 +17,7 @@ void gpio_mockup_ref(struct gpio_mockup *ctx); void gpio_mockup_unref(struct gpio_mockup *ctx); int gpio_mockup_probe(struct gpio_mockup *ctx, unsigned int num_chips, - unsigned int *chip_sizes, int flags); + const unsigned int *chip_sizes, int flags); int gpio_mockup_remove(struct gpio_mockup *ctx); const char *gpio_mockup_chip_name(struct gpio_mockup *ctx, unsigned int idx); -- 2.30.2