Skip to contentSkip to conversation

cpufreq: initialize drivers .owner field with THIS_MODULE

PATCH In review Viresh Kumar 7 participants 25 messages Jul 31, 2013 – Aug 14, 2013

Subsystems (4)
lore
Share & tools
lore

Viresh Kumar

author maintainer
#0 lore raw

cover cpufreq: initialize drivers .owner field with THIS_MODULE

CPUFreq core does following at multiple places:
module_{get|put}(cpufreq_driver->owner)).

This is done to make sure module doesn't get unloaded if it is currently in use. This will work only if the .owner field of cpufreq driver is initialized with a valid pointer.

This field wasn't initialized for many cpufreq driver, lets initialize it with THIS_MODULE.

Rebased over: v3.11-rc3 and pushed here:

https://git.linaro.org/gitweb?p=people/vireshk/linux.git;a=shortlog;h=refs/heads/cpufreq-fix-owner

Viresh Kumar (15):
cpufreq: arm_big_little: initialize .owner field with THIS_MODULE
cpufreq: cpufreq-cpu0: initialize .owner field with THIS_MODULE
cpufreq: davinci: initialize .owner field with THIS_MODULE
cpufreq: dbx500: initialize .owner field with THIS_MODULE
cpufreq: exynos: initialize .owner field with THIS_MODULE
cpufreq: imx6q: initialize .owner field with THIS_MODULE
cpufreq: integrator: initialize .owner field with THIS_MODULE
cpufreq: omap: initialize .owner field with THIS_MODULE
cpufreq: pxa: initialize .owner field with THIS_MODULE
cpufreq: s3c24xx: initialize .owner field with THIS_MODULE
cpufreq: s5pv210: initialize .owner field with THIS_MODULE
cpufreq: sa11**: initialize .owner field with THIS_MODULE
cpufreq: SPEAr: initialize .owner field with THIS_MODULE
cpufreq: Tegra: initialize .owner field with THIS_MODULE
cpufreq: Unicore: initialize .owner field with THIS_MODULE

 drivers/cpufreq/arm_big_little.c     | 1 +
 drivers/cpufreq/cpufreq-cpu0.c       | 1 +
 drivers/cpufreq/davinci-cpufreq.c    | 1 +
 drivers/cpufreq/dbx500-cpufreq.c     | 1 +
 drivers/cpufreq/exynos-cpufreq.c     | 1 +
 drivers/cpufreq/exynos5440-cpufreq.c | 1 +
 drivers/cpufreq/imx6q-cpufreq.c      | 1 +
 drivers/cpufreq/integrator-cpufreq.c | 1 +
 drivers/cpufreq/omap-cpufreq.c       | 1 +
 drivers/cpufreq/pxa2xx-cpufreq.c     | 1 +
 drivers/cpufreq/pxa3xx-cpufreq.c     | 1 +
 drivers/cpufreq/s3c24xx-cpufreq.c    | 1 +
 drivers/cpufreq/s5pv210-cpufreq.c    | 1 +
 drivers/cpufreq/sa1100-cpufreq.c     | 1 +
 drivers/cpufreq/sa1110-cpufreq.c     | 1 +
 drivers/cpufreq/spear-cpufreq.c      | 1 +
 drivers/cpufreq/tegra-cpufreq.c      | 1 +
 drivers/cpufreq/unicore2-cpufreq.c   | 1 +
 18 files changed, 18 insertions(+)
Signature · 1 line
1.7.12.rc2.18.g61b472e
author maintainer
#1 lore raw

PATCH 1/15 cpufreq: arm_big_little: initialize .owner field with THIS_MODULE

CPUFreq core does following at multiple places:
module_{get|put}(cpufreq_driver->owner)).

This is done to make sure module doesn't get unloaded if it is currently in use. This will work only if the .owner field of cpufreq driver is initialized with a valid pointer.

This field wasn't initialized for this driver, lets initialize it with THIS_MODULE.

---
 drivers/cpufreq/arm_big_little.c | 1 +
 1 file changed, 1 insertion(+)
