fbd-dev-leds: use define for max_brightness

All other attributes use a define, let's do the same for max_brightness.
This commit is contained in:
Dylan Van Assche
2022-05-17 20:02:51 +02:00
parent 5a3e501344
commit 572a027fa6
+2 -1
View File
@@ -26,6 +26,7 @@
*/
#define LED_BRIGHTNESS_ATTR "brightness"
#define LED_MAX_BRIGHTNESS_ATTR "max_brightness"
#define LED_PATTERN_ATTR "pattern"
#define LED_SUBSYSTEM "leds"
@@ -125,7 +126,7 @@ initable_init (GInitable *initable,
color = g_ascii_strdown (c+1, -1);
if (g_strstr_len (name, -1, color)) {
g_autoptr (GError) err = NULL;
guint brightness = g_udev_device_get_sysfs_attr_as_int (dev, "max_brightness");
guint brightness = g_udev_device_get_sysfs_attr_as_int (dev, LED_MAX_BRIGHTNESS_ATTR);
if (!brightness)
continue;