Input: mpu3050 - add missing i2c_set_clientdata() in mpu3050_probe()
authorWei Yongjun <yongjun_wei@trendmicro.com.cn>
Mon, 11 Nov 2013 07:34:05 +0000 (23:34 -0800)
committerDmitry Torokhov <dmitry.torokhov@gmail.com>
Mon, 11 Nov 2013 08:01:44 +0000 (00:01 -0800)
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>
drivers/input/misc/mpu3050.c

index dce0d95943c537e1041dbca8372113f87fab3efb..6983ffbbfb94ac5fa90e0147c6a19de44d32e98b 100644 (file)
@@ -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;