Skip to content

Commit d243221

Browse files
Uwe Kleine-Königthierryreding
authored andcommitted
pwm: crc: Use consistent variable naming for driver data
All but one local variable of type pointer to struct crystalcove_pwm are called "crc_pwm", the one outlier is called "pwm" which is usually reserved for variables of type pointer to struct pwm_device. So rename that one "pwm" to "crc_pwm" for consistency. Signed-off-by: Uwe Kleine-König <[email protected]> Reviewed-by: Hans de Goede <[email protected]> Signed-off-by: Thierry Reding <[email protected]>
1 parent 01b571f commit d243221

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

drivers/pwm/pwm-crc.c

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -160,22 +160,22 @@ static const struct pwm_ops crc_pwm_ops = {
160160

161161
static int crystalcove_pwm_probe(struct platform_device *pdev)
162162
{
163-
struct crystalcove_pwm *pwm;
163+
struct crystalcove_pwm *crc_pwm;
164164
struct device *dev = pdev->dev.parent;
165165
struct intel_soc_pmic *pmic = dev_get_drvdata(dev);
166166

167-
pwm = devm_kzalloc(&pdev->dev, sizeof(*pwm), GFP_KERNEL);
168-
if (!pwm)
167+
crc_pwm = devm_kzalloc(&pdev->dev, sizeof(*crc_pwm), GFP_KERNEL);
168+
if (!crc_pwm)
169169
return -ENOMEM;
170170

171-
pwm->chip.dev = &pdev->dev;
172-
pwm->chip.ops = &crc_pwm_ops;
173-
pwm->chip.npwm = 1;
171+
crc_pwm->chip.dev = &pdev->dev;
172+
crc_pwm->chip.ops = &crc_pwm_ops;
173+
crc_pwm->chip.npwm = 1;
174174

175175
/* get the PMIC regmap */
176-
pwm->regmap = pmic->regmap;
176+
crc_pwm->regmap = pmic->regmap;
177177

178-
return devm_pwmchip_add(&pdev->dev, &pwm->chip);
178+
return devm_pwmchip_add(&pdev->dev, &crc_pwm->chip);
179179
}
180180

181181
static struct platform_driver crystalcove_pwm_driver = {

0 commit comments

Comments
 (0)