diff mbox series

[05/10] pwm: cros-ec: Consistenly name pwm_chip variables "chip"

Message ID 20230714205623.2496590-6-u.kleine-koenig@pengutronix.de (mailing list archive)
State Accepted
Commit 5996cdf132dad91db596d0bdacf137cbde68dc3c
Headers show
Series pwm: Constistenly name pwm_chip variables "chip" | expand

Commit Message

Uwe Kleine-König July 14, 2023, 8:56 p.m. UTC
Most variables holding a pointer to a pwm_chip are called "chip" which
is also the usual name in most other pwm drivers. Rename the two
variables that have a different name to be called "chip", too, for
consistency.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
---
 drivers/pwm/pwm-cros-ec.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

Comments

Tzung-Bi Shih July 17, 2023, 3:34 a.m. UTC | #1
On Fri, Jul 14, 2023 at 10:56:18PM +0200, Uwe Kleine-König wrote:
> Most variables holding a pointer to a pwm_chip are called "chip" which
> is also the usual name in most other pwm drivers. Rename the two
> variables that have a different name to be called "chip", too, for
> consistency.
> 
> Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>

Reviewed-by: Tzung-Bi Shih <tzungbi@kernel.org>
diff mbox series

Patch

diff --git a/drivers/pwm/pwm-cros-ec.c b/drivers/pwm/pwm-cros-ec.c
index 74e863aa1d8d..154ca0f90847 100644
--- a/drivers/pwm/pwm-cros-ec.c
+++ b/drivers/pwm/pwm-cros-ec.c
@@ -37,9 +37,9 @@  struct cros_ec_pwm {
 	u16 duty_cycle;
 };
 
-static inline struct cros_ec_pwm_device *pwm_to_cros_ec_pwm(struct pwm_chip *c)
+static inline struct cros_ec_pwm_device *pwm_to_cros_ec_pwm(struct pwm_chip *chip)
 {
-	return container_of(c, struct cros_ec_pwm_device, chip);
+	return container_of(chip, struct cros_ec_pwm_device, chip);
 }
 
 static int cros_ec_pwm_request(struct pwm_chip *chip, struct pwm_device *pwm)
@@ -218,14 +218,14 @@  static int cros_ec_pwm_get_state(struct pwm_chip *chip, struct pwm_device *pwm,
 }
 
 static struct pwm_device *
-cros_ec_pwm_xlate(struct pwm_chip *pc, const struct of_phandle_args *args)
+cros_ec_pwm_xlate(struct pwm_chip *chip, const struct of_phandle_args *args)
 {
 	struct pwm_device *pwm;
 
-	if (args->args[0] >= pc->npwm)
+	if (args->args[0] >= chip->npwm)
 		return ERR_PTR(-EINVAL);
 
-	pwm = pwm_request_from_chip(pc, args->args[0], NULL);
+	pwm = pwm_request_from_chip(chip, args->args[0], NULL);
 	if (IS_ERR(pwm))
 		return pwm;