drivers/cpufreq/arm_big_little.c +1 -0
index 3549f07..ba4d3b9 100644
@@ -221,6 +221,7 @@ static struct cpufreq_driver bL_cpufreq_driver = {
 	.init			= bL_cpufreq_init,
 	.exit			= bL_cpufreq_exit,
 	.have_governor_per_policy = true,
+	.owner			= THIS_MODULE,
 	.attr			= bL_cpufreq_attr,
 };
 
Signature · 1 line
1.7.12.rc2.18.g61b472e
author maintainer
#2 lore raw

PATCH 2/15 cpufreq: cpufreq-cpu0: initialize .owner field with THIS_MODULE

In reply to Viresh Kumar

CPUFreq core does following at multiple places:
module_{get|put}(cpufreq_driver->owner)).

This is done to make sure module doesn't get unloaded if it is currently in use. This will work only if the .owner field of cpufreq driver is initialized with a valid pointer.

This field wasn't initialized for this driver, lets initialize it with THIS_MODULE.

---
 drivers/cpufreq/cpufreq-cpu0.c | 1 +
 1 file changed, 1 insertion(+)
drivers/cpufreq/cpufreq-cpu0.c +1 -0
index ad1fde2..a087bf1 100644
@@ -169,6 +169,7 @@ static struct cpufreq_driver cpu0_cpufreq_driver = {
 	.init = cpu0_cpufreq_init,
 	.exit = cpu0_cpufreq_exit,
 	.name = "generic_cpu0",
+	.owner = THIS_MODULE,
 	.attr = cpu0_cpufreq_attr,
 };
 
Signature · 1 line
1.7.12.rc2.18.g61b472e
Acked-by on v1 2/15
#3 lore raw

Re: [PATCH 02/15] cpufreq: cpufreq-cpu0: initialize .owner field with THIS_MODULE

Quoted 7 lines · Viresh Kumar

CPUFreq core does following at multiple places:
module_{get|put}(cpufreq_driver->owner)).

This is done to make sure module doesn't get unloaded if it is currently in use. This will work only if the .owner field of cpufreq driver is initialized with a valid pointer.

Quoted 5 lines

This field wasn't initialized for this driver, lets initialize it with THIS_MODULE.

For this and imx6q-cpufreq one,

Quoted 19 lines
---
 drivers/cpufreq/cpufreq-cpu0.c | 1 +
 1 file changed, 1 insertion(+)
drivers/cpufreq/cpufreq-cpu0.c +1 -0
index ad1fde2..a087bf1 100644
@@ -169,6 +169,7 @@ static struct cpufreq_driver cpu0_cpufreq_driver = {
 	.init = cpu0_cpufreq_init,
 	.exit = cpu0_cpufreq_exit,
 	.name = "generic_cpu0",
+	.owner = THIS_MODULE,
 	.attr = cpu0_cpufreq_attr,
 };
 
Signature · 1 line
1.7.12.rc2.18.g61b472e
author maintainer
#4 lore raw

PATCH 3/15 cpufreq: davinci: initialize .owner field with THIS_MODULE

In reply to Viresh Kumar

CPUFreq core does following at multiple places:
module_{get|put}(cpufreq_driver->owner)).

This is done to make sure module doesn't get unloaded if it is currently in use. This will work only if the .owner field of cpufreq driver is initialized with a valid pointer.

This field wasn't initialized for this driver, lets initialize it with THIS_MODULE.

---
 drivers/cpufreq/davinci-cpufreq.c | 1 +
 1 file changed, 1 insertion(+)
drivers/cpufreq/davinci-cpufreq.c +1 -0
index 551dd65..db30e54 100644
@@ -178,6 +178,7 @@ static struct cpufreq_driver davinci_driver = {
 	.init		= davinci_cpu_init,
 	.exit		= davinci_cpu_exit,
 	.name		= "davinci",
+	.owner		= THIS_MODULE,
 	.attr		= davinci_cpufreq_attr,
 };
 
Signature · 1 line
1.7.12.rc2.18.g61b472e
author maintainer
#5 lore raw

PATCH 4/15 cpufreq: dbx500: initialize .owner field with THIS_MODULE

In reply to Viresh Kumar

