Skip to content

Commit 5996cdf

Browse files
Uwe Kleine-Königthierryreding
authored andcommitted
pwm: cros-ec: Consistently name pwm_chip variables "chip"
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 <[email protected]> Reviewed-by: Tzung-Bi Shih <[email protected]> Signed-off-by: Thierry Reding <[email protected]>
1 parent 92f2de2 commit 5996cdf

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

drivers/pwm/pwm-cros-ec.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -37,9 +37,9 @@ struct cros_ec_pwm {
3737
u16 duty_cycle;
3838
};
3939

40-
static inline struct cros_ec_pwm_device *pwm_to_cros_ec_pwm(struct pwm_chip *c)
40+
static inline struct cros_ec_pwm_device *pwm_to_cros_ec_pwm(struct pwm_chip *chip)
4141
{
42-
return container_of(c, struct cros_ec_pwm_device, chip);
42+
return container_of(chip, struct cros_ec_pwm_device, chip);
4343
}
4444

4545
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,
218218
}
219219

220220
static struct pwm_device *
221-
cros_ec_pwm_xlate(struct pwm_chip *pc, const struct of_phandle_args *args)
221+
cros_ec_pwm_xlate(struct pwm_chip *chip, const struct of_phandle_args *args)
222222
{
223223
struct pwm_device *pwm;
224224

225-
if (args->args[0] >= pc->npwm)
225+
if (args->args[0] >= chip->npwm)
226226
return ERR_PTR(-EINVAL);
227227

228-
pwm = pwm_request_from_chip(pc, args->args[0], NULL);
228+
pwm = pwm_request_from_chip(chip, args->args[0], NULL);
229229
if (IS_ERR(pwm))
230230
return pwm;
231231

0 commit comments

Comments
 (0)