diff options
author | 2020-12-03 09:41:42 +0100 | |
---|---|---|
committer | 2020-12-03 09:57:37 -0800 | |
commit | 062c9cdf60a1e581b1002d372f1cf8e745fe3c16 (patch) | |
tree | fe543769ae6a1a21d84c78cd9dc635f79a8865a3 /fs | |
parent | lib/syscall: fix syscall registers retrieval on 32-bit platforms (diff) | |
download | linux-062c9cdf60a1e581b1002d372f1cf8e745fe3c16.tar.gz linux-062c9cdf60a1e581b1002d372f1cf8e745fe3c16.tar.bz2 linux-062c9cdf60a1e581b1002d372f1cf8e745fe3c16.zip |
pwm: sl28cpld: fix getting driver data in pwm callbacks
Currently .get_state() and .apply() use dev_get_drvdata() on the struct
device related to the pwm chip. This only works after .probe() called
platform_set_drvdata() which in this driver happens only after
pwmchip_add() and so comes possibly too late.
Instead of setting the driver data earlier use the traditional
container_of approach as this way the driver data is conceptually and
computational nearer.
Fixes: 9db33d221efc ("pwm: Add support for sl28cpld PWM controller")
Tested-by: Michael Walle <michael@walle.cc>
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'fs')
0 files changed, 0 insertions, 0 deletions