Commit 1732c22a authored by Alexandre Belloni's avatar Alexandre Belloni Committed by Wolfram Sang
Browse files

i2c: designware: use generic table matching



Switch to device_get_match_data in probe to match the device specific data
instead of using the acpi specific function.

Suggested-by: default avatarAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Acked-by: default avatarAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Tested-by: default avatarJarkko Nikula <jarkko.nikula@linux.intel.com>
Acked-by: default avatarJarkko Nikula <jarkko.nikula@linux.intel.com>
Signed-off-by: default avatarAlexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: default avatarWolfram Sang <wsa@the-dreams.de>
parent 57361846
Loading
Loading
Loading
Loading
+2 −5
Original line number Diff line number Diff line
@@ -86,7 +86,6 @@ static int dw_i2c_acpi_configure(struct platform_device *pdev)
	struct i2c_timings *t = &dev->timings;
	u32 ss_ht = 0, fp_ht = 0, hs_ht = 0, fs_ht = 0;
	acpi_handle handle = ACPI_HANDLE(&pdev->dev);
	const struct acpi_device_id *id;
	struct acpi_device *adev;
	const char *uid;

@@ -119,10 +118,6 @@ static int dw_i2c_acpi_configure(struct platform_device *pdev)
		break;
	}

	id = acpi_match_device(pdev->dev.driver->acpi_match_table, &pdev->dev);
	if (id && id->driver_data)
		dev->flags |= (u32)id->driver_data;

	if (acpi_bus_get_device(handle, &adev))
		return -ENODEV;

@@ -291,6 +286,8 @@ static int dw_i2c_plat_probe(struct platform_device *pdev)
	else
		t->bus_freq_hz = 400000;

	dev->flags |= (uintptr_t)device_get_match_data(&pdev->dev);

	if (has_acpi_companion(&pdev->dev))
		dw_i2c_acpi_configure(pdev);