提交 96742775 编写于 作者: A Alexandre Belloni 提交者: Wolfram Sang

i2c: designware: move #ifdef CONFIG_OF to the top

Move the #ifdef CONFIG_OF section to the top of the file, after the ACPI
section so functions defined there can be used in dw_i2c_plat_probe.
Tested-by: NJarkko Nikula <jarkko.nikula@linux.intel.com>
Acked-by: NJarkko Nikula <jarkko.nikula@linux.intel.com>
Signed-off-by: NAlexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
上级 1732c22a
...@@ -156,6 +156,14 @@ static inline int dw_i2c_acpi_configure(struct platform_device *pdev) ...@@ -156,6 +156,14 @@ static inline int dw_i2c_acpi_configure(struct platform_device *pdev)
} }
#endif #endif
#ifdef CONFIG_OF
static const struct of_device_id dw_i2c_of_match[] = {
{ .compatible = "snps,designware-i2c", },
{},
};
MODULE_DEVICE_TABLE(of, dw_i2c_of_match);
#endif
static void i2c_dw_configure_master(struct dw_i2c_dev *dev) static void i2c_dw_configure_master(struct dw_i2c_dev *dev)
{ {
struct i2c_timings *t = &dev->timings; struct i2c_timings *t = &dev->timings;
...@@ -390,14 +398,6 @@ static int dw_i2c_plat_remove(struct platform_device *pdev) ...@@ -390,14 +398,6 @@ static int dw_i2c_plat_remove(struct platform_device *pdev)
return 0; return 0;
} }
#ifdef CONFIG_OF
static const struct of_device_id dw_i2c_of_match[] = {
{ .compatible = "snps,designware-i2c", },
{},
};
MODULE_DEVICE_TABLE(of, dw_i2c_of_match);
#endif
#ifdef CONFIG_PM_SLEEP #ifdef CONFIG_PM_SLEEP
static int dw_i2c_plat_prepare(struct device *dev) static int dw_i2c_plat_prepare(struct device *dev)
{ {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册