diff options
| author | Wei Yongjun <yongjun_wei@trendmicro.com.cn> | 2013-11-11 02:35:45 -0500 |
|---|---|---|
| committer | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2013-11-11 03:01:44 -0500 |
| commit | acc84667c533eddc6c84f5986860b7d8b2b9ee0d (patch) | |
| tree | 618b536514f16db61f41e24e167afcffabcfa067 /drivers/input | |
| parent | 158baef35129e46e3eb15838092e91b94f0181e0 (diff) | |
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 <yongjun_wei@trendmicro.com.cn>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Diffstat (limited to 'drivers/input')
| -rw-r--r-- | drivers/input/misc/mma8450.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/input/misc/mma8450.c b/drivers/input/misc/mma8450.c index f3309696d053..59d4dcddf6de 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) | |||
| 168 | * I2C init/probing/exit functions | 168 | * I2C init/probing/exit functions |
| 169 | */ | 169 | */ |
| 170 | static int mma8450_probe(struct i2c_client *c, | 170 | static int mma8450_probe(struct i2c_client *c, |
| 171 | const struct i2c_device_id *id) | 171 | const struct i2c_device_id *id) |
| 172 | { | 172 | { |
| 173 | struct input_polled_dev *idev; | 173 | struct input_polled_dev *idev; |
| 174 | struct mma8450 *m; | 174 | struct mma8450 *m; |
| @@ -204,6 +204,8 @@ static int mma8450_probe(struct i2c_client *c, | |||
| 204 | goto err_free_mem; | 204 | goto err_free_mem; |
| 205 | } | 205 | } |
| 206 | 206 | ||
| 207 | i2c_set_clientdata(c, m); | ||
| 208 | |||
| 207 | return 0; | 209 | return 0; |
| 208 | 210 | ||
| 209 | err_free_mem: | 211 | err_free_mem: |