CPUFreq core does following at multiple places:
module_{get|put}(cpufreq_driver->owner)).

This is done to make sure module doesn't get unloaded if it is currently in use. This will work only if the .owner field of cpufreq driver is initialized with a valid pointer.

This field wasn't initialized for this driver, lets initialize it with THIS_MODULE.

---
 drivers/cpufreq/dbx500-cpufreq.c | 1 +
 1 file changed, 1 insertion(+)
drivers/cpufreq/dbx500-cpufreq.c +1 -0
index 26321cd..2527f1d 100644
@@ -120,6 +120,7 @@ static struct cpufreq_driver dbx500_cpufreq_driver = {
 	.get    = dbx500_cpufreq_getspeed,
 	.init   = dbx500_cpufreq_init,
 	.name   = "DBX500",
+	.owner  = THIS_MODULE,
 	.attr   = dbx500_cpufreq_attr,
 };
 
Signature · 1 line
1.7.12.rc2.18.g61b472e
Acked-by on v1 4/15
#6 lore raw

Re: [PATCH 04/15] cpufreq: dbx500: initialize .owner field with THIS_MODULE

Quoted 7 lines · Viresh Kumar

CPUFreq core does following at multiple places:
module_{get|put}(cpufreq_driver->owner)).

This is done to make sure module doesn't get unloaded if it is currently in use. This will work only if the .owner field of cpufreq driver is initialized with a valid pointer.

Quoted 5 lines

This field wasn't initialized for this driver, lets initialize it with THIS_MODULE.

Yours,
Linus Walleij

author maintainer
#7 lore raw

PATCH 5/15 cpufreq: exynos: initialize .owner field with THIS_MODULE

In reply to Viresh Kumar

CPUFreq core does following at multiple places:
module_{get|put}(cpufreq_driver->owner)).

This is done to make sure module doesn't get unloaded if it is currently in use. This will work only if the .owner field of cpufreq driver is initialized with a valid pointer.

This field wasn't initialized for this driver, lets initialize it with THIS_MODULE.

---
 drivers/cpufreq/exynos-cpufreq.c     | 1 +
 drivers/cpufreq/exynos5440-cpufreq.c | 1 +
 2 files changed, 2 insertions(+)
drivers/cpufreq/exynos-cpufreq.c +1 -0
index 0d32f02..fe0bbce 100644
@@ -278,6 +278,7 @@ static struct cpufreq_driver exynos_driver = {
 	.init		= exynos_cpufreq_cpu_init,
 	.exit		= exynos_cpufreq_cpu_exit,
 	.name		= "exynos_cpufreq",
+	.owner		= THIS_MODULE,
 	.attr		= exynos_cpufreq_attr,
 #ifdef CONFIG_PM
 	.suspend	= exynos_cpufreq_suspend,
drivers/cpufreq/exynos5440-cpufreq.c +1 -0
index 0c74018..d0d353c 100644
@@ -344,6 +344,7 @@ static struct cpufreq_driver exynos_driver = {
 	.target		= exynos_target,
 	.get		= exynos_getspeed,
 	.init		= exynos_cpufreq_cpu_init,
+	.owner		= THIS_MODULE,
 	.name		= CPUFREQ_NAME,
 };
 
Signature · 1 line
1.7.12.rc2.18.g61b472e
author maintainer
#8 lore raw

PATCH 6/15 cpufreq: imx6q: initialize .owner field with THIS_MODULE

In reply to Viresh Kumar

CPUFreq core does following at multiple places:
module_{get|put}(cpufreq_driver->owner)).

This is done to make sure module doesn't get unloaded if it is currently in use. This will work only if the .owner field of cpufreq driver is initialized with a valid pointer.

This field wasn't initialized for this driver, lets initialize it with THIS_MODULE.

---
 drivers/cpufreq/imx6q-cpufreq.c | 1 +
 1 file changed, 1 insertion(+)
drivers/cpufreq/imx6q-cpufreq.c +1 -0
index e37cdae..adbda1a 100644
@@ -209,6 +209,7 @@ static struct cpufreq_driver imx6q_cpufreq_driver = {
 	.init = imx6q_cpufreq_init,
 	.exit = imx6q_cpufreq_exit,
 	.name = "imx6q-cpufreq",
+	.owner = THIS_MODULE,
 	.attr = imx6q_cpufreq_attr,
 };
 
