Skip to content

Commit

Permalink
[ARM] mmp: update twsi index
Browse files Browse the repository at this point in the history
Sync twsi index to register index. It's used to avoid typo error.

Signed-off-by: Haojian Zhuang <haojian.zhuang@marvell.com>
Signed-off-by: Eric Miao <eric.y.miao@gmail.com>
  • Loading branch information
Haojian Zhuang authored and Eric Miao committed May 11, 2010
1 parent d49ea9e commit fed2405
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions arch/arm/mach-mmp/include/mach/mmp2.h
Original file line number Diff line number Diff line change
Expand Up @@ -39,17 +39,17 @@ static inline int mmp2_add_twsi(int id, struct i2c_pxa_platform_data *data,
int ret;

switch (id) {
case 0: d = &mmp2_device_twsi1; break;
case 1: d = &mmp2_device_twsi2; break;
case 2: d = &mmp2_device_twsi3; break;
case 3: d = &mmp2_device_twsi4; break;
case 4: d = &mmp2_device_twsi5; break;
case 5: d = &mmp2_device_twsi6; break;
case 1: d = &mmp2_device_twsi1; break;
case 2: d = &mmp2_device_twsi2; break;
case 3: d = &mmp2_device_twsi3; break;
case 4: d = &mmp2_device_twsi4; break;
case 5: d = &mmp2_device_twsi5; break;
case 6: d = &mmp2_device_twsi6; break;
default:
return -EINVAL;
}

ret = i2c_register_board_info(id, info, size);
ret = i2c_register_board_info(id - 1, info, size);
if (ret)
return ret;

Expand Down

0 comments on commit fed2405

Please sign in to comment.