diff options
author | Bartosz Golaszewski <brgl@bgdev.pl> | 2017-12-14 15:29:20 +0100 |
---|---|---|
committer | Linus Walleij <linus.walleij@linaro.org> | 2017-12-20 09:16:39 +0100 |
commit | fcf273e5807976009dbb5ffb00bd5b9091843fe6 (patch) | |
tree | bf5d05ee0bbd17904fc7efa59cfe45068e914df6 /include/linux/device.h | |
parent | 3b469b0a139e65a7c3da32f5481467f6bdcee837 (diff) | |
download | lwn-fcf273e5807976009dbb5ffb00bd5b9091843fe6.tar.gz lwn-fcf273e5807976009dbb5ffb00bd5b9091843fe6.zip |
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>
Diffstat (limited to 'include/linux/device.h')
0 files changed, 0 insertions, 0 deletions