Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 24906a41 authored by Uwe Kleine-König's avatar Uwe Kleine-König Committed by Thierry Reding
Browse files

pwm: bcm-iproc: Prevent unloading the driver module while in use



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: daa5abc4 ("pwm: Add support for Broadcom iProc PWM controller")
Signed-off-by: default avatarUwe Kleine-König <u.kleine-koenig@pengutronix.de>
Reviewed-by: default avatarFlorian Fainelli <f.fainelli@gmail.com>
Signed-off-by: default avatarThierry Reding <thierry.reding@gmail.com>
parent 40a6b9a0
Loading
Loading
Loading
Loading
+1 −0
Original line number Original line Diff line number Diff line
@@ -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 = {
static const struct pwm_ops iproc_pwm_ops = {
	.apply = iproc_pwmc_apply,
	.apply = iproc_pwmc_apply,
	.get_state = iproc_pwmc_get_state,
	.get_state = iproc_pwmc_get_state,
	.owner = THIS_MODULE,
};
};


static int iproc_pwmc_probe(struct platform_device *pdev)
static int iproc_pwmc_probe(struct platform_device *pdev)