diff options
author | Ahmad Fatoum <a.fatoum@pengutronix.de> | 2023-06-12 14:59:08 +0200 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2023-06-13 09:13:04 +0200 |
commit | 2baa16f2740b4546b1ec16390ec118ecba6be09d (patch) | |
tree | 78ff5703fb6d24aa08d6a5d898ed11ebf85d4396 /drivers/led | |
parent | cfcd097c843194a6b88b03948afca3c4c547eca6 (diff) | |
download | barebox-2baa16f2740b4546b1ec16390ec118ecba6be09d.tar.gz barebox-2baa16f2740b4546b1ec16390ec118ecba6be09d.tar.xz |
treewide: add MODULE_DEVICE_TABLE markers
Syncing device trees with Linux upstream can lead to breakage, when
the device trees are switched to newer bindings, which are not yet
supported in barebox. To make it easier to spot such issues, we want to
start applying some heuristics to flag possibly problematic DT changes.
One step towards being able to do that is to know what nodes barebox
actually consumes. Most of the nodes have a compatible entry, which is
matched by an array of of_device_id, so let's have MODULE_DEVICE_TABLE
point at it for future extraction.
Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
Link: https://lore.barebox.org/20230612125908.1087340-1-a.fatoum@pengutronix.de
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'drivers/led')
-rw-r--r-- | drivers/led/led-gpio.c | 1 | ||||
-rw-r--r-- | drivers/led/led-pca955x.c | 1 | ||||
-rw-r--r-- | drivers/led/led-pwm.c | 1 |
3 files changed, 3 insertions, 0 deletions
diff --git a/drivers/led/led-gpio.c b/drivers/led/led-gpio.c index 670618defb..0d405268af 100644 --- a/drivers/led/led-gpio.c +++ b/drivers/led/led-gpio.c @@ -257,6 +257,7 @@ static struct of_device_id led_gpio_of_ids[] = { { .compatible = "gpio-leds", }, { } }; +MODULE_DEVICE_TABLE(of, led_gpio_of_ids); static struct driver led_gpio_of_driver = { .name = "gpio-leds", diff --git a/drivers/led/led-pca955x.c b/drivers/led/led-pca955x.c index 615437da18..cad4db3799 100644 --- a/drivers/led/led-pca955x.c +++ b/drivers/led/led-pca955x.c @@ -325,6 +325,7 @@ static const struct of_device_id of_pca955x_match[] = { { .compatible = "nxp,pca9553", .data = &pca9553_chipdef }, {}, }; +MODULE_DEVICE_TABLE(of, of_pca955x_match); static int led_pca955x_probe(struct device *dev) { diff --git a/drivers/led/led-pwm.c b/drivers/led/led-pwm.c index 59cae438ca..2ffb72e692 100644 --- a/drivers/led/led-pwm.c +++ b/drivers/led/led-pwm.c @@ -80,6 +80,7 @@ static struct of_device_id led_pwm_of_ids[] = { { .compatible = "pwm-leds", }, { } }; +MODULE_DEVICE_TABLE(of, led_pwm_of_ids); static struct driver led_pwm_of_driver = { .name = "pwm-leds", |