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

Configure Feed

Select the types of activity you want to include in your feed.

Input: gpio_decoder - make use of device properties

Convert the module to be property provider agnostic and allow
it to be used on non-OF platforms.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Link: https://patch.msgid.link/20251113154616.3107676-2-andriy.shevchenko@linux.intel.com
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>

authored by

Andy Shevchenko and committed by
Dmitry Torokhov
c83504aa 6cebd8e1

+4 -5
+4 -5
drivers/input/misc/gpio_decoder.c
··· 10 10 #include <linux/gpio/consumer.h> 11 11 #include <linux/input.h> 12 12 #include <linux/kernel.h> 13 + #include <linux/mod_devicetable.h> 13 14 #include <linux/module.h> 14 - #include <linux/of.h> 15 15 #include <linux/platform_device.h> 16 + #include <linux/property.h> 16 17 17 18 struct gpio_decoder { 18 19 struct gpio_descs *input_gpios; ··· 111 110 return 0; 112 111 } 113 112 114 - #ifdef CONFIG_OF 115 113 static const struct of_device_id gpio_decoder_of_match[] = { 116 114 { .compatible = "gpio-decoder", }, 117 - { }, 115 + { } 118 116 }; 119 117 MODULE_DEVICE_TABLE(of, gpio_decoder_of_match); 120 - #endif 121 118 122 119 static struct platform_driver gpio_decoder_driver = { 123 120 .probe = gpio_decoder_probe, 124 121 .driver = { 125 122 .name = "gpio-decoder", 126 - .of_match_table = of_match_ptr(gpio_decoder_of_match), 123 + .of_match_table = gpio_decoder_of_match, 127 124 } 128 125 }; 129 126 module_platform_driver(gpio_decoder_driver);