Skip to content

Commit

Permalink
i2c: Fix confusing i2c-ibm_iic message
Browse files Browse the repository at this point in the history
The i2c-ibm_iic driver printed messages in an odd order that seemed
to list devices before the driver was probed.

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

This changes the order to print the i2c driver message before scanning
for devices so that the logs show the driver, then the devices. 

Signed-off-by: Sean MacLennan <smaclennan@pikatech.com>
Acked-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Josh Boyer <jwboyer@linux.vnet.ibm.com>
  • Loading branch information
Sean MacLennan authored and Josh Boyer committed Jun 4, 2009
1 parent 27db1fe commit 9d2c0f6
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions drivers/i2c/busses/i2c-ibm_iic.c
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit 9d2c0f6

Please sign in to comment.