diff options
author | Uwe Kleine-König <u.kleine-koenig@pengutronix.de> | 2021-07-07 18:27:50 +0200 |
---|---|---|
committer | Thierry Reding <thierry.reding@gmail.com> | 2021-09-02 21:38:36 +0200 |
commit | 020162d6f49f2963062229814a56a89c86cbeaa8 (patch) | |
tree | ff818e000d85d764237bc3c705ca38179696e4a6 /kernel/audit_fsnotify.c | |
parent | 3d2813fb17e5fd0d73c1d1442ca0192bde4af10e (diff) | |
download | linux-stable-020162d6f49f2963062229814a56a89c86cbeaa8.tar.gz linux-stable-020162d6f49f2963062229814a56a89c86cbeaa8.tar.bz2 linux-stable-020162d6f49f2963062229814a56a89c86cbeaa8.zip |
pwm: mxs: Don't modify HW state in .probe() after the PWM chip was registered
This fixes a race condition: After pwmchip_add() is called there might
already be a consumer and then modifying the hardware behind the
consumer's back is bad. So reset before calling pwmchip_add().
Note that reseting the hardware isn't the right thing to do if the PWM
is already running as it might e.g. disable (or even enable) a backlight
that is supposed to be on (or off).
Fixes: 4dce82c1e840 ("pwm: add pwm-mxs support")
Cc: Sascha Hauer <s.hauer@pengutronix.de>
Cc: Shawn Guo <shawnguo@kernel.org>
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Thierry Reding <thierry.reding@gmail.com>
Diffstat (limited to 'kernel/audit_fsnotify.c')
0 files changed, 0 insertions, 0 deletions