]> git.karo-electronics.de Git - karo-tx-linux.git/commit
i2c: Allow i2c_add_numbered_adapter() to assign a bus id
authorGrant Likely <grant.likely@secretlab.ca>
Tue, 26 Jul 2011 00:37:09 +0000 (10:37 +1000)
committerStephen Rothwell <sfr@canb.auug.org.au>
Tue, 26 Jul 2011 00:37:09 +0000 (10:37 +1000)
commit7566200a249968ee1bbc7bfa1cb044e1d571b6ce
tree84337cff8d57af18311129495f7cac4979845c55
parent43a7aba89ee4f2222a3b2c3117eca684a00b3684
i2c: Allow i2c_add_numbered_adapter() to assign a bus id

Currently, if an i2c bus driver supports both static and dynamic bus
ids, it needs to choose between calling i2c_add_numbered_adapter() and
i2c_add_adapter().  This patch makes i2c_add_numbered_adapter()
redirect to i2c_add_adapter() if the requested bus id is -1.

Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
drivers/i2c/busses/i2c-cpm.c
drivers/i2c/busses/i2c-pxa.c
drivers/i2c/busses/i2c-s6000.c
drivers/i2c/i2c-core.c