* [PATCH] mma8450: add parent device
@ 2015-02-25 8:53 Stefan Sauer
2015-02-26 1:12 ` Dmitry Torokhov
0 siblings, 1 reply; 2+ messages in thread
From: Stefan Sauer @ 2015-02-25 8:53 UTC (permalink / raw)
To: linux-kernel; +Cc: Dmitry Torokhov, Stefan Sauer
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>
---
drivers/input/misc/mma8450.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/input/misc/mma8450.c b/drivers/input/misc/mma8450.c
index 59d4dcd..9822877 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;
--
2.2.0.rc0.207.ga3a616c
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] mma8450: add parent device
2015-02-25 8:53 [PATCH] mma8450: add parent device Stefan Sauer
@ 2015-02-26 1:12 ` Dmitry Torokhov
0 siblings, 0 replies; 2+ messages in thread
From: Dmitry Torokhov @ 2015-02-26 1:12 UTC (permalink / raw)
To: Stefan Sauer; +Cc: linux-kernel
On Wed, Feb 25, 2015 at 09:53:08AM +0100, Stefan Sauer wrote:
> 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>
Applied, thank you.
> ---
> drivers/input/misc/mma8450.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/drivers/input/misc/mma8450.c b/drivers/input/misc/mma8450.c
> index 59d4dcd..9822877 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;
> --
> 2.2.0.rc0.207.ga3a616c
>
--
Dmitry
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2015-02-26 1:12 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-02-25 8:53 [PATCH] mma8450: add parent device Stefan Sauer
2015-02-26 1:12 ` Dmitry Torokhov
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®