- Core Frameworks

- Remove duplicate sysfs entry 'color' from LEDs class
 -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEdrbJNaO+IJqU8IdIUa+KL4f8d2EFAmVolLQACgkQUa+KL4f8
 d2FQRg//VihR+OOUFWTA22hcpYO9AQrGAQneVrqeE2v1Xmyi0fVhDZgr2WEYBWsL
 XtybtvYaFzysieJ9+QDcbt3rPQaF10k9qsAITvGLpfcVkzuRhY6RTi+11Xdi3bzL
 7hM32+yz997vQrm5LE1Qse0EJbh84x6HB9R4sx3rTm79nmC22ixqNeqH9UuzSWXP
 9DTeh+DLxSIIJ56ypEWbnZChpWIe3KC/YumYwmtt5MmoYrjhKrDMd4wRhREj0xLy
 Uy0/IKEVmrobNDA+pDL1lr2cEOgW+svGaAPmzJcSGTDiJZI4pjaT/4Z2LbD1iqOt
 A0PWuuMuJL+0keEEy4WTvMo5DZqxJOAwJHbKqSvNwEN+qitZNuAw+ii0cdv0UTMo
 QfP1uQ6ro+2bdjpPOahwtUPaXjK3PkfYFpJWDKbjsZH/+NpkK4qMxS28/qykJCdS
 bZOae5afCpWniznvVzikNrQJK3+2eKQmDEAoWS4Wn/ZBQqmDaLYtwuZuhnYJn8e7
 3Syw56il4u1JxttfvbW7Z+DjwU/xSNrbmduNavTpqIfVnfoQApbHxwIkqK6bfeGc
 d4v50IfkjfELA/tIrYIFphVOsk9EdUwkx0K5AYAtQOIRAzMJczqRmeGPtZXmayec
 74Wbau4mX1kgRi5vWj1HpP9tQhmgYQ2v7QCbmAEBBHjdsjqsNrQ=
 =aIyZ
 -----END PGP SIGNATURE-----

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
This commit is contained in:
Linus Torvalds 2023-12-01 08:00:02 +09:00
commit 1686475572
2 changed files with 0 additions and 23 deletions

View File

@ -59,15 +59,6 @@ Description:
brightness. Reading this file when no hw brightness change brightness. Reading this file when no hw brightness change
event has happened will return an ENODATA error. event has happened will return an ENODATA error.
What: /sys/class/leds/<led>/color
Date: June 2023
KernelVersion: 6.5
Description:
Color of the LED.
This is a read-only file. Reading this file returns the color
of the LED as a string (e.g: "red", "green", "multicolor").
What: /sys/class/leds/<led>/trigger What: /sys/class/leds/<led>/trigger
Date: March 2006 Date: March 2006
KernelVersion: 2.6.17 KernelVersion: 2.6.17

View File

@ -75,19 +75,6 @@ static ssize_t max_brightness_show(struct device *dev,
} }
static DEVICE_ATTR_RO(max_brightness); static DEVICE_ATTR_RO(max_brightness);
static ssize_t color_show(struct device *dev,
struct device_attribute *attr, char *buf)
{
const char *color_text = "invalid";
struct led_classdev *led_cdev = dev_get_drvdata(dev);
if (led_cdev->color < LED_COLOR_ID_MAX)
color_text = led_colors[led_cdev->color];
return sysfs_emit(buf, "%s\n", color_text);
}
static DEVICE_ATTR_RO(color);
#ifdef CONFIG_LEDS_TRIGGERS #ifdef CONFIG_LEDS_TRIGGERS
static BIN_ATTR(trigger, 0644, led_trigger_read, led_trigger_write, 0); static BIN_ATTR(trigger, 0644, led_trigger_read, led_trigger_write, 0);
static struct bin_attribute *led_trigger_bin_attrs[] = { static struct bin_attribute *led_trigger_bin_attrs[] = {
@ -102,7 +89,6 @@ static const struct attribute_group led_trigger_group = {
static struct attribute *led_class_attrs[] = { static struct attribute *led_class_attrs[] = {
&dev_attr_brightness.attr, &dev_attr_brightness.attr,
&dev_attr_max_brightness.attr, &dev_attr_max_brightness.attr,
&dev_attr_color.attr,
NULL, NULL,
}; };