From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753014AbbBZBMz (ORCPT ); Wed, 25 Feb 2015 20:12:55 -0500 Received: from mail-ie0-f171.google.com ([209.85.223.171]:36447 "EHLO mail-ie0-f171.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752617AbbBZBMy (ORCPT ); Wed, 25 Feb 2015 20:12:54 -0500 Date: Wed, 25 Feb 2015 17:12:49 -0800 From: Dmitry Torokhov To: Stefan Sauer Cc: linux-kernel@vger.kernel.org Subject: Re: [PATCH] mma8450: add parent device Message-ID: <20150226011249.GB25965@dtor-ws> References: <1424854388-31227-1-git-send-email-ensonic@google.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1424854388-31227-1-git-send-email-ensonic@google.com> User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 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