]> git.karo-electronics.de Git - karo-tx-linux.git/commit
i2c: nomadik: allocate adapter number dynamically
authorLinus Walleij <linus.walleij@linaro.org>
Sat, 15 Jun 2013 20:38:14 +0000 (22:38 +0200)
committerWolfram Sang <wsa@the-dreams.de>
Sat, 15 Jun 2013 21:16:37 +0000 (23:16 +0200)
commitd15b85755b25e1b0201e24bc0c29f31eb4e856c4
tree84b7cc6d18a83d316df08e9599296d6585c6c5a9
parent3a205be5e8746aac70d4f5083cef4b3becfbab91
i2c: nomadik: allocate adapter number dynamically

The Nomadik I2C was using a local atomic counter to number
the I2C adapters. This does not work on configurations where
you also add, say a GPIO bit-banged adapter to the system.
They will start to conflict about being adapter 0.

There is no reason to use the numbered adapter function, and
the semantic effect on systems with only Nomadik I2C blocks
will be none - instead of increasing the number atomically
in the driver itself, it is done in the I2C core.

Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
drivers/i2c/busses/i2c-nomadik.c