Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit bb63f7d3 authored by Viresh Kumar's avatar Viresh Kumar Committed by Lee Jones
Browse files

mfd: wm8994-core: Disable regulators before removing them



The order in which resources were freed in wm8994_device_exit() isn't
correct. The regulators are removed before they are disabled.

Fix it by reordering code a bit, which makes it exact opposite of
wm8994_device_init() as well.

Signed-off-by: default avatarViresh Kumar <viresh.kumar@linaro.org>
Acked-by: default avatarCharles Keepax <ckeepax@opensource.wolfsonmicro.com>
Signed-off-by: default avatarLee Jones <lee.jones@linaro.org>
parent 3e56c468
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -603,9 +603,9 @@ static int wm8994_device_init(struct wm8994 *wm8994, int irq)
static void wm8994_device_exit(struct wm8994 *wm8994)
{
	pm_runtime_disable(wm8994->dev);
	mfd_remove_devices(wm8994->dev);
	wm8994_irq_exit(wm8994);
	regulator_bulk_disable(wm8994->num_supplies, wm8994->supplies);
	mfd_remove_devices(wm8994->dev);
}

static const struct of_device_id wm8994_of_match[] = {