diff options
author | Shawn Guo <shawn.guo@linaro.org> | 2011-07-31 22:56:10 -0400 |
---|---|---|
committer | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2011-07-31 23:08:15 -0400 |
commit | 71ff069c3d6a2b23eaf516bc714a20ce0cdc3609 (patch) | |
tree | 39bc2afb8791c01c4202c5838f7895ee908463b6 /drivers/input | |
parent | 1f4bb066433322f6f189b084ceebdfb4add77292 (diff) |
Input: mma8450 - add device tree probe support
It adds device tree probe support for mma8450 driver.
Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
Acked-by: Eric Miao <eric.miao@linaro.org>
Acked-by: Grant Likely <grant.likely@secretlab.ca>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
Diffstat (limited to 'drivers/input')
-rw-r--r-- | drivers/input/misc/mma8450.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/drivers/input/misc/mma8450.c b/drivers/input/misc/mma8450.c index 20f8f9284f02..6c76cf792991 100644 --- a/drivers/input/misc/mma8450.c +++ b/drivers/input/misc/mma8450.c | |||
@@ -24,6 +24,7 @@ | |||
24 | #include <linux/delay.h> | 24 | #include <linux/delay.h> |
25 | #include <linux/i2c.h> | 25 | #include <linux/i2c.h> |
26 | #include <linux/input-polldev.h> | 26 | #include <linux/input-polldev.h> |
27 | #include <linux/of_device.h> | ||
27 | 28 | ||
28 | #define MMA8450_DRV_NAME "mma8450" | 29 | #define MMA8450_DRV_NAME "mma8450" |
29 | 30 | ||
@@ -229,10 +230,17 @@ static const struct i2c_device_id mma8450_id[] = { | |||
229 | }; | 230 | }; |
230 | MODULE_DEVICE_TABLE(i2c, mma8450_id); | 231 | MODULE_DEVICE_TABLE(i2c, mma8450_id); |
231 | 232 | ||
233 | static const struct of_device_id mma8450_dt_ids[] = { | ||
234 | { .compatible = "fsl,mma8450", }, | ||
235 | { /* sentinel */ } | ||
236 | }; | ||
237 | MODULE_DEVICE_TABLE(i2c, mma8450_dt_ids); | ||
238 | |||
232 | static struct i2c_driver mma8450_driver = { | 239 | static struct i2c_driver mma8450_driver = { |
233 | .driver = { | 240 | .driver = { |
234 | .name = MMA8450_DRV_NAME, | 241 | .name = MMA8450_DRV_NAME, |
235 | .owner = THIS_MODULE, | 242 | .owner = THIS_MODULE, |
243 | .of_match_table = mma8450_dt_ids, | ||
236 | }, | 244 | }, |
237 | .probe = mma8450_probe, | 245 | .probe = mma8450_probe, |
238 | .remove = __devexit_p(mma8450_remove), | 246 | .remove = __devexit_p(mma8450_remove), |