From: Wei Yongjun Date: Mon, 11 Nov 2013 07:35:45 +0000 (-0800) Subject: Input: mma8450 - add missing i2c_set_clientdata() in mma8450_probe() X-Git-Tag: v4.6-rc1~9^2~753 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=acc84667c533eddc6c84f5986860b7d8b2b9ee0d;p=platform%2Fkernel%2Flinux-exynos.git Input: mma8450 - add missing i2c_set_clientdata() in mma8450_probe() Add missing i2c_set_clientdata() in mma8450_probe(), otherwise calling i2c_get_clientdata() in mma8450_remove() returns NULL. Signed-off-by: Wei Yongjun Signed-off-by: Dmitry Torokhov --- diff --git a/drivers/input/misc/mma8450.c b/drivers/input/misc/mma8450.c index f330969..59d4dcd 100644 --- a/drivers/input/misc/mma8450.c +++ b/drivers/input/misc/mma8450.c @@ -168,7 +168,7 @@ static void mma8450_close(struct input_polled_dev *dev) * I2C init/probing/exit functions */ static int mma8450_probe(struct i2c_client *c, - const struct i2c_device_id *id) + const struct i2c_device_id *id) { struct input_polled_dev *idev; struct mma8450 *m; @@ -204,6 +204,8 @@ static int mma8450_probe(struct i2c_client *c, goto err_free_mem; } + i2c_set_clientdata(c, m); + return 0; err_free_mem: