Use general name, 'list' rather than 'next_trig'.

Signed-off-by: Milo(Woogyom) Kim <milo....@ti.com>
---
 drivers/leds/led-triggers.c |   12 ++++++------
 include/linux/leds.h        |    3 +--
 2 files changed, 7 insertions(+), 8 deletions(-)

diff --git a/drivers/leds/led-triggers.c b/drivers/leds/led-triggers.c
index 5aa0252..8ebef27 100644
--- a/drivers/leds/led-triggers.c
+++ b/drivers/leds/led-triggers.c
@@ -52,7 +52,7 @@ ssize_t led_trigger_store(struct device *dev, struct 
device_attribute *attr,
        }
 
        down_read(&triggers_list_lock);
-       list_for_each_entry(trig, &trigger_list, next_trig) {
+       list_for_each_entry(trig, &trigger_list, list) {
                if (!strcmp(trigger_name, trig->name)) {
                        down_write(&led_cdev->trigger_lock);
                        led_trigger_set(led_cdev, trig);
@@ -83,7 +83,7 @@ ssize_t led_trigger_show(struct device *dev, struct 
device_attribute *attr,
        else
                len += sprintf(buf+len, "none ");
 
-       list_for_each_entry(trig, &trigger_list, next_trig) {
+       list_for_each_entry(trig, &trigger_list, list) {
                if (led_cdev->trigger && !strcmp(led_cdev->trigger->name,
                                                        trig->name))
                        len += sprintf(buf+len, "[%s] ", trig->name);
@@ -149,7 +149,7 @@ void led_trigger_set_default(struct led_classdev *led_cdev)
 
        down_read(&triggers_list_lock);
        down_write(&led_cdev->trigger_lock);
-       list_for_each_entry(trig, &trigger_list, next_trig) {
+       list_for_each_entry(trig, &trigger_list, list) {
                if (!strcmp(led_cdev->default_trigger, trig->name))
                        led_trigger_set(led_cdev, trig);
        }
@@ -182,14 +182,14 @@ int led_trigger_register(struct led_trigger *trig)
 
        down_write(&triggers_list_lock);
        /* Make sure the trigger's name isn't already in use */
-       list_for_each_entry(_trig, &trigger_list, next_trig) {
+       list_for_each_entry(_trig, &trigger_list, list) {
                if (!strcmp(_trig->name, trig->name)) {
                        up_write(&triggers_list_lock);
                        return -EEXIST;
                }
        }
        /* Add to the list of led triggers */
-       list_add_tail(&trig->next_trig, &trigger_list);
+       list_add_tail(&trig->list, &trigger_list);
        up_write(&triggers_list_lock);
 
        /* Register with any LEDs that have this as a default trigger */
@@ -213,7 +213,7 @@ void led_trigger_unregister(struct led_trigger *trig)
 
        /* Remove from the list of led triggers */
        down_write(&triggers_list_lock);
-       list_del(&trig->next_trig);
+       list_del(&trig->list);
        up_write(&triggers_list_lock);
 
        /* Remove anyone actively using this trigger */
diff --git a/include/linux/leds.h b/include/linux/leds.h
index 4c593c6..1c107b3 100644
--- a/include/linux/leds.h
+++ b/include/linux/leds.h
@@ -154,8 +154,7 @@ struct led_trigger {
        /* LEDs under control by this trigger (for simple triggers) */
        rwlock_t          leddev_list_lock;
 
-       /* Link to next registered trigger */
-       struct list_head  next_trig;
+       struct list_head  list;
 };
 
 /* Registration functions for complex triggers */
-- 
1.7.9.5


Best Regards,
Milo


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Reply via email to