Commit 158baef35129e46e3eb15838092e91b94f0181e0

Authored by Wei Yongjun
Committed by Dmitry Torokhov
1 parent a108193cf9

Input: mpu3050 - add missing i2c_set_clientdata() in mpu3050_probe()

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>

Showing 1 changed file with 1 additions and 0 deletions Side-by-side Diff

drivers/input/misc/mpu3050.c
... ... @@ -383,6 +383,7 @@
383 383  
384 384 pm_runtime_enable(&client->dev);
385 385 pm_runtime_set_autosuspend_delay(&client->dev, MPU3050_AUTO_DELAY);
  386 + i2c_set_clientdata(client, sensor);
386 387  
387 388 return 0;
388 389