diff options
author | Marek BehĂșn <kabel@kernel.org> | 2020-09-26 22:11:31 +0200 |
---|---|---|
committer | Pavel Machek <pavel@ucw.cz> | 2020-09-30 19:22:58 +0200 |
commit | 8fd8f94235c2c925d80b2316e0ab2bdd00af9bae (patch) | |
tree | 1d61fa98ee865ff985f12124a9d21f1849d0b0e6 /drivers/leds | |
parent | 940cca1ab5d6c3bc1f8db0c804cf7c5e0caf1853 (diff) |
leds: ns2: do not guard OF match pointer with of_match_ptr
Do not match OF match pointer with of_match_ptr, so that even if
CONFIG_OF is disabled, the driver can still be bound via another method.
Move definition of of_ns2_leds_match just before ns2_led_driver
definition, since it is not needed sooner.
Signed-off-by: Marek BehĂșn <kabel@kernel.org>
Tested-by: Simon Guinot <simon.guinot@sequanux.org>
Signed-off-by: Pavel Machek <pavel@ucw.cz>
Diffstat (limited to 'drivers/leds')
-rw-r--r-- | drivers/leds/leds-ns2.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/drivers/leds/leds-ns2.c b/drivers/leds/leds-ns2.c index dba6bdfa861b..1677d66d8b0e 100644 --- a/drivers/leds/leds-ns2.c +++ b/drivers/leds/leds-ns2.c @@ -235,12 +235,6 @@ static int ns2_led_register(struct device *dev, struct fwnode_handle *node, return ret; } -static const struct of_device_id of_ns2_leds_match[] = { - { .compatible = "lacie,ns2-leds", }, - {}, -}; -MODULE_DEVICE_TABLE(of, of_ns2_leds_match); - static int ns2_led_probe(struct platform_device *pdev) { struct device *dev = &pdev->dev; @@ -268,11 +262,17 @@ static int ns2_led_probe(struct platform_device *pdev) return 0; } +static const struct of_device_id of_ns2_leds_match[] = { + { .compatible = "lacie,ns2-leds", }, + {}, +}; +MODULE_DEVICE_TABLE(of, of_ns2_leds_match); + static struct platform_driver ns2_led_driver = { .probe = ns2_led_probe, .driver = { .name = "leds-ns2", - .of_match_table = of_match_ptr(of_ns2_leds_match), + .of_match_table = of_ns2_leds_match, }, }; |