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

Commit 76771ab5 authored by Banajit Goswami's avatar Banajit Goswami Committed by Gerrit - the friendly Code Review server
Browse files

mfd: wcd9xxx: send down notification to devices before cleaning-up IRQs



IRQ clean up should be done only after codec devices have been
notified with device down. Without this, there are chances of
race-condition where some of the resources like locks used for
safe handling of the IRQs would be used after those are freed.

CRs-Fixed: 1102353
Change-Id: I276571a7e50fcf227febd86494589b14988e3d41
Signed-off-by: default avatarBanajit Goswami <bgoswami@codeaurora.org>
Signed-off-by: default avatarBhalchandra Gajare <gajare@codeaurora.org>
parent efdbbff8
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
/* Copyright (c) 2011-2016, The Linux Foundation. All rights reserved.
/* Copyright (c) 2011-2017, The Linux Foundation. All rights reserved.
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License version 2 and
@@ -1508,9 +1508,9 @@ static int wcd9xxx_slim_device_down(struct slim_device *sldev)
		return 0;

	wcd9xxx->dev_up = false;
	wcd9xxx_irq_exit(&wcd9xxx->core_res);
	if (wcd9xxx->dev_down)
		wcd9xxx->dev_down(wcd9xxx);
	wcd9xxx_irq_exit(&wcd9xxx->core_res);
	wcd9xxx_reset_low(wcd9xxx->dev);
	return 0;
}