All of lore.kernel.org
 help / color / mirror / Atom feed
From: Wei Yongjun <weiyj.lk@gmail.com>
To: dmitry.torokhov@gmail.com, grant.likely@linaro.org,
	rob.herring@calxeda.com, wfp5p@virginia.edu,
	broonie@opensource.wolfsonmicro.com, javier@dowhile0.org,
	rmk+kernel@arm.linux.org.uk
Cc: yongjun_wei@trendmicro.com.cn, linux-input@vger.kernel.org
Subject: [PATCH] Input: mpu3050 - add missing i2c_set_clientdata() in mpu3050_probe()
Date: Mon, 11 Nov 2013 14:18:54 +0800	[thread overview]
Message-ID: <CAPgLHd-ujkwTBn=hUH6SxfhHpYHyGqvrkcyuRTFkXmWtqE2Zjg@mail.gmail.com> (raw)

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;
 


             reply	other threads:[~2013-11-11  6:18 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-11-11  6:18 Wei Yongjun [this message]
2013-11-11  7:34 ` [PATCH] Input: mpu3050 - add missing i2c_set_clientdata() in mpu3050_probe() Dmitry Torokhov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAPgLHd-ujkwTBn=hUH6SxfhHpYHyGqvrkcyuRTFkXmWtqE2Zjg@mail.gmail.com' \
    --to=weiyj.lk@gmail.com \
    --cc=broonie@opensource.wolfsonmicro.com \
    --cc=dmitry.torokhov@gmail.com \
    --cc=grant.likely@linaro.org \
    --cc=javier@dowhile0.org \
    --cc=linux-input@vger.kernel.org \
    --cc=rmk+kernel@arm.linux.org.uk \
    --cc=rob.herring@calxeda.com \
    --cc=wfp5p@virginia.edu \
    --cc=yongjun_wei@trendmicro.com.cn \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.