summaryrefslogtreecommitdiff
path: root/drivers/leds
diff options
context:
space:
mode:
authorAndy Shevchenko <andriy.shevchenko@linux.intel.com>2024-06-06 20:29:23 +0300
committerLee Jones <lee@kernel.org>2024-06-26 16:56:07 +0100
commit25458b2a4070c339d11af78dbecff3e845e6ad04 (patch)
tree244f5aa1b1c5887036fedbdd35559841fc7adbfa /drivers/leds
parent133f941f2239cbf8bd4b8a9c112e4811215149bf (diff)
downloadlwn-25458b2a4070c339d11af78dbecff3e845e6ad04.tar.gz
lwn-25458b2a4070c339d11af78dbecff3e845e6ad04.zip
leds: spi-byte: Move OF ID table closer to their user
There is no code that uses ID table directly, except the struct device_driver at the end of the file. Hence, move table closer to its user. It's always possible to access them via a pointer. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Link: https://lore.kernel.org/r/20240606173037.3091598-7-andriy.shevchenko@linux.intel.com Signed-off-by: Lee Jones <lee@kernel.org>
Diffstat (limited to 'drivers/leds')
-rw-r--r--drivers/leds/leds-spi-byte.c13
1 files changed, 6 insertions, 7 deletions
diff --git a/drivers/leds/leds-spi-byte.c b/drivers/leds/leds-spi-byte.c
index 985bbbed251b..d24d0ddf347c 100644
--- a/drivers/leds/leds-spi-byte.c
+++ b/drivers/leds/leds-spi-byte.c
@@ -56,13 +56,6 @@ static const struct spi_byte_chipdef ubnt_acb_spi_led_cdef = {
.max_value = 0x3F,
};
-static const struct of_device_id spi_byte_dt_ids[] = {
- { .compatible = "ubnt,acb-spi-led", .data = &ubnt_acb_spi_led_cdef },
- {},
-};
-
-MODULE_DEVICE_TABLE(of, spi_byte_dt_ids);
-
static int spi_byte_brightness_set_blocking(struct led_classdev *dev,
enum led_brightness brightness)
{
@@ -122,6 +115,12 @@ static int spi_byte_probe(struct spi_device *spi)
return devm_led_classdev_register_ext(dev, &led->ldev, &init_data);
}
+static const struct of_device_id spi_byte_dt_ids[] = {
+ { .compatible = "ubnt,acb-spi-led", .data = &ubnt_acb_spi_led_cdef },
+ {}
+};
+MODULE_DEVICE_TABLE(of, spi_byte_dt_ids);
+
static struct spi_driver spi_byte_driver = {
.probe = spi_byte_probe,
.driver = {