diff options
author | Grant Likely <grant.likely@secretlab.ca> | 2011-07-25 17:49:43 +0200 |
---|---|---|
committer | Jean Delvare <khali@endymion.delvare> | 2011-07-25 17:49:43 +0200 |
commit | 488bf314bf219c66922305a1a320950efa86662f (patch) | |
tree | 84337cff8d57af18311129495f7cac4979845c55 /drivers/i2c/busses/i2c-s6000.c | |
parent | 3fea5df41df685de53aa985678ad7a9b2d6b3bb5 (diff) |
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>
Diffstat (limited to 'drivers/i2c/busses/i2c-s6000.c')
-rw-r--r-- | drivers/i2c/busses/i2c-s6000.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/drivers/i2c/busses/i2c-s6000.c b/drivers/i2c/busses/i2c-s6000.c index cb5d01e279c..c64ba736f48 100644 --- a/drivers/i2c/busses/i2c-s6000.c +++ b/drivers/i2c/busses/i2c-s6000.c @@ -341,10 +341,7 @@ static int __devinit s6i2c_probe(struct platform_device *dev) i2c_wr16(iface, S6_I2C_TXTL, 0); platform_set_drvdata(dev, iface); - if (bus_num < 0) - rc = i2c_add_adapter(p_adap); - else - rc = i2c_add_numbered_adapter(p_adap); + rc = i2c_add_numbered_adapter(p_adap); if (rc) goto err_irq_free; return 0; |