Skip to content

Commit

Permalink
i2c-eg20t: use i2c_add_numbered_adapter to get a fixed bus number
Browse files Browse the repository at this point in the history
For EG20T and ML7213 IOH, the i2c controller numbers are fixed, using
fixed bus number will make it much easier for platform code to use
i2c_register_board_info() to register i2c devices.

Signed-off-by: Feng Tang <feng.tang@intel.com>
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
  • Loading branch information
ftang1 authored and Ben Dooks committed Jan 17, 2012
1 parent c2bc3a3 commit 07e8a51
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion drivers/i2c/busses/i2c-eg20t.c
Original file line number Diff line number Diff line change
Expand Up @@ -918,7 +918,9 @@ static int __devinit pch_i2c_probe(struct pci_dev *pdev,
pch_adap->dev.parent = &pdev->dev;

pch_i2c_init(&adap_info->pch_data[i]);
ret = i2c_add_adapter(pch_adap);

pch_adap->nr = i;
ret = i2c_add_numbered_adapter(pch_adap);
if (ret) {
pch_pci_err(pdev, "i2c_add_adapter[ch:%d] FAILED\n", i);
goto err_add_adapter;
Expand Down

0 comments on commit 07e8a51

Please sign in to comment.