iio: health/afe440x: Remove of_match_ptr and ifdefs
authorAndrew F. Davis <afd@ti.com>
Sun, 1 May 2016 20:36:52 +0000 (15:36 -0500)
committerJonathan Cameron <jic23@kernel.org>
Wed, 4 May 2016 09:59:04 +0000 (10:59 +0100)
The drivers DT tables are not built-in when OF is not enabled, this does
not save us enough to justify ugly ifdefs. Clean this up.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
drivers/iio/health/afe4403.c
drivers/iio/health/afe4404.c

index 2094113326658b622e6850f81ad48fe1c995ed6c..e3700cfec23d5df1e11c40f275b320ca520c5144 100644 (file)
@@ -498,13 +498,11 @@ static const struct regmap_config afe4403_regmap_config = {
        .volatile_table = &afe4403_volatile_table,
 };
 
-#ifdef CONFIG_OF
 static const struct of_device_id afe4403_of_match[] = {
        { .compatible = "ti,afe4403", },
        { /* sentinel */ }
 };
 MODULE_DEVICE_TABLE(of, afe4403_of_match);
-#endif
 
 static int __maybe_unused afe4403_suspend(struct device *dev)
 {
@@ -694,7 +692,7 @@ MODULE_DEVICE_TABLE(spi, afe4403_ids);
 static struct spi_driver afe4403_spi_driver = {
        .driver = {
                .name = AFE4403_DRIVER_NAME,
-               .of_match_table = of_match_ptr(afe4403_of_match),
+               .of_match_table = afe4403_of_match,
                .pm = &afe4403_pm_ops,
        },
        .probe = afe4403_probe,
index 7127d038b5122854da49bd50021f9611f44987f0..783b9b437716abed60bbe22d4033b85c2003f0ca 100644 (file)
@@ -469,13 +469,11 @@ static const struct regmap_config afe4404_regmap_config = {
        .volatile_table = &afe4404_volatile_table,
 };
 
-#ifdef CONFIG_OF
 static const struct of_device_id afe4404_of_match[] = {
        { .compatible = "ti,afe4404", },
        { /* sentinel */ }
 };
 MODULE_DEVICE_TABLE(of, afe4404_of_match);
-#endif
 
 static int __maybe_unused afe4404_suspend(struct device *dev)
 {
@@ -665,7 +663,7 @@ MODULE_DEVICE_TABLE(i2c, afe4404_ids);
 static struct i2c_driver afe4404_i2c_driver = {
        .driver = {
                .name = AFE4404_DRIVER_NAME,
-               .of_match_table = of_match_ptr(afe4404_of_match),
+               .of_match_table = afe4404_of_match,
                .pm = &afe4404_pm_ops,
        },
        .probe = afe4404_probe,