aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/i2c/busses/i2c-bfin-twi.c
diff options
context:
space:
mode:
authorKalle Pokki <kalle.pokki@eke.fi>2008-01-27 12:14:52 -0500
committerJean Delvare <khali@hyperion.delvare>2008-01-27 12:14:52 -0500
commit991dee591a99d035796a8c194eb1796cc020e142 (patch)
tree3c05c4cdca2889168dadf4974b9e7d8adec5cc2f /drivers/i2c/busses/i2c-bfin-twi.c
parent8b798c4d16b762d15f4055597ff8d87f73b35552 (diff)
i2c-bfin-twi: Register adapter with a specific bus number
All the users of this driver explicitly specify the I2C bus numbers to be used in their platform data. Make the driver respect that. Signed-off-by: Kalle Pokki <kalle.pokki@eke.fi> Cc: Bryan Wu <bryan.wu@analog.com> Signed-off-by: Jean Delvare <khali@linux-fr.org>
Diffstat (limited to 'drivers/i2c/busses/i2c-bfin-twi.c')
-rw-r--r--drivers/i2c/busses/i2c-bfin-twi.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/i2c/busses/i2c-bfin-twi.c b/drivers/i2c/busses/i2c-bfin-twi.c
index 67224a424aba..7dbdaeb707a9 100644
--- a/drivers/i2c/busses/i2c-bfin-twi.c
+++ b/drivers/i2c/busses/i2c-bfin-twi.c
@@ -550,6 +550,7 @@ static int i2c_bfin_twi_probe(struct platform_device *dev)
550 550
551 p_adap = &iface->adap; 551 p_adap = &iface->adap;
552 p_adap->id = I2C_HW_BLACKFIN; 552 p_adap->id = I2C_HW_BLACKFIN;
553 p_adap->nr = dev->id;
553 strlcpy(p_adap->name, dev->name, sizeof(p_adap->name)); 554 strlcpy(p_adap->name, dev->name, sizeof(p_adap->name));
554 p_adap->algo = &bfin_twi_algorithm; 555 p_adap->algo = &bfin_twi_algorithm;
555 p_adap->algo_data = iface; 556 p_adap->algo_data = iface;
@@ -576,7 +577,7 @@ static int i2c_bfin_twi_probe(struct platform_device *dev)
576 bfin_write_TWI_CONTROL(bfin_read_TWI_CONTROL() | TWI_ENA); 577 bfin_write_TWI_CONTROL(bfin_read_TWI_CONTROL() | TWI_ENA);
577 SSYNC(); 578 SSYNC();
578 579
579 rc = i2c_add_adapter(p_adap); 580 rc = i2c_add_numbered_adapter(p_adap);
580 if (rc < 0) 581 if (rc < 0)
581 free_irq(iface->irq, iface); 582 free_irq(iface->irq, iface);
582 else 583 else