Linux Kernels

pwm: twl-led: Add .owner to struct pwm_ops

This change “pwm: twl-led: Add .owner to struct pwm_ops” (commit 7fa2531) in Linux kernel is authored by Axel Lin <axel.lin [at] ingics.com> on Sun Mar 31 11:16:14 2013 +0800.

Description of "pwm: twl-led: Add .owner to struct pwm_ops"

The change “pwm: twl-led: Add .owner to struct pwm_ops” introduces changes as follows.

pwm: twl-led: Add .owner to struct pwm_ops

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

Signed-off-by: Axel Lin <axel.lin@ingics.com>
Acked-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Signed-off-by: Thierry Reding <thierry.reding@avionic-design.de>

Linux kernel releases containing commit 7fa2531

The Linux kernel releases containing this commit are as follows.

Linux kernel code changes from "pwm: twl-led: Add .owner to struct pwm_ops"

There are 2 lines of Linux source code added/deleted in this change. Code changes to Linux kernel are as follows.

 drivers/pwm/pwm-twl-led.c | 2 ++
 1 file changed, 2 insertions(+)
 
diff --git a/drivers/pwm/pwm-twl-led.c b/drivers/pwm/pwm-twl-led.c
index 83e25d45d640..f912e87aed88 100644
--- a/drivers/pwm/pwm-twl-led.c
+++ b/drivers/pwm/pwm-twl-led.c
@@ -271,6 +271,7 @@ static const struct pwm_ops twl4030_pwmled_ops = {
 	.enable = twl4030_pwmled_enable,
 	.disable = twl4030_pwmled_disable,
 	.config = twl4030_pwmled_config,
+	.owner = THIS_MODULE,
 };
 
 static const struct pwm_ops twl6030_pwmled_ops = {
@@ -279,6 +280,7 @@ static const struct pwm_ops twl6030_pwmled_ops = {
 	.config = twl6030_pwmled_config,
 	.request = twl6030_pwmled_request,
 	.free = twl6030_pwmled_free,
+	.owner = THIS_MODULE,
 };
 
 static int twl_pwmled_probe(struct platform_device *pdev)

The commit for this change in Linux stable tree is 7fa2531 (patch).

Last modified: 2020/01/11 09:51