Signature · 1 line
1.7.12.rc2.18.g61b472e
author maintainer
#9 lore raw

PATCH 7/15 cpufreq: integrator: initialize .owner field with THIS_MODULE

In reply to Viresh Kumar

CPUFreq core does following at multiple places:
module_{get|put}(cpufreq_driver->owner)).

This is done to make sure module doesn't get unloaded if it is currently in use. This will work only if the .owner field of cpufreq driver is initialized with a valid pointer.

This field wasn't initialized for this driver, lets initialize it with THIS_MODULE.

---
 drivers/cpufreq/integrator-cpufreq.c | 1 +
 1 file changed, 1 insertion(+)
drivers/cpufreq/integrator-cpufreq.c +1 -0
index f7c99df..7205ea3 100644
@@ -199,6 +199,7 @@ static struct cpufreq_driver integrator_driver = {
 	.target		= integrator_set_target,
 	.get		= integrator_get,
 	.init		= integrator_cpufreq_init,
+	.owner		= THIS_MODULE,
 	.name		= "integrator",
 };
 
Signature · 1 line
1.7.12.rc2.18.g61b472e
author maintainer
#10 lore raw

PATCH 8/15 cpufreq: omap: initialize .owner field with THIS_MODULE

In reply to Viresh Kumar

CPUFreq core does following at multiple places:
module_{get|put}(cpufreq_driver->owner)).

This is done to make sure module doesn't get unloaded if it is currently in use. This will work only if the .owner field of cpufreq driver is initialized with a valid pointer.

This field wasn't initialized for this driver, lets initialize it with THIS_MODULE.

Cc Santosh Shilimkar <[email protected]>
---
 drivers/cpufreq/omap-cpufreq.c | 1 +
 1 file changed, 1 insertion(+)
drivers/cpufreq/omap-cpufreq.c +1 -0
index f31fcfc..5b18385 100644
@@ -241,6 +241,7 @@ static struct cpufreq_driver omap_driver = {
 	.init		= omap_cpu_init,
 	.exit		= omap_cpu_exit,
 	.name		= "omap",
+	.owner		= THIS_MODULE,
 	.attr		= omap_cpufreq_attr,
 };
 
Signature · 1 line
1.7.12.rc2.18.g61b472e
Acked-by on v1 8/15
#11 lore raw

Re: [PATCH 08/15] cpufreq: omap: initialize .owner field with THIS_MODULE

Quoted 7 lines · Viresh Kumar

CPUFreq core does following at multiple places:
module_{get|put}(cpufreq_driver->owner)).

This is done to make sure module doesn't get unloaded if it is currently in use. This will work only if the .owner field of cpufreq driver is initialized with a valid pointer.

Quoted 6 lines

This field wasn't initialized for this driver, lets initialize it with THIS_MODULE.

Cc Santosh Shilimkar <[email protected]>

---

Looks fine.

author maintainer
#12 lore raw

PATCH 9/15 cpufreq: pxa: initialize .owner field with THIS_MODULE

In reply to Viresh Kumar

CPUFreq core does following at multiple places:
module_{get|put}(cpufreq_driver->owner)).

This is done to make sure module doesn't get unloaded if it is currently in use. This will work only if the .owner field of cpufreq driver is initialized with a valid pointer.

This field wasn't initialized for this driver, lets initialize it with THIS_MODULE.

---
 drivers/cpufreq/pxa2xx-cpufreq.c | 1 +
 drivers/cpufreq/pxa3xx-cpufreq.c | 1 +
 2 files changed, 2 insertions(+)
drivers/cpufreq/pxa2xx-cpufreq.c +1 -0
index fb3981a..d62781b 100644
@@ -468,6 +468,7 @@ static struct cpufreq_driver pxa_cpufreq_driver = {
 	.target	= pxa_set_target,
 	.init	= pxa_cpufreq_init,
 	.get	= pxa_cpufreq_get,
+	.owner	= THIS_MODULE,
 	.name	= "PXA2xx",
 };
 
