Skip to content

Commit b89a9e9

Browse files
andy-shevBartosz Golaszewski
authored andcommitted
gpio: aggregator: 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 include mod_devicetable.h as we struct of_device_id is defined in there. Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be> Reviewed-by: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Alexander Stein <alexander.stein@ew.tq-group.com> Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
1 parent ae128bb commit b89a9e9

1 file changed

Lines changed: 3 additions & 4 deletions

File tree

drivers/gpio/gpio-aggregator.c

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
#include <linux/ctype.h>
1313
#include <linux/idr.h>
1414
#include <linux/kernel.h>
15+
#include <linux/mod_devicetable.h>
1516
#include <linux/module.h>
1617
#include <linux/mutex.h>
1718
#include <linux/overflow.h>
@@ -500,23 +501,21 @@ static int gpio_aggregator_probe(struct platform_device *pdev)
500501
return 0;
501502
}
502503

503-
#ifdef CONFIG_OF
504504
static const struct of_device_id gpio_aggregator_dt_ids[] = {
505505
/*
506506
* Add GPIO-operated devices controlled from userspace below,
507-
* or use "driver_override" in sysfs
507+
* or use "driver_override" in sysfs.
508508
*/
509509
{}
510510
};
511511
MODULE_DEVICE_TABLE(of, gpio_aggregator_dt_ids);
512-
#endif
513512

514513
static struct platform_driver gpio_aggregator_driver = {
515514
.probe = gpio_aggregator_probe,
516515
.driver = {
517516
.name = DRV_NAME,
518517
.groups = gpio_aggregator_groups,
519-
.of_match_table = of_match_ptr(gpio_aggregator_dt_ids),
518+
.of_match_table = gpio_aggregator_dt_ids,
520519
},
521520
};
522521

0 commit comments

Comments
 (0)