linux-input.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] Input: mpu3050 - add missing i2c_set_clientdata() in mpu3050_probe()
@ 2013-11-11  6:18 Wei Yongjun
  2013-11-11  7:34 ` Dmitry Torokhov
  0 siblings, 1 reply; 2+ messages in thread
From: Wei Yongjun @ 2013-11-11  6:18 UTC (permalink / raw)
  To: dmitry.torokhov, grant.likely, rob.herring, wfp5p, broonie,
	javier, rmk+kernel
  Cc: yongjun_wei, linux-input

From: Wei Yongjun <yongjun_wei@trendmicro.com.cn>

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>
---
 drivers/input/misc/mpu3050.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/input/misc/mpu3050.c b/drivers/input/misc/mpu3050.c
index dce0d95..6983ffb 100644
--- a/drivers/input/misc/mpu3050.c
+++ b/drivers/input/misc/mpu3050.c
@@ -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;
 


^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2013-11-11  7:34 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-11-11  6:18 [PATCH] Input: mpu3050 - add missing i2c_set_clientdata() in mpu3050_probe() Wei Yongjun
2013-11-11  7:34 ` Dmitry Torokhov

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).