]> git.baikalelectronics.ru Git - kernel.git/commit
i2c: Refactor for_each callbacks
authorJean Delvare <khali@linux-fr.org>
Sun, 6 Dec 2009 16:06:27 +0000 (17:06 +0100)
committerJean Delvare <khali@linux-fr.org>
Sun, 6 Dec 2009 16:06:27 +0000 (17:06 +0100)
commit2a01e6614746ba17815625d685f2d919c033c059
tree6d8826c7fec2ff30eb294dd04a1677079158afab
parent6ee063815858e2ea95b1dc75f252af5729ac48c3
i2c: Refactor for_each callbacks

Functions i2c_do_add_adapter() and __attach_adapter() do essentially
the same thing, differing only in how the parameters are passed. Same
for i2c_do_add_adapter() and __detach_adapter(). Introduce wrappers to
normalize the parameters, so that we do not have to duplicate the
code.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Cc: David Brownell <dbrownell@users.sourceforge.net>
drivers/i2c/i2c-core.c