[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20220608010607.19469-1-yuanjilin@cdjrlc.com>
Date: Wed, 8 Jun 2022 09:06:07 +0800
From: Jilin Yuan <yuanjilin@...rlc.com>
To: thierry.reding@...il.com, lee.jones@...aro.org
Cc: u.kleine-koenig@...gutronix.de, nicolas.ferre@...rochip.com,
alexandre.belloni@...tlin.com, claudiu.beznea@...rochip.com,
linux-pwm@...r.kernel.org, linux-arm-kernel@...ts.infradead.org,
linux-kernel@...r.kernel.org, Jilin Yuan <yuanjilin@...rlc.com>
Subject: [PATCH] pwm: atmel-tcb: use 'unsigned int' instead of 'unsigned'
Replace the 'unsigned' with 'unsigned int' which is more accurate.
Signed-off-by: Jilin Yuan <yuanjilin@...rlc.com>
---
drivers/pwm/pwm-atmel-tcb.c | 16 ++++++++--------
1 file changed, 8 insertions(+), 8 deletions(-)
diff --git a/drivers/pwm/pwm-atmel-tcb.c b/drivers/pwm/pwm-atmel-tcb.c
index 3977a0f9d132..d6977e4e71f3 100644
--- a/drivers/pwm/pwm-atmel-tcb.c
+++ b/drivers/pwm/pwm-atmel-tcb.c
@@ -35,9 +35,9 @@
struct atmel_tcb_pwm_device {
enum pwm_polarity polarity; /* PWM polarity */
- unsigned div; /* PWM clock divider */
- unsigned duty; /* PWM duty expressed in clk cycles */
- unsigned period; /* PWM period expressed in clk cycles */
+ unsigned int div; /* PWM clock divider */
+ unsigned int duty; /* PWM duty expressed in clk cycles */
+ unsigned int period; /* PWM period expressed in clk cycles */
};
struct atmel_tcb_channel {
@@ -85,7 +85,7 @@ static int atmel_tcb_pwm_request(struct pwm_chip *chip,
{
struct atmel_tcb_pwm_chip *tcbpwmc = to_tcb_chip(chip);
struct atmel_tcb_pwm_device *tcbpwm;
- unsigned cmr;
+ unsigned int cmr;
int ret;
tcbpwm = devm_kzalloc(chip->dev, sizeof(*tcbpwm), GFP_KERNEL);
@@ -150,7 +150,7 @@ static void atmel_tcb_pwm_disable(struct pwm_chip *chip, struct pwm_device *pwm)
{
struct atmel_tcb_pwm_chip *tcbpwmc = to_tcb_chip(chip);
struct atmel_tcb_pwm_device *tcbpwm = tcbpwmc->pwms[pwm->hwpwm];
- unsigned cmr;
+ unsigned int cmr;
enum pwm_polarity polarity = tcbpwm->polarity;
/*
@@ -295,9 +295,9 @@ static int atmel_tcb_pwm_config(struct pwm_chip *chip, struct pwm_device *pwm,
struct atmel_tcb_pwm_device *atcbpwm = NULL;
int i = 0;
int slowclk = 0;
- unsigned period;
- unsigned duty;
- unsigned rate = clk_get_rate(tcbpwmc->clk);
+ unsigned int period;
+ unsigned int duty;
+ unsigned int rate = clk_get_rate(tcbpwmc->clk);
unsigned long long min;
unsigned long long max;
--
2.36.1
Powered by blists - more mailing lists