Skip to content

Commit

Permalink
i2c-bfin-twi: Register adapter with a specific bus number
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Kalle Pokki authored and Jean Delvare committed Jan 27, 2008
1 parent 8b798c4 commit 991dee5
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion drivers/i2c/busses/i2c-bfin-twi.c
Original file line number Diff line number Diff line change
Expand Up @@ -550,6 +550,7 @@ static int i2c_bfin_twi_probe(struct platform_device *dev)

p_adap = &iface->adap;
p_adap->id = I2C_HW_BLACKFIN;
p_adap->nr = dev->id;
strlcpy(p_adap->name, dev->name, sizeof(p_adap->name));
p_adap->algo = &bfin_twi_algorithm;
p_adap->algo_data = iface;
Expand All @@ -576,7 +577,7 @@ static int i2c_bfin_twi_probe(struct platform_device *dev)
bfin_write_TWI_CONTROL(bfin_read_TWI_CONTROL() | TWI_ENA);
SSYNC();

rc = i2c_add_adapter(p_adap);
rc = i2c_add_numbered_adapter(p_adap);
if (rc < 0)
free_irq(iface->irq, iface);
else
Expand Down

0 comments on commit 991dee5

Please sign in to comment.