commit | fcf273e5807976009dbb5ffb00bd5b9091843fe6 | [log] [tgz] |
---|---|---|
author | Bartosz Golaszewski <brgl@bgdev.pl> | Thu Dec 14 15:29:20 2017 +0100 |
committer | Linus Walleij <linus.walleij@linaro.org> | Wed Dec 20 09:16:39 2017 +0100 |
tree | bf5d05ee0bbd17904fc7efa59cfe45068e914df6 | |
parent | 3b469b0a139e65a7c3da32f5481467f6bdcee837 [diff] |
gpiolib: use kstrdup_const() for gpio_device label Users often pass a pointer to a static string to gpiochip_add_data() family of functions. Avoid unnecessary memory allocations with the provided helper routine. While at it: use a ternary operator instead of an if else for brevity. Signed-off-by: Bartosz Golaszewski <brgl@bgdev.pl> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>