i2c: Allow i2c_add_numbered_adapter() to assign a bus id
authorGrant Likely <grant.likely@secretlab.ca>
Mon, 25 Jul 2011 15:49:43 +0000 (17:49 +0200)
committerJean Delvare <khali@endymion.delvare>
Mon, 25 Jul 2011 15:49:43 +0000 (17:49 +0200)
commit488bf314bf219c66922305a1a320950efa86662f
tree84337cff8d57af18311129495f7cac4979845c55
parent3fea5df41df685de53aa985678ad7a9b2d6b3bb5
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