1
0
mirror of git://projects.qi-hardware.com/openwrt-xburst.git synced 2025-04-21 12:27:27 +03:00

generic: swconfig: use led_set_brightness in LED control code

The 'led_brightness_set' function has
been renamed to 'led_set_brightness'
in recent ernels. Use the new name and
add a compatibility patch for 3.3.

Signed-off-by: Gabor Juhos <juhosg@openwrt.org>

git-svn-id: svn://svn.openwrt.org/openwrt/trunk@33946 3c298f89-4303-0410-b956-a3cf2f4a3e73
This commit is contained in:
juhosg
2012-10-26 18:58:18 +00:00
parent 52ff80a55b
commit 118178a078
2 changed files with 13 additions and 2 deletions

View File

@@ -46,7 +46,7 @@ static void
swconfig_trig_set_brightness(struct swconfig_trig_data *trig_data,
enum led_brightness brightness)
{
led_brightness_set(trig_data->led_cdev, brightness);
led_set_brightness(trig_data->led_cdev, brightness);
trig_data->prev_brightness = brightness;
}
@@ -209,7 +209,7 @@ swconfig_trig_led_event(struct switch_led_trigger *sw_trig,
link = !!(sw_trig->port_link & port_mask);
if (!link) {
if (link != trig_data->prev_link)
led_brightness_set(trig_data->led_cdev, LED_OFF);
led_set_brightness(trig_data->led_cdev, LED_OFF);
} else {
unsigned long traffic;
int i;