From 76771ab5ac87148a0f888c357029e13bdab395c4 Mon Sep 17 00:00:00 2001 From: Banajit Goswami Date: Wed, 6 Jan 2016 12:13:17 -0800 Subject: [PATCH] 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: Banajit Goswami Signed-off-by: Bhalchandra Gajare --- drivers/mfd/wcd9xxx-core.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/mfd/wcd9xxx-core.c b/drivers/mfd/wcd9xxx-core.c index 5bcd0db929b3..54a5e9b1e0d9 100644 --- a/drivers/mfd/wcd9xxx-core.c +++ b/drivers/mfd/wcd9xxx-core.c @@ -1,4 +1,4 @@ -/* 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; }