From: Jonathan Cameron Date: Sun, 28 Jun 2020 12:36:44 +0000 (+0100) Subject: iio:adc:mcp3422: remove CONFIG_OF and of_match_ptr protections X-Git-Tag: v5.9-rc1~119^2~85^2~16 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=bf12d3fd11b3153f7e09971f533d0c71fd4802b2;p=thirdparty%2Fkernel%2Fstable.git iio:adc:mcp3422: remove CONFIG_OF and of_match_ptr protections They stop the driver being used with ACPI PRP0001 and are something I want to avoid being cut and paste into new drivers. Also switch the include from of.h to mod_devicetable.h as we struct of_device_id is defined in there and we don't use anything actually in of.h. Signed-off-by: Jonathan Cameron Cc: Angelo Compagnucci Reviewed-by: Andy Shevchenko --- diff --git a/drivers/iio/adc/mcp3422.c b/drivers/iio/adc/mcp3422.c index 40e0d3ed05a52..ec9c79199ffbe 100644 --- a/drivers/iio/adc/mcp3422.c +++ b/drivers/iio/adc/mcp3422.c @@ -16,9 +16,9 @@ #include #include #include +#include #include #include -#include #include #include @@ -402,18 +402,16 @@ static const struct i2c_device_id mcp3422_id[] = { }; MODULE_DEVICE_TABLE(i2c, mcp3422_id); -#ifdef CONFIG_OF static const struct of_device_id mcp3422_of_match[] = { { .compatible = "mcp3422" }, { } }; MODULE_DEVICE_TABLE(of, mcp3422_of_match); -#endif static struct i2c_driver mcp3422_driver = { .driver = { .name = "mcp3422", - .of_match_table = of_match_ptr(mcp3422_of_match), + .of_match_table = mcp3422_of_match, }, .probe = mcp3422_probe, .id_table = mcp3422_id,