]> Git Repo - J-linux.git/blobdiff - drivers/pwm/pwm-imx27.c
Merge branch 'next' into for-linus
[J-linux.git] / drivers / pwm / pwm-imx27.c
index ea91a2f81a9fcc7bf357e1860bbeaaafc51853ff..29a3089c534cdab089e672f2d693a9ab0f70afa8 100644 (file)
@@ -118,8 +118,8 @@ static void pwm_imx27_clk_disable_unprepare(struct pwm_imx27_chip *imx)
        clk_disable_unprepare(imx->clk_ipg);
 }
 
-static void pwm_imx27_get_state(struct pwm_chip *chip,
-                               struct pwm_device *pwm, struct pwm_state *state)
+static int pwm_imx27_get_state(struct pwm_chip *chip,
+                              struct pwm_device *pwm, struct pwm_state *state)
 {
        struct pwm_imx27_chip *imx = to_pwm_imx27_chip(chip);
        u32 period, prescaler, pwm_clk, val;
@@ -128,7 +128,7 @@ static void pwm_imx27_get_state(struct pwm_chip *chip,
 
        ret = pwm_imx27_clk_prepare_enable(imx);
        if (ret < 0)
-               return;
+               return ret;
 
        val = readl(imx->mmio_base + MX3_PWMCR);
 
@@ -170,6 +170,8 @@ static void pwm_imx27_get_state(struct pwm_chip *chip,
        state->duty_cycle = DIV_ROUND_UP_ULL(tmp, pwm_clk);
 
        pwm_imx27_clk_disable_unprepare(imx);
+
+       return 0;
 }
 
 static void pwm_imx27_sw_reset(struct pwm_chip *chip)
This page took 0.027251 seconds and 4 git commands to generate.