Commit 0c14f3aa authored by Andy Shevchenko's avatar Andy Shevchenko Committed by Bartosz Golaszewski

gpio: sim: Deactivate device in reversed order

Run the steps to deactivate device in the reserved order to what
it has been done in gpio_sim_device_activate_unlocked().
Signed-off-by: default avatarAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: default avatarBartosz Golaszewski <bartosz.golaszewski@linaro.org>
parent 8a36cdc8
...@@ -953,9 +953,9 @@ static void gpio_sim_device_deactivate_unlocked(struct gpio_sim_device *dev) ...@@ -953,9 +953,9 @@ static void gpio_sim_device_deactivate_unlocked(struct gpio_sim_device *dev)
swnode = dev_fwnode(&dev->pdev->dev); swnode = dev_fwnode(&dev->pdev->dev);
platform_device_unregister(dev->pdev); platform_device_unregister(dev->pdev);
gpio_sim_remove_hogs(dev);
gpio_sim_remove_swnode_recursive(swnode); gpio_sim_remove_swnode_recursive(swnode);
dev->pdev = NULL; dev->pdev = NULL;
gpio_sim_remove_hogs(dev);
} }
static ssize_t static ssize_t
......
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