i2c-algo-bit: Refactor adapter registration
authorJean Delvare <khali@linux-fr.org>
Mon, 10 Jan 2011 21:11:23 +0000 (22:11 +0100)
committerJean Delvare <khali@endymion.delvare>
Mon, 10 Jan 2011 21:11:23 +0000 (22:11 +0100)
commitf451171c5ac829e55581c81caf2cb01e1c0a5c5f
tree519af0702a8348b043a721d996933b655236712e
parent92ed1a76ca31774eb27de14b2215841367c68056
i2c-algo-bit: Refactor adapter registration

Use a function pointer to decide whether to call i2c_add_adapter or
i2c_add_numbered_adapter. This makes the code more compact than the
current strategy of having the common code in a separate function.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
drivers/i2c/algos/i2c-algo-bit.c