diff options
| -rw-r--r-- | drivers/gpio/gpiolib.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/gpio/gpiolib.h b/drivers/gpio/gpiolib.h index 3abb90385829..8d1a762f9d11 100644 --- a/drivers/gpio/gpiolib.h +++ b/drivers/gpio/gpiolib.h @@ -17,6 +17,7 @@ #include <linux/module.h> #include <linux/notifier.h> #include <linux/spinlock.h> +#include <linux/string.h> #include <linux/srcu.h> #include <linux/workqueue.h> @@ -107,7 +108,7 @@ extern const char *const gpio_suffixes[]; if (con_id) \ snprintf(propname, sizeof(propname), "%s-%s", con_id, __gs); \ else \ - snprintf(propname, sizeof(propname), "%s", __gs); \ + strscpy(propname, __gs); \ 1; \ }); \ __suffixes++) |
