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 /tools/perf/scripts/python/Perf-Trace-Util/Context.c | |
| 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>
Diffstat (limited to 'tools/perf/scripts/python/Perf-Trace-Util/Context.c')
0 files changed, 0 insertions, 0 deletions
