i2c: designware-baytrail: Only check iosf_mbi_available() for shared hosts
authorHans de Goede <hdegoede@redhat.com>
Fri, 10 Feb 2017 10:27:55 +0000 (11:27 +0100)
committerDaniel Vetter <daniel.vetter@ffwll.ch>
Thu, 2 Mar 2017 14:46:32 +0000 (15:46 +0100)
commite234ed2f06fad95680710976bcddae91d7fb7af9
tree7db967444d947274374586f86bee454f083f2ebe
parent62aee937535fcb7c5c23aafe5dfccd977bfe658e
i2c: designware-baytrail: Only check iosf_mbi_available() for shared hosts

If (!shared_host) simply return 0, this avoids delaying the probe if
iosf_mbi_available() returns false when an i2c bus is not using the
punit semaphore.

Also move the if (!iosf_mbi_available()) check to above the
dev_info, so that we do not repeat the dev_info on every probe
until iosf_mbi_available() returns true.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Acked-by: Jarkko Nikula <jarkko.nikula@linux.intel.com>
Tested-by: Takashi Iwai <tiwai@suse.de>
Acked-by: Wolfram Sang <wsa@the-dreams.de>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Link: http://patchwork.freedesktop.org/patch/msgid/20170210102802.20898-6-hdegoede@redhat.com
drivers/i2c/busses/i2c-designware-baytrail.c