https://github.com/torvalds/linux
Revision 062c9cdf60a1e581b1002d372f1cf8e745fe3c16 authored by Uwe Kleine-König on 03 December 2020, 08:41:42 UTC, committed by Linus Torvalds on 03 December 2020, 17:57:37 UTC
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>
1 parent 4f134b8
History
Tip revision: 062c9cdf60a1e581b1002d372f1cf8e745fe3c16 authored by Uwe Kleine-König on 03 December 2020, 08:41:42 UTC
pwm: sl28cpld: fix getting driver data in pwm callbacks
Tip revision: 062c9cd
File Mode Size
Documentation
LICENSES
arch
block
certs
crypto
drivers
fs
include
init
ipc
kernel
lib
mm
net
samples
scripts
security
sound
tools
usr
virt
.clang-format -rw-r--r-- 16.3 KB
.cocciconfig -rw-r--r-- 59 bytes
.get_maintainer.ignore -rw-r--r-- 71 bytes
.gitattributes -rw-r--r-- 62 bytes
.gitignore -rw-r--r-- 1.8 KB
.mailmap -rw-r--r-- 17.7 KB
COPYING -rw-r--r-- 496 bytes
CREDITS -rw-r--r-- 98.0 KB
Kbuild -rw-r--r-- 1.3 KB
Kconfig -rw-r--r-- 555 bytes
MAINTAINERS -rw-r--r-- 562.3 KB
Makefile -rw-r--r-- 62.6 KB
README -rw-r--r-- 727 bytes

README

back to top