summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorAlexandre Courbot <acourbot@nvidia.com>2013-06-06 12:43:58 +0900
committerRiham Haidar <rhaidar@nvidia.com>2013-06-08 21:20:52 -0700
commit030cd4c5f53917f463b3463ed4674459c1a2ff45 (patch)
tree42f11e9087f91c3c3047f604a5a1e84d3a81b854 /drivers
parentae3635ce3f0123988d6bcd7ebedb6c7d9295d90e (diff)
cm3218: fix incompatible pointer use in driver
queue_work() and cancel_delayed_work() were used with the wrong argument, causing a soft hang when shutting the driver down. Bug 1293990 Signed-off-by: Alexandre Courbot <acourbot@nvidia.com> Change-Id: Ia7791e552e12b66f642c0179d5f5a8e7b5feff5a Reviewed-on: http://git-master/r/236126 (cherry picked from commit eb6acd5f6a5f249e4d1d26e58fb9bb1786ddb3d8) Reviewed-on: http://git-master/r/236558 Reviewed-by: Sachin Nikam <snikam@nvidia.com> Reviewed-by: Shridhar Rasal <srasal@nvidia.com> Reviewed-by: Automatic_Commit_Validation_User
Diffstat (limited to 'drivers')
-rw-r--r--drivers/input/misc/cm3218.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/input/misc/cm3218.c b/drivers/input/misc/cm3218.c
index 5852b8fe8945..e564317afe89 100644
--- a/drivers/input/misc/cm3218.c
+++ b/drivers/input/misc/cm3218.c
@@ -126,7 +126,7 @@ static int cm3218_power(int on)
if (ret < 0)
return ret;
chip_info->inp_dev->enabled = true;
- queue_work(chip_info->wq, &report_work);
+ queue_delayed_work(chip_info->wq, &report_work, 0);
} else if (!on && IS_ALS_POWER_ON) {
ALS_POWER_DISABLE;
ret = cm3218_write();
@@ -326,7 +326,7 @@ static void cm3218_shutdown(struct i2c_client *client)
{
mutex_lock(&chip_info->lock);
if (IS_ALS_POWER_ON) {
- cancel_delayed_work_sync(chip_info->wq);
+ cancel_delayed_work_sync(&report_work);
}
chip_info->shutdown_complete = 1;
mutex_unlock(&chip_info->lock);