i2c: designware: Fix bogus sda_hold_time due to uninitialized vars
authorJan Kiszka <jan.kiszka@siemens.com>
Mon, 22 May 2017 05:46:55 +0000 (07:46 +0200)
committerLinus Torvalds <torvalds@linux-foundation.org>
Tue, 23 May 2017 02:22:19 +0000 (19:22 -0700)
commitad258fb918dae8b1ec79a85b4c7f518e4f902869
tree8cf702adb9c4f01a89c838d781e99a87ccd3747d
parent86ca984cef98a499a7c7572376502b745a9ca369
i2c: designware: Fix bogus sda_hold_time due to uninitialized vars

We need to initializes those variables to 0 for platforms that do not
provide ACPI parameters. Otherwise, we set sda_hold_time to random
values, breaking e.g. Galileo and IOT2000 boards.

Reported-and-tested-by: Linus Torvalds <torvalds@linux-foundation.org>
Reported-by: Tobias Klausmann <tobias.johannes.klausmann@mni.thm.de>
Fixes: 9d6408433019 ("i2c: designware: don't infer timings described by ACPI from clock rate")
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Reviewed-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Acked-by: Jarkko Nikula <jarkko.nikula@linux.intel.com>
Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
drivers/i2c/busses/i2c-designware-platdrv.c