input: gsensor: mma8452: initialize data early
author黄涛 <huangtao@rock-chips.com>
Wed, 9 Nov 2011 01:44:26 +0000 (09:44 +0800)
committer黄涛 <huangtao@rock-chips.com>
Wed, 9 Nov 2011 01:44:26 +0000 (09:44 +0800)
commitacd77ec58bc88096a6ab7f4cc8a50b4f35ce0651
tree75b35d37425aab039bb921f59457f15db1a9fe1d
parent686b79c4881730216ba123375bc80a3705bb1c6d
input: gsensor: mma8452: initialize data early

fix this bug:
Unable to handle kernel NULL pointer dereference at virtual address 00000000
PC is at __mutex_lock_slowpath+0x4c/0x154
LR is at mma8452_get_data+0x1fc/0x238
[<c07e4f2c>] (__mutex_lock_slowpath+0x4c/0x154) from [<c066d9c4>] (mma8452_get_data+0x1fc/0x238)
[<c066d9c4>] (mma8452_get_data+0x1fc/0x238) from [<c066da10>] (mma8452_delaywork_func+0x10/0x30)
[<c066da10>] (mma8452_delaywork_func+0x10/0x30) from [<c0466600>] (process_one_work+0x258/0x3ac)
[<c0466600>] (process_one_work+0x258/0x3ac) from [<c0468f60>] (worker_thread+0x238/0x440)
[<c0468f60>] (worker_thread+0x238/0x440) from [<c046c9ac>] (kthread+0x80/0x88)
[<c046c9ac>] (kthread+0x80/0x88) from [<c0433190>] (kernel_thread_exit+0x0/0x8)
drivers/input/gsensor/mma8452.c