Skip to content

Commit

Permalink
Input: mpu3050 - add missing i2c_set_clientdata() in mpu3050_probe()
Browse files Browse the repository at this point in the history
Add missing i2c_set_clientdata() in mpu3050_probe(), otherwise
calling i2c_get_clientdata() in mpu3050_remove() returns NULL.

Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
  • Loading branch information
Wei Yongjun authored and Dmitry Torokhov committed Nov 11, 2013
1 parent a108193 commit 158baef
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions drivers/input/misc/mpu3050.c
Original file line number Diff line number Diff line change
Expand Up @@ -383,6 +383,7 @@ static int mpu3050_probe(struct i2c_client *client,

pm_runtime_enable(&client->dev);
pm_runtime_set_autosuspend_delay(&client->dev, MPU3050_AUTO_DELAY);
i2c_set_clientdata(client, sensor);

return 0;

Expand Down

0 comments on commit 158baef

Please sign in to comment.