diff mbox

PM/Domains: Fix compilation warning

Message ID 1346919537-13794-1-git-send-email-sachin.kamat@linaro.org
State Accepted
Headers show

Commit Message

Sachin Kamat Sept. 6, 2012, 8:18 a.m. UTC
Function genpd_start_dev_no_timing was accessed inside CONFIG_PM_RUNTIME
macro but defined outside it. When the above macro was not defined the
compiler gave the following warning:

drivers/base/power/domain.c:96:12: warning:
‘genpd_start_dev_no_timing’ defined but not used [-Wunused-function]

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
---
 drivers/base/power/domain.c |   12 ++++++------
 1 files changed, 6 insertions(+), 6 deletions(-)

Comments

Rafael J. Wysocki Sept. 6, 2012, 9:36 p.m. UTC | #1
On Thursday, September 06, 2012, Sachin Kamat wrote:
> Function genpd_start_dev_no_timing was accessed inside CONFIG_PM_RUNTIME
> macro but defined outside it. When the above macro was not defined the
> compiler gave the following warning:
> 
> drivers/base/power/domain.c:96:12: warning:
> ‘genpd_start_dev_no_timing’ defined but not used [-Wunused-function]
> 
> Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>

Applied to the linux-next brach of the linux-pm.git tree as v3.7 material.

Thanks,
Rafael


> ---
>  drivers/base/power/domain.c |   12 ++++++------
>  1 files changed, 6 insertions(+), 6 deletions(-)
> 
> diff --git a/drivers/base/power/domain.c b/drivers/base/power/domain.c
> index 12ad070..c22b869 100644
> --- a/drivers/base/power/domain.c
> +++ b/drivers/base/power/domain.c
> @@ -93,12 +93,6 @@ static int genpd_start_dev(struct generic_pm_domain *genpd, struct device *dev)
>  					start_latency_ns, "start");
>  }
>  
> -static int genpd_start_dev_no_timing(struct generic_pm_domain *genpd,
> -				     struct device *dev)
> -{
> -	return GENPD_DEV_CALLBACK(genpd, int, start, dev);
> -}
> -
>  static bool genpd_sd_counter_dec(struct generic_pm_domain *genpd)
>  {
>  	bool ret = false;
> @@ -296,6 +290,12 @@ int pm_genpd_name_poweron(const char *domain_name)
>  
>  #ifdef CONFIG_PM_RUNTIME
>  
> +static int genpd_start_dev_no_timing(struct generic_pm_domain *genpd,
> +				     struct device *dev)
> +{
> +	return GENPD_DEV_CALLBACK(genpd, int, start, dev);
> +}
> +
>  static int genpd_save_dev(struct generic_pm_domain *genpd, struct device *dev)
>  {
>  	return GENPD_DEV_TIMED_CALLBACK(genpd, int, save_state, dev,
>
diff mbox

Patch

diff --git a/drivers/base/power/domain.c b/drivers/base/power/domain.c
index 12ad070..c22b869 100644
--- a/drivers/base/power/domain.c
+++ b/drivers/base/power/domain.c
@@ -93,12 +93,6 @@  static int genpd_start_dev(struct generic_pm_domain *genpd, struct device *dev)
 					start_latency_ns, "start");
 }
 
-static int genpd_start_dev_no_timing(struct generic_pm_domain *genpd,
-				     struct device *dev)
-{
-	return GENPD_DEV_CALLBACK(genpd, int, start, dev);
-}
-
 static bool genpd_sd_counter_dec(struct generic_pm_domain *genpd)
 {
 	bool ret = false;
@@ -296,6 +290,12 @@  int pm_genpd_name_poweron(const char *domain_name)
 
 #ifdef CONFIG_PM_RUNTIME
 
+static int genpd_start_dev_no_timing(struct generic_pm_domain *genpd,
+				     struct device *dev)
+{
+	return GENPD_DEV_CALLBACK(genpd, int, start, dev);
+}
+
 static int genpd_save_dev(struct generic_pm_domain *genpd, struct device *dev)
 {
 	return GENPD_DEV_TIMED_CALLBACK(genpd, int, save_state, dev,