i2c: immediately mark ourselves as registered
authorWolfram Sang <wsa@the-dreams.de>
Mon, 14 Mar 2016 09:41:52 +0000 (10:41 +0100)
committerWolfram Sang <wsa@the-dreams.de>
Mon, 14 Mar 2016 17:17:25 +0000 (18:17 +0100)
commitb980a26d02d1f54be31346666222304fcd27ea33
tree315d6c0f33ca6d0eae6f8eda2610d26cde4883e8
parent34b57f40a6a27f45dfa51b46cdbc96b7031652a7
i2c: immediately mark ourselves as registered

Mark the i2c bus as registered right after the the bus_register call,
not at the end of init. Otherwise, we can't register our own dummy
driver.

Reported-by: Thierry Reding <thierry.reding@gmail.com>
Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
Fixes: 95026658c46ea2 ("i2c: do not use internal data from driver core")
drivers/i2c/i2c-core.c