drm/i915: ensure i2c adapter is all set before adding it
authorJani Nikula <jani.nikula@intel.com>
Mon, 13 Aug 2012 14:33:02 +0000 (17:33 +0300)
committerDaniel Vetter <daniel.vetter@ffwll.ch>
Mon, 13 Aug 2012 17:04:24 +0000 (19:04 +0200)
commitcee25168e9c4ef7f9417632af2dc78b8521dfda7
treeb69d9a810c22c2287d39fbfdabbe927dd27add9c
parent4344b813f105a19f793f1fd93ad775b784648b95
drm/i915: ensure i2c adapter is all set before adding it

i2c_add_adapter() may do i2c transfers on the bus to detect supported
devices. Therefore the adapter needs to be all set before adding it. This
was not the case for the bit-banging fallback, resulting in an oops if the
device detection GMBUS transfers timed out. Fix the issue by calling
i2c_add_adapter() only after intel_gpio_setup().

LKML-Reference: <5021F00B.7000503@ionic.de>
Tested-by: Mihai Moldovan <ionic@ionic.de>
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
drivers/gpu/drm/i915/intel_i2c.c