]> git.karo-electronics.de Git - linux-beck.git/commit
i2c: Dynamically assign adapter id if it wasn't explictly specified
authorKarol Lewandowski <k.lewandowsk@samsung.com>
Tue, 27 Mar 2012 09:10:28 +0000 (11:10 +0200)
committerWolfram Sang <w.sang@pengutronix.de>
Sat, 12 May 2012 12:28:11 +0000 (14:28 +0200)
commit44454baa7ca7bb57c47a5564ed2528ba211fe8db
tree590ed2e391c6fdaac6b4add9c36f502371796ede
parentbc414b7b9bbccbdeac80757c03a966578d04a9a2
i2c: Dynamically assign adapter id if it wasn't explictly specified

Commit 488bf314b ("i2c: Allow i2c_add_numbered_adapter() to assign a
bus id") reworked i2c_add_numbered_adapter() to call i2c_add_adapter()
if requested bus was -1.

This allows to simplify driver's initialization procedure by using
just one function for static and dynamic adapter id registration.

This patch updates few more drivers (missed out in original patch)
to use this functionality.

Signed-off-by: Karol Lewandowski <k.lewandowsk@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Wolfram Sang <w.sang@pengutronix.de>
drivers/i2c/busses/i2c-gpio.c
drivers/i2c/busses/i2c-pca-platform.c
drivers/i2c/busses/i2c-versatile.c