summaryrefslogtreecommitdiff
path: root/drivers/input/misc/mma8450.c
diff options
context:
space:
mode:
authorStefan Sauer <ensonic@google.com>2015-02-26 04:11:04 +0300
committerDmitry Torokhov <dmitry.torokhov@gmail.com>2015-02-26 04:13:51 +0300
commit71daf89476144343df5db1686759a06459292a5f (patch)
tree721acdbfda5f23bcc774713ca50678e82dc76fa8 /drivers/input/misc/mma8450.c
parent4c971aa78314253cce914ed29e3d90df3326d646 (diff)
downloadlinux-71daf89476144343df5db1686759a06459292a5f.tar.xz
Input: mma8450 - add parent device
Add the parent device so that udev can show the full hierarchy. This avoids the device showing up under /devices/virtual/input instead of the i2c bus it is actually attached to. Signed-off-by: Stefan Sauer <ensonic@google.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Diffstat (limited to 'drivers/input/misc/mma8450.c')
-rw-r--r--drivers/input/misc/mma8450.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/input/misc/mma8450.c b/drivers/input/misc/mma8450.c
index 59d4dcddf6de..98228773a111 100644
--- a/drivers/input/misc/mma8450.c
+++ b/drivers/input/misc/mma8450.c
@@ -187,6 +187,7 @@ static int mma8450_probe(struct i2c_client *c,
idev->private = m;
idev->input->name = MMA8450_DRV_NAME;
idev->input->id.bustype = BUS_I2C;
+ idev->input->dev.parent = &c->dev;
idev->poll = mma8450_poll;
idev->poll_interval = POLL_INTERVAL;
idev->poll_interval_max = POLL_INTERVAL_MAX;