leds-pwm: add a default brightness to the platform data

This commit is contained in:
Matt Sealey
2011-02-17 11:00:20 -06:00
parent 282319bf94
commit 6b8b2e2caa
2 changed files with 2 additions and 1 deletions

View File

@@ -80,7 +80,7 @@ static int led_pwm_probe(struct platform_device *pdev)
led_dat->max_brightness = cur_led->max_brightness;
led_dat->period = cur_led->pwm_period_ns;
led_dat->cdev.brightness_set = led_pwm_set;
led_dat->cdev.brightness = LED_OFF;
led_dat->cdev.brightness = cur_led->default_brightness;
led_dat->cdev.flags |= LED_CORE_SUSPENDRESUME;
ret = led_classdev_register(&pdev->dev, &led_dat->cdev);

View File

@@ -10,6 +10,7 @@ struct led_pwm {
unsigned pwm_id;
u8 active_low;
unsigned max_brightness;
unsigned default_brightness;
unsigned pwm_period_ns;
};