From mboxrd@z Thu Jan 1 00:00:00 1970 From: Sebastian Andrzej Siewior Subject: [PATCH 7/7] i2c/pxa2xx: pass of_node from platform driver to adapter Date: Wed, 24 Nov 2010 22:20:17 +0100 Message-ID: <1290633617-15311-8-git-send-email-bigeasy@linutronix.de> References: <1290633617-15311-1-git-send-email-bigeasy@linutronix.de> Return-path: In-Reply-To: <1290633617-15311-1-git-send-email-bigeasy-hfZtesqFncYOwBW4kG4KsQ@public.gmane.org> Sender: linux-i2c-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org To: linux-i2c-u79uwXL29TY76Z2rM5mHXA@public.gmane.org Cc: linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org, sodaville-hfZtesqFncYOwBW4kG4KsQ@public.gmane.org, tglx-hfZtesqFncYOwBW4kG4KsQ@public.gmane.org, eric.y.miao-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org, linux-lFZ/pmaqli7XmaaqVzeoHQ@public.gmane.org, ben-linux-elnMNo+KYs3YtjvyW6yDsg@public.gmane.org, Sebastian Andrzej Siewior , grant.likely-s3s/WqlpOiPyB63q8FvJNQ@public.gmane.org, Dirk Brandewie List-Id: linux-i2c@vger.kernel.org the of_node will auto-publish devices which are added to the device tree. Cc: grant.likely-s3s/WqlpOiPyB63q8FvJNQ@public.gmane.org Signed-off-by: Sebastian Andrzej Siewior Signed-off-by: Dirk Brandewie --- drivers/i2c/busses/i2c-pxa.c | 3 +++ 1 files changed, 3 insertions(+), 0 deletions(-) diff --git a/drivers/i2c/busses/i2c-pxa.c b/drivers/i2c/busses/i2c-pxa.c index 1a48470..dd6ed77 100644 --- a/drivers/i2c/busses/i2c-pxa.c +++ b/drivers/i2c/busses/i2c-pxa.c @@ -1083,6 +1083,9 @@ static int i2c_pxa_probe(struct platform_device *dev) i2c->adap.algo_data = i2c; i2c->adap.dev.parent = &dev->dev; +#ifdef CONFIG_OF + i2c->adap.dev.of_node = dev->dev.of_node; +#endif ret = i2c_add_numbered_adapter(&i2c->adap); if (ret < 0) { -- 1.7.3.2