Skip to content

Commit

Permalink
Revert "leds: class: Store the color index in struct led_classdev"
Browse files Browse the repository at this point in the history
This reverts commit c7d8005.
  • Loading branch information
mmstick committed Mar 11, 2024
1 parent 043af89 commit 7893eca
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 8 deletions.
7 changes: 0 additions & 7 deletions drivers/leds/led-class.c
Original file line number Diff line number Diff line change
Expand Up @@ -491,10 +491,6 @@ int led_classdev_register_ext(struct device *parent,
fwnode_property_read_u32(init_data->fwnode,
"max-brightness",
&led_cdev->max_brightness);

if (fwnode_property_present(init_data->fwnode, "color"))
fwnode_property_read_u32(init_data->fwnode, "color",
&led_cdev->color);
}
} else {
proposed_name = led_cdev->name;
Expand All @@ -504,9 +500,6 @@ int led_classdev_register_ext(struct device *parent,
if (ret < 0)
return ret;

if (led_cdev->color >= LED_COLOR_ID_MAX)
dev_warn(parent, "LED %s color identifier out of range\n", final_name);

mutex_init(&led_cdev->led_access);
mutex_lock(&led_cdev->led_access);
led_cdev->dev = device_create_with_groups(&leds_class, parent, 0,
Expand Down
1 change: 0 additions & 1 deletion include/linux/leds.h
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,6 @@ struct led_classdev {
const char *name;
unsigned int brightness;
unsigned int max_brightness;
unsigned int color;
int flags;

/* Lower 16 bits reflect status */
Expand Down

0 comments on commit 7893eca

Please sign in to comment.