Skip to content

Commit 1686475

Browse files
committed
Merge tag 'leds-fixes-6.7' of git://git.kernel.org/pub/scm/linux/kernel/git/lee/leds
Pull LED fix from Lee Jones: - Remove duplicate sysfs entry 'color' from LEDs class * tag 'leds-fixes-6.7' of git://git.kernel.org/pub/scm/linux/kernel/git/lee/leds: leds: class: Don't expose color sysfs entry
2 parents 9d3eac3 + 8f2244c commit 1686475

File tree

2 files changed

+0
-23
lines changed

2 files changed

+0
-23
lines changed

Documentation/ABI/testing/sysfs-class-led

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -59,15 +59,6 @@ Description:
5959
brightness. Reading this file when no hw brightness change
6060
event has happened will return an ENODATA error.
6161

62-
What: /sys/class/leds/<led>/color
63-
Date: June 2023
64-
KernelVersion: 6.5
65-
Description:
66-
Color of the LED.
67-
68-
This is a read-only file. Reading this file returns the color
69-
of the LED as a string (e.g: "red", "green", "multicolor").
70-
7162
What: /sys/class/leds/<led>/trigger
7263
Date: March 2006
7364
KernelVersion: 2.6.17

drivers/leds/led-class.c

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -75,19 +75,6 @@ static ssize_t max_brightness_show(struct device *dev,
7575
}
7676
static DEVICE_ATTR_RO(max_brightness);
7777

78-
static ssize_t color_show(struct device *dev,
79-
struct device_attribute *attr, char *buf)
80-
{
81-
const char *color_text = "invalid";
82-
struct led_classdev *led_cdev = dev_get_drvdata(dev);
83-
84-
if (led_cdev->color < LED_COLOR_ID_MAX)
85-
color_text = led_colors[led_cdev->color];
86-
87-
return sysfs_emit(buf, "%s\n", color_text);
88-
}
89-
static DEVICE_ATTR_RO(color);
90-
9178
#ifdef CONFIG_LEDS_TRIGGERS
9279
static BIN_ATTR(trigger, 0644, led_trigger_read, led_trigger_write, 0);
9380
static struct bin_attribute *led_trigger_bin_attrs[] = {
@@ -102,7 +89,6 @@ static const struct attribute_group led_trigger_group = {
10289
static struct attribute *led_class_attrs[] = {
10390
&dev_attr_brightness.attr,
10491
&dev_attr_max_brightness.attr,
105-
&dev_attr_color.attr,
10692
NULL,
10793
};
10894

0 commit comments

Comments
 (0)