]> git.baikalelectronics.ru Git - kernel.git/commit
ARM: OMAP: I2C: Fix omap_register_i2c_bus() return value on success
authorLaurent Pinchart <laurent.pinchart@ideasonboard.com>
Wed, 2 Nov 2011 11:54:03 +0000 (12:54 +0100)
committerTony Lindgren <tony@atomide.com>
Sat, 5 Nov 2011 00:41:07 +0000 (17:41 -0700)
commit58dc5d7aeeab3dae27580773e61fa3a60b8827e8
treee3767d2a524e17980fe0b00d449b809b76467340
parentfdde3d78ea66d64c98de4986f7ce39d65d146dde
ARM: OMAP: I2C: Fix omap_register_i2c_bus() return value on success

Commit 0e2704ff83e8485945aaf069a4b3fdd78348be28 ("OMAP: I2C: split
device registration and convert OMAP2+ to omap_device") makes
omap2_i2c_add_bus() return a pointer to an omap_device instead on
success instead of 0.

This breaks the omap_register_i2c_bus() ABI and results in the igep0020
board code detecting an I2C bus registration error when there is none.

Fix the problem by using PTR_RET() instead of PTR_ERR() in
omap2_i2c_add_bus().

Reported-by: Alexander Kinzer <a.kinzer@plusoptix.de>
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
[tony@atomide.com: updated to return pdev instead of od]
Signed-off-by: Tony Lindgren <tony@atomide.com>
arch/arm/plat-omap/i2c.c