Signed-off-by: Kevin Hilman <khil...@deeprootsystems.com>
---
 arch/arm/plat-omap/omap-pm-srf.c |    7 +++++++
 1 files changed, 7 insertions(+), 0 deletions(-)

diff --git a/arch/arm/plat-omap/omap-pm-srf.c b/arch/arm/plat-omap/omap-pm-srf.c
index 5ebcda3..bf9163e 100644
--- a/arch/arm/plat-omap/omap-pm-srf.c
+++ b/arch/arm/plat-omap/omap-pm-srf.c
@@ -29,6 +29,8 @@
 #define LAT_RES_POSTAMBLE "_latency"
 #define MAX_LATENCY_RES_NAME 30
 
+static int initialized;
+
 /**
  * get_lat_res_name - gets the latency resource name given a power domain name
  * @pwrdm_name: Name of the power domain.
@@ -52,6 +54,9 @@ void get_lat_res_name(const char *pwrdm_name, char 
**lat_name, int size)
 
 void omap_pm_set_max_mpu_wakeup_lat(struct device *dev, long t)
 {
+       if (!initialized)
+               return;
+
        if (!dev || t < -1) {
                WARN_ON(1);
                return;
@@ -291,6 +296,8 @@ int __init omap_pm_if_early_init(void)
 int __init omap_pm_if_init(void)
 {
        resource_init(resources_omap);
+       initialized = 1;
+
        return 0;
 }
 
-- 
1.7.0.2

--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to