drivers/cpufreq/pxa3xx-cpufreq.c +1 -0
index 9c92ef0..81727ec 100644
@@ -232,6 +232,7 @@ static struct cpufreq_driver pxa3xx_cpufreq_driver = {
 	.target		= pxa3xx_cpufreq_set,
 	.init		= pxa3xx_cpufreq_init,
 	.get		= pxa3xx_cpufreq_get,
+	.owner		= THIS_MODULE,
 	.name		= "pxa3xx-cpufreq",
 };
 
Signature · 1 line
1.7.12.rc2.18.g61b472e
author maintainer
#13 lore raw

PATCH 10/15 cpufreq: s3c24xx: initialize .owner field with THIS_MODULE

In reply to Viresh Kumar

CPUFreq core does following at multiple places:
module_{get|put}(cpufreq_driver->owner)).

This is done to make sure module doesn't get unloaded if it is currently in use. This will work only if the .owner field of cpufreq driver is initialized with a valid pointer.

This field wasn't initialized for this driver, lets initialize it with THIS_MODULE.

---
 drivers/cpufreq/s3c24xx-cpufreq.c | 1 +
 1 file changed, 1 insertion(+)
drivers/cpufreq/s3c24xx-cpufreq.c +1 -0
index 87781eb..c5a46cc 100644
@@ -479,6 +479,7 @@ static struct cpufreq_driver s3c24xx_driver = {
 	.init		= s3c_cpufreq_init,
 	.suspend	= s3c_cpufreq_suspend,
 	.resume		= s3c_cpufreq_resume,
+	.owner		= THIS_MODULE,
 	.name		= "s3c24xx",
 };
 
Signature · 1 line
1.7.12.rc2.18.g61b472e
author maintainer
#14 lore raw

PATCH 11/15 cpufreq: s5pv210: initialize .owner field with THIS_MODULE

In reply to Viresh Kumar

CPUFreq core does following at multiple places:
module_{get|put}(cpufreq_driver->owner)).

This is done to make sure module doesn't get unloaded if it is currently in use. This will work only if the .owner field of cpufreq driver is initialized with a valid pointer.

This field wasn't initialized for this driver, lets initialize it with THIS_MODULE.

---
 drivers/cpufreq/s5pv210-cpufreq.c | 1 +
 1 file changed, 1 insertion(+)
drivers/cpufreq/s5pv210-cpufreq.c +1 -0
index 5c77570..9ebad24 100644
@@ -609,6 +609,7 @@ static struct cpufreq_driver s5pv210_driver = {
 	.target		= s5pv210_target,
 	.get		= s5pv210_getspeed,
 	.init		= s5pv210_cpu_init,
+	.owner		= THIS_MODULE,
 	.name		= "s5pv210",
 #ifdef CONFIG_PM
 	.suspend	= s5pv210_cpufreq_suspend,
Signature · 1 line
1.7.12.rc2.18.g61b472e
author maintainer
#15 lore raw

PATCH 12/15 cpufreq: sa11**: initialize .owner field with THIS_MODULE

In reply to Viresh Kumar

CPUFreq core does following at multiple places:
module_{get|put}(cpufreq_driver->owner)).

This is done to make sure module doesn't get unloaded if it is currently in use. This will work only if the .owner field of cpufreq driver is initialized with a valid pointer.

This field wasn't initialized for this driver, lets initialize it with THIS_MODULE.

---
 drivers/cpufreq/sa1100-cpufreq.c | 1 +
 drivers/cpufreq/sa1110-cpufreq.c | 1 +
 2 files changed, 2 insertions(+)
drivers/cpufreq/sa1100-cpufreq.c +1 -0
index cff18e8..f41dbd7 100644
@@ -233,6 +233,7 @@ static struct cpufreq_driver sa1100_driver __refdata = {
 	.target		= sa1100_target,
 	.get		= sa11x0_getspeed,
 	.init		= sa1100_cpu_init,
+	.owner		= THIS_MODULE,
 	.name		= "sa1100",
 };
 
drivers/cpufreq/sa1110-cpufreq.c +1 -0
index 39c90b6..61627fb 100644
@@ -349,6 +349,7 @@ static struct cpufreq_driver sa1110_driver __refdata = {
 	.target		= sa1110_target,
 	.get		= sa11x0_getspeed,
 	.init		= sa1110_cpu_init,
+	.owner		= THIS_MODULE,
 	.name		= "sa1110",
 };
 
Signature · 1 line
1.7.12.rc2.18.g61b472e
author maintainer
#16 lore raw

PATCH 13/15 cpufreq: SPEAr: initialize .owner field with THIS_MODULE

In reply to Viresh Kumar

CPUFreq core does following at multiple places:
module_{get|put}(cpufreq_driver->owner)).

This is done to make sure module doesn't get unloaded if it is currently in use. This will work only if the .owner field of cpufreq driver is initialized with a valid pointer.

This field wasn't initialized for this driver, lets initialize it with THIS_MODULE.

---
 drivers/cpufreq/spear-cpufreq.c | 1 +
 1 file changed, 1 insertion(+)
drivers/cpufreq/spear-cpufreq.c +1 -0
index c3efa7f..3c00dd5 100644
@@ -212,6 +212,7 @@ static struct cpufreq_driver spear_cpufreq_driver = {
 	.get		= spear_cpufreq_get,
 	.init		= spear_cpufreq_init,
 	.exit		= spear_cpufreq_exit,
+	.owner		= THIS_MODULE,
 	.attr		= spear_cpufreq_attr,
 };
 
Signature · 1 line
1.7.12.rc2.18.g61b472e
author maintainer
#17 lore raw

PATCH 14/15 cpufreq: Tegra: initialize .owner field with THIS_MODULE

In reply to Viresh Kumar

CPUFreq core does following at multiple places:
module_{get|put}(cpufreq_driver->owner)).

This is done to make sure module doesn't get unloaded if it is currently in use. This will work only if the .owner field of cpufreq driver is initialized with a valid pointer.

This field wasn't initialized for this driver, lets initialize it with THIS_MODULE.

Cc Stephen Warren <[email protected]>
---
 drivers/cpufreq/tegra-cpufreq.c | 1 +
 1 file changed, 1 insertion(+)
drivers/cpufreq/tegra-cpufreq.c +1 -0
index cd66b85..fc0ea61 100644
@@ -250,6 +250,7 @@ static struct cpufreq_driver tegra_cpufreq_driver = {
 	.init		= tegra_cpu_init,
 	.exit		= tegra_cpu_exit,
 	.name		= "tegra",
+	.owner		= THIS_MODULE,
 	.attr		= tegra_cpufreq_attr,
 };
 
Signature · 1 line
1.7.12.rc2.18.g61b472e
Acked-by on v1 14/15
#18 lore raw

Re: [PATCH 14/15] cpufreq: Tegra: initialize .owner field with THIS_MODULE

Quoted 9 lines · Viresh Kumar

CPUFreq core does following at multiple places:
module_{get|put}(cpufreq_driver->owner)).

This is done to make sure module doesn't get unloaded if it is currently in use. This will work only if the .owner field of cpufreq driver is initialized with a valid pointer.

This field wasn't initialized for this driver, lets initialize it with THIS_MODULE.

I assume this is all part of a series you'll take through the cpufreq tree.

#19 lore raw

Re: [PATCH 14/15] cpufreq: Tegra: initialize .owner field with THIS_MODULE

Quoted 8 lines · Stephen Warren
Quoted 7 lines · Viresh Kumar

CPUFreq core does following at multiple places:
module_{get|put}(cpufreq_driver->owner)).

This is done to make sure module doesn't get unloaded if it is currently in use. This will work only if the .owner field of cpufreq driver is initialized with a valid pointer.

Quoted 6 lines
Quoted 2 lines

This field wasn't initialized for this driver, lets initialize it with THIS_MODULE.

I assume this is all part of a series you'll take through the cpufreq tree.

I'm going to apply this series eventually, but I'd like some ACKs to accumulate before doing that.

Thanks,
Rafael

Signature · 2 lines
I speak only for myself.
Rafael J. Wysocki, Intel Open Source Technology Center.
author maintainer
#20 lore raw

