Commit b63d60b2 authored by Uwe Kleine-König's avatar Uwe Kleine-König Committed by Thierry Reding

pwm: pxa: Always use the same variable name for driver data

In most functions the driver data variable is called pc. Do the same in
the two remaining functions.
Signed-off-by: default avatarUwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: default avatarThierry Reding <thierry.reding@gmail.com>
parent 81b7c173
...@@ -165,7 +165,7 @@ pxa_pwm_of_xlate(struct pwm_chip *pc, const struct of_phandle_args *args) ...@@ -165,7 +165,7 @@ pxa_pwm_of_xlate(struct pwm_chip *pc, const struct of_phandle_args *args)
static int pwm_probe(struct platform_device *pdev) static int pwm_probe(struct platform_device *pdev)
{ {
const struct platform_device_id *id = platform_get_device_id(pdev); const struct platform_device_id *id = platform_get_device_id(pdev);
struct pxa_pwm_chip *pwm; struct pxa_pwm_chip *pc;
int ret = 0; int ret = 0;
if (IS_ENABLED(CONFIG_OF) && id == NULL) if (IS_ENABLED(CONFIG_OF) && id == NULL)
...@@ -174,44 +174,44 @@ static int pwm_probe(struct platform_device *pdev) ...@@ -174,44 +174,44 @@ static int pwm_probe(struct platform_device *pdev)
if (id == NULL) if (id == NULL)
return -EINVAL; return -EINVAL;
pwm = devm_kzalloc(&pdev->dev, sizeof(*pwm), GFP_KERNEL); pc = devm_kzalloc(&pdev->dev, sizeof(*pc), GFP_KERNEL);
if (pwm == NULL) if (pc == NULL)
return -ENOMEM; return -ENOMEM;
pwm->clk = devm_clk_get(&pdev->dev, NULL); pc->clk = devm_clk_get(&pdev->dev, NULL);
if (IS_ERR(pwm->clk)) if (IS_ERR(pc->clk))
return PTR_ERR(pwm->clk); return PTR_ERR(pc->clk);
pwm->chip.dev = &pdev->dev; pc->chip.dev = &pdev->dev;
pwm->chip.ops = &pxa_pwm_ops; pc->chip.ops = &pxa_pwm_ops;
pwm->chip.npwm = (id->driver_data & HAS_SECONDARY_PWM) ? 2 : 1; pc->chip.npwm = (id->driver_data & HAS_SECONDARY_PWM) ? 2 : 1;
if (IS_ENABLED(CONFIG_OF)) { if (IS_ENABLED(CONFIG_OF)) {
pwm->chip.of_xlate = pxa_pwm_of_xlate; pc->chip.of_xlate = pxa_pwm_of_xlate;
pwm->chip.of_pwm_n_cells = 1; pc->chip.of_pwm_n_cells = 1;
} }
pwm->mmio_base = devm_platform_ioremap_resource(pdev, 0); pc->mmio_base = devm_platform_ioremap_resource(pdev, 0);
if (IS_ERR(pwm->mmio_base)) if (IS_ERR(pc->mmio_base))
return PTR_ERR(pwm->mmio_base); return PTR_ERR(pc->mmio_base);
ret = pwmchip_add(&pwm->chip); ret = pwmchip_add(&pc->chip);
if (ret < 0) { if (ret < 0) {
dev_err(&pdev->dev, "pwmchip_add() failed: %d\n", ret); dev_err(&pdev->dev, "pwmchip_add() failed: %d\n", ret);
return ret; return ret;
} }
platform_set_drvdata(pdev, pwm); platform_set_drvdata(pdev, pc);
return 0; return 0;
} }
static int pwm_remove(struct platform_device *pdev) static int pwm_remove(struct platform_device *pdev)
{ {
struct pxa_pwm_chip *chip; struct pxa_pwm_chip *pc;
chip = platform_get_drvdata(pdev); pc = platform_get_drvdata(pdev);
return pwmchip_remove(&chip->chip); return pwmchip_remove(&pc->chip);
} }
static struct platform_driver pwm_driver = { static struct platform_driver pwm_driver = {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment