[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <4389a861605420ef261dc7fb39955812320b8153.1375279948.git.viresh.kumar@linaro.org>
Date: Wed, 31 Jul 2013 19:49:18 +0530
From: Viresh Kumar <viresh.kumar@...aro.org>
To: rjw@...k.pl
Cc: linaro-kernel@...ts.linaro.org, patches@...aro.org,
cpufreq@...r.kernel.org, linux-pm@...r.kernel.org,
linux-kernel@...r.kernel.org, arnd.bergmann@...aro.org,
Viresh Kumar <viresh.kumar@...aro.org>,
Eric Miao <eric.y.miao@...il.com>
Subject: [PATCH 09/15] cpufreq: pxa: 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.
Cc: Eric Miao <eric.y.miao@...il.com>
Signed-off-by: Viresh Kumar <viresh.kumar@...aro.org>
---
drivers/cpufreq/pxa2xx-cpufreq.c | 1 +
drivers/cpufreq/pxa3xx-cpufreq.c | 1 +
2 files changed, 2 insertions(+)
diff --git a/drivers/cpufreq/pxa2xx-cpufreq.c b/drivers/cpufreq/pxa2xx-cpufreq.c
index fb3981a..d62781b 100644
--- a/drivers/cpufreq/pxa2xx-cpufreq.c
+++ b/drivers/cpufreq/pxa2xx-cpufreq.c
@@ -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",
};
diff --git a/drivers/cpufreq/pxa3xx-cpufreq.c b/drivers/cpufreq/pxa3xx-cpufreq.c
index 9c92ef0..81727ec 100644
--- a/drivers/cpufreq/pxa3xx-cpufreq.c
+++ b/drivers/cpufreq/pxa3xx-cpufreq.c
@@ -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",
};
--
1.7.12.rc2.18.g61b472e
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists