]> git.itanic.dy.fi Git - linux-stable/commitdiff
pwm: crc: Use consistent variable naming for driver data
authorUwe Kleine-König <u.kleine-koenig@pengutronix.de>
Thu, 30 Nov 2023 07:41:34 +0000 (08:41 +0100)
committerThierry Reding <thierry.reding@gmail.com>
Wed, 20 Dec 2023 15:23:24 +0000 (16:23 +0100)
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 <u.kleine-koenig@pengutronix.de>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Thierry Reding <thierry.reding@gmail.com>
drivers/pwm/pwm-crc.c

index 2b0b659eee9797520587ada0537abb2c75329d42..e09358901ab508dd3a434a54285606a83147d220 100644 (file)
@@ -160,22 +160,22 @@ static const struct pwm_ops crc_pwm_ops = {
 
 static int crystalcove_pwm_probe(struct platform_device *pdev)
 {
-       struct crystalcove_pwm *pwm;
+       struct crystalcove_pwm *crc_pwm;
        struct device *dev = pdev->dev.parent;
        struct intel_soc_pmic *pmic = dev_get_drvdata(dev);
 
-       pwm = devm_kzalloc(&pdev->dev, sizeof(*pwm), GFP_KERNEL);
-       if (!pwm)
+       crc_pwm = devm_kzalloc(&pdev->dev, sizeof(*crc_pwm), GFP_KERNEL);
+       if (!crc_pwm)
                return -ENOMEM;
 
-       pwm->chip.dev = &pdev->dev;
-       pwm->chip.ops = &crc_pwm_ops;
-       pwm->chip.npwm = 1;
+       crc_pwm->chip.dev = &pdev->dev;
+       crc_pwm->chip.ops = &crc_pwm_ops;
+       crc_pwm->chip.npwm = 1;
 
        /* get the PMIC regmap */
-       pwm->regmap = pmic->regmap;
+       crc_pwm->regmap = pmic->regmap;
 
-       return devm_pwmchip_add(&pdev->dev, &pwm->chip);
+       return devm_pwmchip_add(&pdev->dev, &crc_pwm->chip);
 }
 
 static struct platform_driver crystalcove_pwm_driver = {