diff options
author | Pantelis Antoniou <panto@antoniou-consulting.com> | 2013-07-10 23:50:05 +0300 |
---|---|---|
committer | Jerome Glisse <jglisse@redhat.com> | 2013-07-28 13:45:01 -0400 |
commit | 3064f410115e13422f7d82ce45af2d69604ce370 (patch) | |
tree | 85751bb1203c82058671a940dc942a2d0ffe4dcf | |
parent | ed54a7fd3bedf5605769ca72da625c858246c0ba (diff) |
leds: pwm: Enable compilation on this version of the kernel
-rw-r--r-- | drivers/leds/Kconfig | 2 | ||||
-rw-r--r-- | drivers/leds/leds-pwm.c | 7 |
2 files changed, 5 insertions, 4 deletions
diff --git a/drivers/leds/Kconfig b/drivers/leds/Kconfig index b58bc8a14b9c..de3fc297cc25 100644 --- a/drivers/leds/Kconfig +++ b/drivers/leds/Kconfig @@ -310,7 +310,7 @@ config LEDS_DAC124S085 config LEDS_PWM tristate "PWM driven LED Support" depends on LEDS_CLASS - depends on HAVE_PWM + depends on PWM help This option enables support for pwm driven LEDs diff --git a/drivers/leds/leds-pwm.c b/drivers/leds/leds-pwm.c index faf52c005e8c..730c7c62d798 100644 --- a/drivers/leds/leds-pwm.c +++ b/drivers/leds/leds-pwm.c @@ -105,7 +105,8 @@ static struct led_pwm_priv *led_pwm_create_of(struct platform_device *pdev) led_dat->cdev.name = of_get_property(child, "label", NULL) ? : child->name; - led_dat->pwm = devm_of_pwm_get(&pdev->dev, child, NULL); + /* caution: this is not release automatically */ + led_dat->pwm = of_pwm_request(child, NULL); if (IS_ERR(led_dat->pwm)) { dev_err(&pdev->dev, "unable to request PWM for %s\n", led_dat->cdev.name); @@ -123,7 +124,7 @@ static struct led_pwm_priv *led_pwm_create_of(struct platform_device *pdev) led_dat->cdev.brightness = LED_OFF; led_dat->cdev.flags |= LED_CORE_SUSPENDRESUME; - led_dat->can_sleep = pwm_can_sleep(led_dat->pwm); + led_dat->can_sleep = 0; /* pwm_can_sleep(led_dat->pwm); */ if (led_dat->can_sleep) INIT_WORK(&led_dat->work, led_pwm_work); @@ -180,7 +181,7 @@ static int led_pwm_probe(struct platform_device *pdev) led_dat->cdev.max_brightness = cur_led->max_brightness; led_dat->cdev.flags |= LED_CORE_SUSPENDRESUME; - led_dat->can_sleep = pwm_can_sleep(led_dat->pwm); + led_dat->can_sleep = 0; /* pwm_can_sleep(led_dat->pwm); */ if (led_dat->can_sleep) INIT_WORK(&led_dat->work, led_pwm_work); |