mbox series

[v2,0/2] gpiolib: gpio_device label improvements

Message ID 20171214142920.32683-1-brgl@bgdev.pl
Headers show
Series gpiolib: gpio_device label improvements | expand

Message

Bartosz Golaszewski Dec. 14, 2017, 2:29 p.m. UTC
Avoid unnecessary memory allocations with kstrdup_const().

v1 -> v2:
- use a ternary operator instead of an if/else in patch 2/2

Bartosz Golaszewski (2):
  gpiolib: constify label in gpio_device
  gpiolib: use kstrdup_const() for gpio_device label

 drivers/gpio/gpiolib.c | 9 +++------
 drivers/gpio/gpiolib.h | 2 +-
 2 files changed, 4 insertions(+), 7 deletions(-)