Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

pwm: stmpe: Rename variable pointing to driver private data

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>
Signed-off-by: Thierry Reding <thierry.reding@gmail.com>

authored by

Uwe Kleine-König and committed by
Thierry Reding
431c3222 74746ac0

+8 -8
+8 -8
drivers/pwm/pwm-stmpe.c
··· 269 269 static int __init stmpe_pwm_probe(struct platform_device *pdev) 270 270 { 271 271 struct stmpe *stmpe = dev_get_drvdata(pdev->dev.parent); 272 - struct stmpe_pwm *pwm; 272 + struct stmpe_pwm *stmpe_pwm; 273 273 int ret; 274 274 275 - pwm = devm_kzalloc(&pdev->dev, sizeof(*pwm), GFP_KERNEL); 276 - if (!pwm) 275 + stmpe_pwm = devm_kzalloc(&pdev->dev, sizeof(*stmpe_pwm), GFP_KERNEL); 276 + if (!stmpe_pwm) 277 277 return -ENOMEM; 278 278 279 - pwm->stmpe = stmpe; 280 - pwm->chip.dev = &pdev->dev; 279 + stmpe_pwm->stmpe = stmpe; 280 + stmpe_pwm->chip.dev = &pdev->dev; 281 281 282 282 if (stmpe->partnum == STMPE2401 || stmpe->partnum == STMPE2403) { 283 - pwm->chip.ops = &stmpe_24xx_pwm_ops; 284 - pwm->chip.npwm = 3; 283 + stmpe_pwm->chip.ops = &stmpe_24xx_pwm_ops; 284 + stmpe_pwm->chip.npwm = 3; 285 285 } else { 286 286 if (stmpe->partnum == STMPE1601) 287 287 dev_err(&pdev->dev, "STMPE1601 not yet supported\n"); ··· 295 295 if (ret) 296 296 return ret; 297 297 298 - ret = pwmchip_add(&pwm->chip); 298 + ret = pwmchip_add(&stmpe_pwm->chip); 299 299 if (ret) { 300 300 stmpe_disable(stmpe, STMPE_BLOCK_PWM); 301 301 return ret;