summaryrefslogtreecommitdiff
path: root/arch/arm/mach-tegra/baseband-xmm-power2.c
diff options
context:
space:
mode:
authorVinayak Pane <vpane@nvidia.com>2012-01-05 15:28:54 -0800
committerVarun Colbert <vcolbert@nvidia.com>2012-01-30 12:31:23 -0800
commit911318c9e3c928bb6d835f0c5a14d7780d390a65 (patch)
tree5a01e0ce8e1f9fbf2330284e1c3dea496d98457d /arch/arm/mach-tegra/baseband-xmm-power2.c
parent5058297dfe2449fc2a4e7acdbef3b75caf073c8a (diff)
arm: tegra: comms: fix crash at dev attr change
Check the state machine before poweron the modem by device attribute change routine. Maintain the state machine to avoid crash after writing state change to /sys/devices/platform/baseband_xmm_power/xmm_onoff Also cancel workqueue at module unload to avoid possible crash. Bug 898008 Reviewed-on: http://git-master/r/72934 Change-Id: I0d8286774040f155c930ecb0bb69778de6c606ac Signed-off-by: Vinayak Pane <vpane@nvidia.com> Signed-off-by: Varun Wadekar <vwadekar@nvidia.com> Reviewed-on: http://git-master/r/77744 Reviewed-by: Automatic_Commit_Validation_User
Diffstat (limited to 'arch/arm/mach-tegra/baseband-xmm-power2.c')
-rw-r--r--arch/arm/mach-tegra/baseband-xmm-power2.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/arch/arm/mach-tegra/baseband-xmm-power2.c b/arch/arm/mach-tegra/baseband-xmm-power2.c
index dd05202ba6ec..77ba073d751c 100644
--- a/arch/arm/mach-tegra/baseband-xmm-power2.c
+++ b/arch/arm/mach-tegra/baseband-xmm-power2.c
@@ -611,7 +611,10 @@ static int baseband_xmm_power2_driver_remove(struct platform_device *device)
}
/* free work structure */
- destroy_workqueue(workqueue);
+ if (workqueue) {
+ cancel_work_sync(baseband_xmm_power2_work);
+ destroy_workqueue(workqueue);
+ }
kfree(baseband_xmm_power2_work);
baseband_xmm_power2_work = (struct baseband_xmm_power_work_t *) 0;