Skip to contentSkip to conversation

pwm: pca9685: Add .owner to struct pwm_ops

PATCH In review Axel Lin 2 participants 2 messages Jun 19, 2013 – Jun 20, 2013 PWM

lore
Share & tools
lore

Axel Lin

author
#0 lore raw

PATCH 1/1 pwm: pca9685: Add .owner to struct pwm_ops

Add missing .owner of struct pwm_ops. This prevents the module from being removed from underneath its users.

---
 drivers/pwm/pwm-pca9685.c | 1 +
 1 file changed, 1 insertion(+)
drivers/pwm/pwm-pca9685.c +1 -0
index 2afc904..c9f9e65 100644
@@ -199,6 +199,7 @@ static const struct pwm_ops pca9685_pwm_ops = {
 	.config = pca9685_pwm_config,
 	.request = pca9685_pwm_request,
 	.free = pca9685_pwm_free,
+	.owner = THIS_MODULE,
 };
 
 static struct regmap_config pca9685_regmap_i2c_config = {
Signature · 1 line
1.8.1.2
#1 lore raw
Quoted 13 lines · Axel Lin

Add missing .owner of struct pwm_ops. This prevents the module from being removed from underneath its users.

---
 drivers/pwm/pwm-pca9685.c | 1 +
 1 file changed, 1 insertion(+)
drivers/pwm/pwm-pca9685.c +0 -0
index 2afc904..c9f9e65 100644

drivers/pwm/pwm-pca9685.c static const struct pwm_ops pca9685_pwm_ops = { · line 205

Quoted 7 lines
drivers/pwm/pwm-pca9685.c +1 -0
@@ -199,6 +199,7 @@ static const struct pwm_ops pca9685_pwm_ops = {
 	.config = pca9685_pwm_config,
 	.request = pca9685_pwm_request,
 	.free = pca9685_pwm_free,
+	.owner = THIS_MODULE,
 };
 
 static struct regmap_config pca9685_regmap_i2c_config = {

Hi Axel,

I've already posted a patch for this (and a few other missing .owner fields) a few days ago. I've now pushed it to my for-next branch.

Thierry