mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-07 19:30:30 +09:00
pwm: bcm-iproc: Prevent unloading the driver module while in use
[ Upstream commit24906a41ee] The owner member of struct pwm_ops must be set to THIS_MODULE to increase the reference count of the module such that the module cannot be removed while its code is in use. Fixes:daa5abc41c("pwm: Add support for Broadcom iProc PWM controller") Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Reviewed-by: Florian Fainelli <f.fainelli@gmail.com> Signed-off-by: Thierry Reding <thierry.reding@gmail.com> Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
e00630fa63
commit
339b3e9bb6
@@ -187,6 +187,7 @@ static int iproc_pwmc_apply(struct pwm_chip *chip, struct pwm_device *pwm,
|
||||
static const struct pwm_ops iproc_pwm_ops = {
|
||||
.apply = iproc_pwmc_apply,
|
||||
.get_state = iproc_pwmc_get_state,
|
||||
.owner = THIS_MODULE,
|
||||
};
|
||||
|
||||
static int iproc_pwmc_probe(struct platform_device *pdev)
|
||||
|
||||
Reference in New Issue
Block a user