Skip to content

Commit e2c8249

Browse files
jan-kiszkaWolfram Sang
authored andcommitted
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. Fixes: 9d64084 ("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>
1 parent 5165da5 commit e2c8249

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/i2c/busses/i2c-designware-platdrv.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,9 +94,9 @@ static void dw_i2c_acpi_params(struct platform_device *pdev, char method[],
9494
static int dw_i2c_acpi_configure(struct platform_device *pdev)
9595
{
9696
struct dw_i2c_dev *dev = platform_get_drvdata(pdev);
97+
u32 ss_ht = 0, fp_ht = 0, hs_ht = 0, fs_ht = 0;
9798
acpi_handle handle = ACPI_HANDLE(&pdev->dev);
9899
const struct acpi_device_id *id;
99-
u32 ss_ht, fp_ht, hs_ht, fs_ht;
100100
struct acpi_device *adev;
101101
const char *uid;
102102

0 commit comments

Comments
 (0)