diff mbox series

[5/5] pwm: stmpe: Rename variable pointing to driver private data

Message ID 20211123092939.82705-6-u.kleine-koenig@pengutronix.de
State Accepted
Headers show
Series pwm: Cleanup of variable names used for driver data | expand

Commit Message

Uwe Kleine-König Nov. 23, 2021, 9:29 a.m. UTC
In all code locations but the probe function variables of type struct
stmpe_pwm * are called "stmpe_pwm". Align the name used in
stmpe_pwm_probe() accordingly. Still more as the current name "pwm" is
usually reserved for variables of type struct pwm_device *.

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

Comments

Linus Walleij Nov. 23, 2021, 11:28 p.m. UTC | #1
On Tue, Nov 23, 2021 at 10:29 AM Uwe Kleine-König
<u.kleine-koenig@pengutronix.de> wrote:

> In all code locations but the probe function variables of type struct
> stmpe_pwm * are called "stmpe_pwm". Align the name used in
> stmpe_pwm_probe() accordingly. Still more as the current name "pwm" is
> usually reserved for variables of type struct pwm_device *.
>
> Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>

Acked-by: Linus Walleij <linus.walleij@linaro.org>

Yours,
Linus Walleij
diff mbox series

Patch

diff --git a/drivers/pwm/pwm-stmpe.c b/drivers/pwm/pwm-stmpe.c
index 7c0e567ff71c..c4336d3bace3 100644
--- a/drivers/pwm/pwm-stmpe.c
+++ b/drivers/pwm/pwm-stmpe.c
@@ -269,19 +269,19 @@  static const struct pwm_ops stmpe_24xx_pwm_ops = {
 static int __init stmpe_pwm_probe(struct platform_device *pdev)
 {
 	struct stmpe *stmpe = dev_get_drvdata(pdev->dev.parent);
-	struct stmpe_pwm *pwm;
+	struct stmpe_pwm *stmpe_pwm;
 	int ret;
 
-	pwm = devm_kzalloc(&pdev->dev, sizeof(*pwm), GFP_KERNEL);
-	if (!pwm)
+	stmpe_pwm = devm_kzalloc(&pdev->dev, sizeof(*stmpe_pwm), GFP_KERNEL);
+	if (!stmpe_pwm)
 		return -ENOMEM;
 
-	pwm->stmpe = stmpe;
-	pwm->chip.dev = &pdev->dev;
+	stmpe_pwm->stmpe = stmpe;
+	stmpe_pwm->chip.dev = &pdev->dev;
 
 	if (stmpe->partnum == STMPE2401 || stmpe->partnum == STMPE2403) {
-		pwm->chip.ops = &stmpe_24xx_pwm_ops;
-		pwm->chip.npwm = 3;
+		stmpe_pwm->chip.ops = &stmpe_24xx_pwm_ops;
+		stmpe_pwm->chip.npwm = 3;
 	} else {
 		if (stmpe->partnum == STMPE1601)
 			dev_err(&pdev->dev, "STMPE1601 not yet supported\n");
@@ -295,7 +295,7 @@  static int __init stmpe_pwm_probe(struct platform_device *pdev)
 	if (ret)
 		return ret;
 
-	ret = pwmchip_add(&pwm->chip);
+	ret = pwmchip_add(&stmpe_pwm->chip);
 	if (ret) {
 		stmpe_disable(stmpe, STMPE_BLOCK_PWM);
 		return ret;