From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753160AbbBYIxS (ORCPT ); Wed, 25 Feb 2015 03:53:18 -0500 Received: from mail-wi0-f172.google.com ([209.85.212.172]:43167 "EHLO mail-wi0-f172.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750771AbbBYIxR (ORCPT ); Wed, 25 Feb 2015 03:53:17 -0500 From: Stefan Sauer To: linux-kernel@vger.kernel.org Cc: Dmitry Torokhov , Stefan Sauer Subject: [PATCH] mma8450: add parent device Date: Wed, 25 Feb 2015 09:53:08 +0100 Message-Id: <1424854388-31227-1-git-send-email-ensonic@google.com> X-Mailer: git-send-email 2.2.0.rc0.207.ga3a616c Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 --- 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