diff options
| author | Arnd Bergmann <arnd@arndb.de> | 2011-12-06 14:23:35 +0000 |
|---|---|---|
| committer | Arnd Bergmann <arnd@arndb.de> | 2011-12-06 14:23:35 +0000 |
| commit | 3642a0a2c7d2d1949988d0fd004a8039c1f3d02f (patch) | |
| tree | e687c88b1b66ad51a6a6c529f7f328f2d3b625fa /drivers/i2c/i2c-core.c | |
| parent | 58a273745fbb2fbd01d26e7a60f0acc8c1d99469 (diff) | |
| parent | b07fed455c883f07f8e847f5b0d79975b4dc8e7a (diff) | |
| download | olio-linux-3.10-3642a0a2c7d2d1949988d0fd004a8039c1f3d02f.tar.xz olio-linux-3.10-3642a0a2c7d2d1949988d0fd004a8039c1f3d02f.zip | |
Merge branch 'mxs/saif' into next/drivers
Conflicts:
drivers/net/ethernet/cadence/Kconfig
Diffstat (limited to 'drivers/i2c/i2c-core.c')
| -rw-r--r-- | drivers/i2c/i2c-core.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/i2c/i2c-core.c b/drivers/i2c/i2c-core.c index 131079a3e29..1e5606185b4 100644 --- a/drivers/i2c/i2c-core.c +++ b/drivers/i2c/i2c-core.c @@ -539,8 +539,10 @@ i2c_new_device(struct i2c_adapter *adap, struct i2c_board_info const *info) client->dev.type = &i2c_client_type; client->dev.of_node = info->of_node; + /* For 10-bit clients, add an arbitrary offset to avoid collisions */ dev_set_name(&client->dev, "%d-%04x", i2c_adapter_id(adap), - client->addr); + client->addr | ((client->flags & I2C_CLIENT_TEN) + ? 0xa000 : 0)); status = device_register(&client->dev); if (status) goto out_err; |