From patchwork Fri Aug 31 11:02:55 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Florian Vaussard X-Patchwork-Id: 1392671 Return-Path: X-Original-To: patchwork-linux-omap@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork2.kernel.org (Postfix) with ESMTP id 9CDF0E0000 for ; Fri, 31 Aug 2012 11:03:20 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751908Ab2HaLDT (ORCPT ); Fri, 31 Aug 2012 07:03:19 -0400 Received: from smtp0.epfl.ch ([128.178.224.219]:52095 "HELO smtp0.epfl.ch" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with SMTP id S1751780Ab2HaLDS (ORCPT ); Fri, 31 Aug 2012 07:03:18 -0400 Received: (qmail 30427 invoked by uid 107); 31 Aug 2012 11:03:15 -0000 X-Virus-Scanned: ClamAV Received: from lsro1pc340.epfl.ch (HELO lsro1pc340.epfl.ch) (128.178.145.154) (authenticated) by smtp0.epfl.ch (AngelmatoPhylax SMTP proxy) with ESMTPA; Fri, 31 Aug 2012 13:03:15 +0200 From: Florian Vaussard To: Tony Lindgren Cc: linux-i2c@vger.kernel.org, linux-omap@vger.kernel.org, Ben Dooks , Wolfram Sang , Benoit Cousson , Florian Vaussard , =?UTF-8?q?Philippe=20R=C3=A9tornaz?= Subject: [PATCH] omap-i2c: fix incorrect log message when using a device tree Date: Fri, 31 Aug 2012 13:02:55 +0200 Message-Id: <1346410975-29930-1-git-send-email-florian.vaussard@epfl.ch> X-Mailer: git-send-email 1.7.5.4 Sender: linux-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.org When booting using a device tree, the adapter number is dynamically assigned after the log message is sent. This patch modifies the log message to get a correct adapter id. Applies on 3.6-rc3. Tested on OMAP3 (Gumstix Overo). Signed-off-by: Florian Vaussard Tested-by: Benoit Cousson Acked-by: Benoit Cousson Acked-by: Shubhrajyoti D --- drivers/i2c/busses/i2c-omap.c | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/i2c/busses/i2c-omap.c b/drivers/i2c/busses/i2c-omap.c index 5d19a49..136b4fe 100644 --- a/drivers/i2c/busses/i2c-omap.c +++ b/drivers/i2c/busses/i2c-omap.c @@ -1064,9 +1064,6 @@ omap_i2c_probe(struct platform_device *pdev) goto err_unuse_clocks; } - dev_info(dev->dev, "bus %d rev%d.%d.%d at %d kHz\n", pdev->id, - dev->dtrev, dev->rev >> 4, dev->rev & 0xf, dev->speed); - adap = &dev->adapter; i2c_set_adapdata(adap, dev); adap->owner = THIS_MODULE; @@ -1084,6 +1081,9 @@ omap_i2c_probe(struct platform_device *pdev) goto err_free_irq; } + dev_info(dev->dev, "bus %d rev%d.%d.%d at %d kHz\n", adap->nr, + dev->dtrev, dev->rev >> 4, dev->rev & 0xf, dev->speed); + of_i2c_register_devices(adap); pm_runtime_put(dev->dev);