Commit a40fe1ff authored by Bartosz Golaszewski's avatar Bartosz Golaszewski

gpio: sim: simplify gpio_sim_device_config_live_store()

Simplify the logic when checking the current live value against the user
input.
Signed-off-by: default avatarBartosz Golaszewski <bartosz.golaszewski@linaro.org>
Reviewed-by: default avatarAndy Shevchenko <andriy.shevchenko@linux.intel.com>
parent 5f6d1998
...@@ -986,8 +986,7 @@ gpio_sim_device_config_live_store(struct config_item *item, ...@@ -986,8 +986,7 @@ gpio_sim_device_config_live_store(struct config_item *item,
mutex_lock(&dev->lock); mutex_lock(&dev->lock);
if ((!live && !gpio_sim_device_is_live_unlocked(dev)) || if (live == gpio_sim_device_is_live_unlocked(dev))
(live && gpio_sim_device_is_live_unlocked(dev)))
ret = -EPERM; ret = -EPERM;
else if (live) else if (live)
ret = gpio_sim_device_activate_unlocked(dev); ret = gpio_sim_device_activate_unlocked(dev);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment