Skip to content

Commit

Permalink
pwm: stm32: Make ch parameter unsigned
Browse files Browse the repository at this point in the history
The channel parameter is only ever set to pwm->hwpwm.
Make it unsigned int as well.

Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Reviewed-by: Fabrice Gasnier <fabrice.gasnier@foss.st.com>
Signed-off-by: Thierry Reding <thierry.reding@gmail.com>
  • Loading branch information
Philipp Zabel authored and Thierry Reding committed Dec 20, 2023
1 parent e495f47 commit c0504f5
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions drivers/pwm/pwm-stm32.c
Original file line number Diff line number Diff line change
Expand Up @@ -308,7 +308,7 @@ static int stm32_pwm_capture(struct pwm_chip *chip, struct pwm_device *pwm,
return ret;
}

static int stm32_pwm_config(struct stm32_pwm *priv, int ch,
static int stm32_pwm_config(struct stm32_pwm *priv, unsigned int ch,
int duty_ns, int period_ns)
{
unsigned long long prd, div, dty;
Expand Down Expand Up @@ -371,7 +371,7 @@ static int stm32_pwm_config(struct stm32_pwm *priv, int ch,
return 0;
}

static int stm32_pwm_set_polarity(struct stm32_pwm *priv, int ch,
static int stm32_pwm_set_polarity(struct stm32_pwm *priv, unsigned int ch,
enum pwm_polarity polarity)
{
u32 mask;
Expand All @@ -386,7 +386,7 @@ static int stm32_pwm_set_polarity(struct stm32_pwm *priv, int ch,
return 0;
}

static int stm32_pwm_enable(struct stm32_pwm *priv, int ch)
static int stm32_pwm_enable(struct stm32_pwm *priv, unsigned int ch)
{
u32 mask;
int ret;
Expand All @@ -411,7 +411,7 @@ static int stm32_pwm_enable(struct stm32_pwm *priv, int ch)
return 0;
}

static void stm32_pwm_disable(struct stm32_pwm *priv, int ch)
static void stm32_pwm_disable(struct stm32_pwm *priv, unsigned int ch)
{
u32 mask;

Expand Down

0 comments on commit c0504f5

Please sign in to comment.