diff options
author | Andy Shevchenko <andriy.shevchenko@linux.intel.com> | 2023-03-09 19:46:35 +0100 |
---|---|---|
committer | Bartosz Golaszewski <bartosz.golaszewski@linaro.org> | 2023-03-10 16:54:01 +0100 |
commit | 0c14f3aa388d3becd38923869e17f9947a5e5926 (patch) | |
tree | 45fbd523d88fdc594d789111d523a31a8eff9820 /drivers/gpio/gpio-sim.c | |
parent | gpio: loongson: Remove unnecessary .owner (diff) | |
download | linux-0c14f3aa388d3becd38923869e17f9947a5e5926.tar.xz linux-0c14f3aa388d3becd38923869e17f9947a5e5926.zip |
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: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
Diffstat (limited to 'drivers/gpio/gpio-sim.c')
-rw-r--r-- | drivers/gpio/gpio-sim.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/gpio/gpio-sim.c b/drivers/gpio/gpio-sim.c index e5dfd636c63c..a1c8702f362c 100644 --- a/drivers/gpio/gpio-sim.c +++ b/drivers/gpio/gpio-sim.c @@ -953,9 +953,9 @@ static void gpio_sim_device_deactivate_unlocked(struct gpio_sim_device *dev) swnode = dev_fwnode(&dev->pdev->dev); platform_device_unregister(dev->pdev); + gpio_sim_remove_hogs(dev); gpio_sim_remove_swnode_recursive(swnode); dev->pdev = NULL; - gpio_sim_remove_hogs(dev); } static ssize_t |