PATCH 15/15 cpufreq: Unicore: initialize .owner field with THIS_MODULE

In reply to Viresh Kumar

CPUFreq core does following at multiple places:
module_{get|put}(cpufreq_driver->owner)).

This is done to make sure module doesn't get unloaded if it is currently in use. This will work only if the .owner field of cpufreq driver is initialized with a valid pointer.

This field wasn't initialized for this driver, lets initialize it with THIS_MODULE.

---
 drivers/cpufreq/unicore2-cpufreq.c | 1 +
 1 file changed, 1 insertion(+)
drivers/cpufreq/unicore2-cpufreq.c +1 -0
index 12fc904..93519f7 100644
@@ -81,6 +81,7 @@ static struct cpufreq_driver ucv2_driver = {
 	.target		= ucv2_target,
 	.get		= ucv2_getspeed,
 	.init		= ucv2_cpu_init,
+	.owner		= THIS_MODULE,
 	.name		= "UniCore-II",
 };
 
Signature · 1 line
1.7.12.rc2.18.g61b472e
#21 lore raw
In reply to Viresh Kumar

Hi Viresh,

Quoted 9 lines · Viresh Kumar

CPUFreq core does following at multiple places:
module_{get|put}(cpufreq_driver->owner)).

This is done to make sure module doesn't get unloaded if it is currently in use. This will work only if the .owner field of cpufreq driver is initialized with a valid pointer.

This field wasn't initialized for many cpufreq driver, lets initialize it with THIS_MODULE.

Isn't it possible to do this inside cpufreq_register_driver function in a similar way as done for platform_driver_register [1].

[1] https://lkml.org/lkml/2013/5/25/5

Signature · 2 lines
With warm regards,
Sachin
author maintainer
#22 lore raw
Quoted 10 lines · Sachin Kamat

Hi Viresh,

Quoted 7 lines · Viresh Kumar

CPUFreq core does following at multiple places:
module_{get|put}(cpufreq_driver->owner)).

This is done to make sure module doesn't get unloaded if it is currently in use. This will work only if the .owner field of cpufreq driver is initialized with a valid pointer.

Quoted 8 lines
Quoted 2 lines

This field wasn't initialized for many cpufreq driver, lets initialize it with THIS_MODULE.

Isn't it possible to do this inside cpufreq_register_driver function in a similar way as done for platform_driver_register [1].

[1] https://lkml.org/lkml/2013/5/25/5

Don't know if its possible to set it to something other than THIS_MODULE. In which case we want something else to be done.

#23 lore raw
Quoted 15 lines · Viresh Kumar
Quoted 14 lines · Sachin Kamat

Hi Viresh,

Quoted 9 lines · Viresh Kumar

CPUFreq core does following at multiple places:
module_{get|put}(cpufreq_driver->owner)).

This is done to make sure module doesn't get unloaded if it is currently in use. This will work only if the .owner field of cpufreq driver is initialized with a valid pointer.

This field wasn't initialized for many cpufreq driver, lets initialize it with THIS_MODULE.

Quoted 7 lines
Quoted 4 lines

Isn't it possible to do this inside cpufreq_register_driver function in a similar way as done for platform_driver_register [1].

[1] https://lkml.org/lkml/2013/5/25/5

Don't know if its possible to set it to something other than THIS_MODULE. In which case we want something else to be done.

Even I am curious to know if it is possible to set the owner to something other than THIS_MODULE.

Signature · 2 lines
With warm regards,
Sachin
author maintainer
#24 lore raw
In reply to Viresh Kumar
Quoted 9 lines · Viresh Kumar

CPUFreq core does following at multiple places:
module_{get|put}(cpufreq_driver->owner)).

This is done to make sure module doesn't get unloaded if it is currently in use. This will work only if the .owner field of cpufreq driver is initialized with a valid pointer.

This field wasn't initialized for many cpufreq driver, lets initialize it with THIS_MODULE.

You can drop this patchset now as .owner field is removed in the latest patchset from me which is posted today:

"[PATCH 00/10] CPUFreq: Fixes & Cleanups for 3.12"