提交 e89b6747 编写于 作者: S Sachin Kamat 提交者: Jonathan Cameron

staging: iio: spear_adc: Add missing CONFIG_OF macro

The data structure is required only when DT is enabled.
Hence compile it conditionally.
Signed-off-by: NSachin Kamat <sachin.kamat@linaro.org>
Acked-by: NStefan Roese <sr@denx.de>
Signed-off-by: NJonathan Cameron <jic23@kernel.org>
上级 065792ad
...@@ -415,11 +415,13 @@ static int spear_adc_remove(struct platform_device *pdev) ...@@ -415,11 +415,13 @@ static int spear_adc_remove(struct platform_device *pdev)
return 0; return 0;
} }
#ifdef CONFIG_OF
static const struct of_device_id spear_adc_dt_ids[] = { static const struct of_device_id spear_adc_dt_ids[] = {
{ .compatible = "st,spear600-adc", }, { .compatible = "st,spear600-adc", },
{ /* sentinel */ } { /* sentinel */ }
}; };
MODULE_DEVICE_TABLE(of, spear_adc_dt_ids); MODULE_DEVICE_TABLE(of, spear_adc_dt_ids);
#endif
static struct platform_driver spear_adc_driver = { static struct platform_driver spear_adc_driver = {
.probe = spear_adc_probe, .probe = spear_adc_probe,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册