gpio: sim: use sysfs_streq() and avoid an strdup()
authorBartosz Golaszewski <bartosz.golaszewski@linaro.org>
Wed, 9 Aug 2023 13:14:41 +0000 (15:14 +0200)
committerBartosz Golaszewski <bartosz.golaszewski@linaro.org>
Fri, 11 Aug 2023 11:58:06 +0000 (13:58 +0200)
commit39df52ddd932244f2cc08ce520ad064b7dc8c278
treec7960726e1c1c7bb289a0e705e82e7833f9109b2
parent87d0688483f56c748b37a5298bdc382df5cf8f74
gpio: sim: use sysfs_streq() and avoid an strdup()

When comparing strings passed to us from configfs, we can pass the page
argument directly to sysfs_streq() and avoid manual string trimming.

Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
drivers/gpio/gpio-sim.c