From: Lee Jones Date: Tue, 12 Jun 2012 07:21:47 +0000 (-0700) Subject: Input: ab8500-ponkey - add device tree support X-Git-Tag: firefly_0821_release~176^2~541^2~331^2~32 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=03ecd229a5d05a5c62e7262d66ec6cd57d5eca6c;p=firefly-linux-kernel-4.4.55.git Input: ab8500-ponkey - add device tree support Allow the ab8500-ponkey driver to be probed during boot when Device Tree is enabled. Signed-off-by: Lee Jones Acked-by: Linus Walleij Signed-off-by: Dmitry Torokhov --- diff --git a/drivers/input/misc/ab8500-ponkey.c b/drivers/input/misc/ab8500-ponkey.c index 350fd0c385d2..84ec691c05aa 100644 --- a/drivers/input/misc/ab8500-ponkey.c +++ b/drivers/input/misc/ab8500-ponkey.c @@ -13,6 +13,7 @@ #include #include #include +#include #include /** @@ -131,10 +132,18 @@ static int __devexit ab8500_ponkey_remove(struct platform_device *pdev) return 0; } +#ifdef CONFIG_OF +static const struct of_device_id ab8500_ponkey_match[] = { + { .compatible = "stericsson,ab8500-ponkey", }, + {} +}; +#endif + static struct platform_driver ab8500_ponkey_driver = { .driver = { .name = "ab8500-poweron-key", .owner = THIS_MODULE, + .of_match_table = of_match_ptr(ab8500_ponkey_match), }, .probe = ab8500_ponkey_probe, .remove = __devexit_p(ab8500_ponkey_remove),