From patchwork Mon Feb 2 17:01:59 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sean MacLennan X-Patchwork-Id: 21576 X-Patchwork-Delegate: jwboyer@gmail.com Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from ozlabs.org (localhost [127.0.0.1]) by ozlabs.org (Postfix) with ESMTP id 6EC25DDF7F for ; Tue, 3 Feb 2009 04:03:00 +1100 (EST) X-Original-To: linuxppc-dev@ozlabs.org Delivered-To: linuxppc-dev@ozlabs.org Received: from yow.seanm.ca (toronto-hs-216-138-233-67.s-ip.magma.ca [216.138.233.67]) by ozlabs.org (Postfix) with SMTP id B2AB6DDF01 for ; Tue, 3 Feb 2009 04:02:03 +1100 (EST) Received: (qmail 24460 invoked from network); 2 Feb 2009 17:02:01 -0000 Received: from unknown (HELO lappy.seanm.ca) (192.168.0.164) by 0 with SMTP; 2 Feb 2009 17:02:01 -0000 Date: Mon, 2 Feb 2009 12:01:59 -0500 From: Sean MacLennan To: linuxppc-dev , Jean Delvare , ben-linux@fluff.org Subject: [PATCH] i2c: i2c-ibm_iic message can be confusing Message-ID: <20090202120159.2478d7af@lappy.seanm.ca> Organization: PIKA X-Mailer: Claws Mail 3.6.1 (GTK+ 2.12.12; i686-pc-linux-gnu) X-Message-Flag: Warning: This message may contain actual content. Mime-Version: 1.0 X-BeenThere: linuxppc-dev@ozlabs.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: linuxppc-dev-bounces+patchwork-incoming=ozlabs.org@ozlabs.org Errors-To: linuxppc-dev-bounces+patchwork-incoming=ozlabs.org@ozlabs.org This is a trivial patch that does not need to be in 2.6.29. While tracking down an EEPROM problem, I found the messages confusing... it looked like the EEPROM was being started before the I2C driver! Here is an example: at24 0-0052: 512 byte 24c04 EEPROM (writable) ibm-iic ef600700.i2c: using standard (100 kHz) mode ad7414 0-004a: chip found It looks like the at24 starts first, then the i2c driver, then the ad7414. By moving the message to after the of scan, we always get the driver, then the devices. Cheers, Sean Print the i2c driver message before scanning for devices so that the logs show the driver, then the devices. Currently you can get device(s), driver, device(s). Signed-off-by: Sean MacLennan Acked-by: Jean Delvare diff --git a/drivers/i2c/busses/i2c-ibm_iic.c b/drivers/i2c/busses/i2c-ibm_iic.c index 88f0db7..7fc0729 100644 --- a/drivers/i2c/busses/i2c-ibm_iic.c +++ b/drivers/i2c/busses/i2c-ibm_iic.c @@ -756,12 +756,12 @@ static int __devinit iic_probe(struct of_device *ofdev, goto error_cleanup; } - /* Now register all the child nodes */ - of_register_i2c_devices(adap, np); - dev_info(&ofdev->dev, "using %s mode\n", dev->fast_mode ? "fast (400 kHz)" : "standard (100 kHz)"); + /* Now register all the child nodes */ + of_register_i2c_devices(adap, np); + return 0; error_cleanup: