summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorUwe Kleine-König <u.kleine-koenig@baylibre.com>2025-04-03 17:11:32 +0200
committerUwe Kleine-König <ukleinek@kernel.org>2025-04-14 08:03:16 +0200
commit7cfe1e208b86c7fd4b35a8a502a8b15604eec1e0 (patch)
treedb2c4c0f970688274f2de8770d02985f92e26779
parentdf08fff8add2fbca9ab4513c169b39802d59907f (diff)
pwm: Make chip parameter to pwmchip_get_drvdata() a const pointer
dev_get_drvdata()'s parameter is a const pointer, so the chip passed to pwmchip_get_drvdata() can be const, too. Signed-off-by: Uwe Kleine-König <u.kleine-koenig@baylibre.com> Link: https://lore.kernel.org/r/20250403151134.266388-2-u.kleine-koenig@baylibre.com Signed-off-by: Uwe Kleine-König <ukleinek@kernel.org>
-rw-r--r--include/linux/pwm.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/linux/pwm.h b/include/linux/pwm.h
index 9ece4e5d3815..bf0469b2201d 100644
--- a/include/linux/pwm.h
+++ b/include/linux/pwm.h
@@ -369,7 +369,7 @@ static inline struct device *pwmchip_parent(const struct pwm_chip *chip)
return chip->dev.parent;
}
-static inline void *pwmchip_get_drvdata(struct pwm_chip *chip)
+static inline void *pwmchip_get_drvdata(const struct pwm_chip *chip)
{
return dev_get_drvdata(&chip->dev);
}