aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/pwm
diff options
context:
space:
mode:
authorUwe Kleine-König <u.kleine-koenig@pengutronix.de>2024-02-14 10:31:47 +0100
committerUwe Kleine-König <u.kleine-koenig@pengutronix.de>2024-02-19 11:04:10 +0100
commit8d1cdd2f2d0dca91814fb39fa6415ebb60c69959 (patch)
tree1df861415fc63589ed5bb48c183c8823231252a9 /drivers/pwm
parente6377139899e2c7cee53a22523eee691d485e998 (diff)
downloadlinux-8d1cdd2f2d0dca91814fb39fa6415ebb60c69959.tar.gz
pwm: lpc18xx-sct: Drop hardly used member from driver private data
The device pointer is only used once in lpc18xx_pwm_request(). There the pwm_chip is available, too, which has a pointer to the same structure. Replace the usage accordingly and drop the then write-only member variable. Link: https://lore.kernel.org/r/427a719a24dd7ff5ebbac3e260a1773c094c7489.1707900770.git.u.kleine-koenig@pengutronix.de Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Diffstat (limited to 'drivers/pwm')
-rw-r--r--drivers/pwm/pwm-lpc18xx-sct.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/drivers/pwm/pwm-lpc18xx-sct.c b/drivers/pwm/pwm-lpc18xx-sct.c
index fe891fa71a1ddc..754ea2c3f49bed 100644
--- a/drivers/pwm/pwm-lpc18xx-sct.c
+++ b/drivers/pwm/pwm-lpc18xx-sct.c
@@ -92,7 +92,6 @@ struct lpc18xx_pwm_data {
};
struct lpc18xx_pwm_chip {
- struct device *dev;
struct pwm_chip chip;
void __iomem *base;
struct clk *pwm_clk;
@@ -289,7 +288,7 @@ static int lpc18xx_pwm_request(struct pwm_chip *chip, struct pwm_device *pwm)
LPC18XX_PWM_EVENT_MAX);
if (event >= LPC18XX_PWM_EVENT_MAX) {
- dev_err(lpc18xx_pwm->dev,
+ dev_err(chip->dev,
"maximum number of simultaneous channels reached\n");
return -EBUSY;
}
@@ -358,8 +357,6 @@ static int lpc18xx_pwm_probe(struct platform_device *pdev)
if (!lpc18xx_pwm)
return -ENOMEM;
- lpc18xx_pwm->dev = &pdev->dev;
-
lpc18xx_pwm->base = devm_platform_ioremap_resource(pdev, 0);
if (IS_ERR(lpc18xx_pwm->base))
return PTR_ERR(lpc18xx_pwm->base);