cpuidle: fail to register if !CONFIG_CPU_IDLE
authorLen Brown <len.brown@intel.com>
Tue, 11 May 2010 20:50:52 +0000 (16:50 -0400)
committerLen Brown <len.brown@intel.com>
Thu, 27 May 2010 05:56:24 +0000 (01:56 -0400)
Signed-off-by: Len Brown <len.brown@intel.com>
include/linux/cpuidle.h

index dcf77fa..f5e6480 100644 (file)
@@ -137,16 +137,16 @@ extern void cpuidle_disable_device(struct cpuidle_device *dev);
 #else
 
 static inline int cpuidle_register_driver(struct cpuidle_driver *drv)
-{return 0;}
+{return -ENODEV; }
 static inline void cpuidle_unregister_driver(struct cpuidle_driver *drv) { }
 static inline int cpuidle_register_device(struct cpuidle_device *dev)
-{return 0;}
+{return -ENODEV; }
 static inline void cpuidle_unregister_device(struct cpuidle_device *dev) { }
 
 static inline void cpuidle_pause_and_lock(void) { }
 static inline void cpuidle_resume_and_unlock(void) { }
 static inline int cpuidle_enable_device(struct cpuidle_device *dev)
-{return 0;}
+{return -ENODEV; }
 static inline void cpuidle_disable_device(struct cpuidle_device *dev) { }
 
 #endif