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

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>

authored by

Andy Shevchenko and committed by
Lee Jones
25458b2a 133f941f

+6 -7
+6 -7
drivers/leds/leds-spi-byte.c
··· 56 56 .max_value = 0x3F, 57 57 }; 58 58 59 - static const struct of_device_id spi_byte_dt_ids[] = { 60 - { .compatible = "ubnt,acb-spi-led", .data = &ubnt_acb_spi_led_cdef }, 61 - {}, 62 - }; 63 - 64 - MODULE_DEVICE_TABLE(of, spi_byte_dt_ids); 65 - 66 59 static int spi_byte_brightness_set_blocking(struct led_classdev *dev, 67 60 enum led_brightness brightness) 68 61 { ··· 114 121 115 122 return devm_led_classdev_register_ext(dev, &led->ldev, &init_data); 116 123 } 124 + 125 + static const struct of_device_id spi_byte_dt_ids[] = { 126 + { .compatible = "ubnt,acb-spi-led", .data = &ubnt_acb_spi_led_cdef }, 127 + {} 128 + }; 129 + MODULE_DEVICE_TABLE(of, spi_byte_dt_ids); 117 130 118 131 static struct spi_driver spi_byte_driver = { 119 132 .probe = spi_byte_probe,