projects
/
linux-block.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
df08fff
)
pwm: Make chip parameter to pwmchip_get_drvdata() a const pointer
author
Uwe Kleine-König
<u.kleine-koenig@baylibre.com>
Thu, 3 Apr 2025 15:11:32 +0000
(17:11 +0200)
committer
Uwe Kleine-König
<ukleinek@kernel.org>
Mon, 14 Apr 2025 06:03:16 +0000
(08:03 +0200)
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>
include/linux/pwm.h
patch
|
blob
|
blame
|
history
diff --git
a/include/linux/pwm.h
b/include/linux/pwm.h
index 9ece4e5d3815752248b73c27d851f95df6821740..bf0469b2201d20c5bd6453a307419023dd21f47c 100644
(file)
--- 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);
}