From: Uwe Kleine-König Date: Thu, 3 Apr 2025 15:11:32 +0000 (+0200) Subject: pwm: Make chip parameter to pwmchip_get_drvdata() a const pointer X-Git-Tag: v6.16-rc1~25^2~26 X-Git-Url: https://git.kernel.dk/?a=commitdiff_plain;h=7cfe1e208b86c7fd4b35a8a502a8b15604eec1e0;p=linux-block.git 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 Link: https://lore.kernel.org/r/20250403151134.266388-2-u.kleine-koenig@baylibre.com Signed-off-by: Uwe Kleine-König --- 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); }