From: Jonathan Cameron Date: Tue, 21 Jul 2020 17:14:44 +0000 (+0100) Subject: iio:adc:bcm_iproc: Drop of_match_ptr protection and switch to mod_devicetable.h X-Git-Tag: v5.10.7~1420^2~141^2~59 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=245d56d75ea6860c583fbd54382ad82bbd405910;p=platform%2Fkernel%2Flinux-rpi.git iio:adc:bcm_iproc: Drop of_match_ptr protection and switch to mod_devicetable.h This driver cannot be instantiated from ACPI due to it's use of syscon_regmap_lookup_by_phandle() but in the interests of clearing this anti pattern out of IIO, let us switch to an explicit check in Kconfig and remove the protections on the of_match_table The switch of header is because we only use of_device_id in here and that is defined in mod_devicetable.h not of.h. Signed-off-by: Jonathan Cameron Cc: Raveendra Padasalagi Reviewed-by: Andy Shevchenko --- diff --git a/drivers/iio/adc/Kconfig b/drivers/iio/adc/Kconfig index 66d9cc0..f495d01 100644 --- a/drivers/iio/adc/Kconfig +++ b/drivers/iio/adc/Kconfig @@ -340,7 +340,7 @@ config AXP288_ADC config BCM_IPROC_ADC tristate "Broadcom IPROC ADC driver" - depends on ARCH_BCM_IPROC || COMPILE_TEST + depends on (ARCH_BCM_IPROC && OF) || COMPILE_TEST depends on MFD_SYSCON default ARCH_BCM_CYGNUS help diff --git a/drivers/iio/adc/bcm_iproc_adc.c b/drivers/iio/adc/bcm_iproc_adc.c index 936da32..44e1e53 100644 --- a/drivers/iio/adc/bcm_iproc_adc.c +++ b/drivers/iio/adc/bcm_iproc_adc.c @@ -4,7 +4,7 @@ */ #include -#include +#include #include #include #include @@ -617,7 +617,7 @@ static struct platform_driver iproc_adc_driver = { .remove = iproc_adc_remove, .driver = { .name = "iproc-static-adc", - .of_match_table = of_match_ptr(iproc_adc_of_match), + .of_match_table = iproc_adc_of_match, }, }; module_platform_driver(iproc_adc_driver);