summaryrefslogtreecommitdiffstats
path: root/drivers/led/led-triggers.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/led/led-triggers.c')
-rw-r--r--drivers/led/led-triggers.c40
1 files changed, 1 insertions, 39 deletions
diff --git a/drivers/led/led-triggers.c b/drivers/led/led-triggers.c
index 76a1481e14..cba94d5461 100644
--- a/drivers/led/led-triggers.c
+++ b/drivers/led/led-triggers.c
@@ -1,21 +1,8 @@
+// SPDX-License-Identifier: GPL-2.0-or-later
/*
* LED trigger support for barebox
*
* (C) Copyright 2010 Sascha Hauer, Pengutronix
- *
- * See file CREDITS for list of people who contributed to this
- * project.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License as
- * published by the Free Software Foundation; either version 2 of
- * the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
*/
#include <common.h>
@@ -143,31 +130,6 @@ int led_set_trigger(enum led_trigger trigger, struct led *led)
return 0;
}
-static char *trigger_names[] = {
- [LED_TRIGGER_PANIC] = "panic",
- [LED_TRIGGER_HEARTBEAT] = "heartbeat",
- [LED_TRIGGER_NET_RX] = "net-rx",
- [LED_TRIGGER_NET_TX] = "net-tx",
- [LED_TRIGGER_NET_TXRX] = "net",
- [LED_TRIGGER_DEFAULT_ON] = "default-on",
-};
-
-const char *trigger_name(enum led_trigger trigger)
-{
- return trigger_names[trigger];
-}
-
-enum led_trigger trigger_by_name(const char *name)
-{
- int i;
-
- for (i = 0; i < LED_TRIGGER_MAX; i++)
- if (!strcmp(name, trigger_names[i]))
- return i;
-
- return LED_TRIGGER_MAX;
-}
-
/**
* led_triggers_show_info - Show information about all registered
* triggers