input: misc: akm8975: fix kernel panic on shutdown
David Yu [Wed, 11 Sep 2013 11:46:51 +0000 (20:46 +0900)]
When device is full flashed then reboots, sometimes akm_probe() and
akm_shutdown() races. akm_shutdown() release all the resources thus kernel
panic can occur in akm_probe().

Change-Id: I4ba2d3fc36dd919306637ec550a098e3f174f159
Signed-off-by: David Yu <davyu@nvidia.com>
Signed-off-by: Robert Collins <rcollins@nvidia.com>
Reviewed-on: http://git-master/r/273088
(cherry picked from commit a1f0baffc0350c3a94e39f5aece9da97d7baf657)
Reviewed-on: http://git-master/r/280965
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Gabby Lee <galee@nvidia.com>

drivers/input/misc/compass/ak8975_input.c

index 55c0c36..8c888d8 100644 (file)
@@ -1384,7 +1384,7 @@ static int akm_remove(struct i2c_client *client)
 
 static void akm_shutdown(struct i2c_client *client)
 {
-       akm_remove(client);
+       dev_info(&client->dev, "%s\n", __func__);
 }
 
 static struct mpu_platform_data *akm_parse_dt(struct i2c_client *client)