Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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 <Jonathan.Cameron@huawei.com>
Cc: Raveendra Padasalagi <raveendra.padasalagi@broadcom.com>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>

+3 -3
+1 -1
drivers/iio/adc/Kconfig
··· 340 340 341 341 config BCM_IPROC_ADC 342 342 tristate "Broadcom IPROC ADC driver" 343 - depends on ARCH_BCM_IPROC || COMPILE_TEST 343 + depends on (ARCH_BCM_IPROC && OF) || COMPILE_TEST 344 344 depends on MFD_SYSCON 345 345 default ARCH_BCM_CYGNUS 346 346 help
+2 -2
drivers/iio/adc/bcm_iproc_adc.c
··· 4 4 */ 5 5 6 6 #include <linux/module.h> 7 - #include <linux/of.h> 7 + #include <linux/mod_devicetable.h> 8 8 #include <linux/io.h> 9 9 #include <linux/clk.h> 10 10 #include <linux/mfd/syscon.h> ··· 617 617 .remove = iproc_adc_remove, 618 618 .driver = { 619 619 .name = "iproc-static-adc", 620 - .of_match_table = of_match_ptr(iproc_adc_of_match), 620 + .of_match_table = iproc_adc_of_match, 621 621 }, 622 622 }; 623 623 module_platform_driver(iproc_adc_driver);