drm/rockchip: fix compile warnings for 64-bit
[deliverable/linux.git] / drivers / leds / leds-pwm.c
index 4783bacb2e9d8e48c043223fd89643069d93f4b9..a9145aa7f36a017327f9c7b74140ec5d1a730e40 100644 (file)
@@ -91,6 +91,7 @@ static int led_pwm_add(struct device *dev, struct led_pwm_priv *priv,
                       struct led_pwm *led, struct device_node *child)
 {
        struct led_pwm_data *led_data = &priv->leds[priv->num_leds];
+       struct pwm_args pargs;
        int ret;
 
        led_data->active_low = led->active_low;
@@ -117,7 +118,15 @@ static int led_pwm_add(struct device *dev, struct led_pwm_priv *priv,
        else
                led_data->cdev.brightness_set_blocking = led_pwm_set_blocking;
 
-       led_data->period = pwm_get_period(led_data->pwm);
+       /*
+        * FIXME: pwm_apply_args() should be removed when switching to the
+        * atomic PWM API.
+        */
+       pwm_apply_args(led_data->pwm);
+
+       pwm_get_args(led_data->pwm, &pargs);
+
+       led_data->period = pargs.period;
        if (!led_data->period && (led->pwm_period_ns > 0))
                led_data->period = led->pwm_period_ns;
 
This page took 0.048483 seconds and 5 git commands to generate.