linux-acpi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [patch 1/6] git-acpi-fix-cpuidle-borkage 2
@ 2007-03-06 10:29 akpm
  2007-03-07  8:01 ` Len Brown
  0 siblings, 1 reply; 2+ messages in thread
From: akpm @ 2007-03-06 10:29 UTC (permalink / raw)
  To: lenb; +Cc: linux-acpi, akpm, venkatesh.pallipadi, abelay, len.brown,
	shaohua.li

From: Venkatesh Pallipadi <venkatesh.pallipadi@intel.com>

Fix the compile issues when CPU_IDLE is not configured.

Signed-off-by: Venkatesh Pallipadi <venkatesh.pallipadi@intel.com>
Cc: Adam Belay <abelay@novell.com>
Cc: Shaohua Li <shaohua.li@intel.com>
Cc: Len Brown <len.brown@intel.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---

 include/linux/cpuidle.h |   23 +++++++++++++++++++++++
 1 file changed, 23 insertions(+)

diff -puN include/linux/cpuidle.h~git-acpi-fix-cpuidle-borkage-2 include/linux/cpuidle.h
--- a/include/linux/cpuidle.h~git-acpi-fix-cpuidle-borkage-2
+++ a/include/linux/cpuidle.h
@@ -130,10 +130,21 @@ struct cpuidle_driver {
 	struct module 		*owner;
 };
 
+#ifdef CONFIG_CPU_IDLE
+
 extern int cpuidle_register_driver(struct cpuidle_driver *drv);
 extern void cpuidle_unregister_driver(struct cpuidle_driver *drv);
 extern int cpuidle_force_redetect(struct cpuidle_device *dev);
 
+#else
+
+static inline int cpuidle_register_driver(struct cpuidle_driver *drv)
+{return 0;}
+static inline void cpuidle_unregister_driver(struct cpuidle_driver *drv) { }
+static inline int cpuidle_force_redetect(struct cpuidle_device *dev)
+{return 0;}
+
+#endif
 
 /******************************
  * CPUIDLE GOVERNOR INTERFACE *
@@ -153,8 +164,20 @@ struct cpuidle_governor {
 	struct module 		*owner;
 };
 
+#ifdef CONFIG_CPU_IDLE
+
 extern int cpuidle_register_governor(struct cpuidle_governor *gov);
 extern void cpuidle_unregister_governor(struct cpuidle_governor *gov);
 extern int cpuidle_get_bm_activity(void);
 
+#else
+
+static inline int cpuidle_register_governor(struct cpuidle_governor *gov)
+{return 0;}
+static inline void cpuidle_unregister_governor(struct cpuidle_governor *gov) { }
+static inline int cpuidle_get_bm_activity(void)
+{return 0;}
+
+#endif
+
 #endif /* _LINUX_CPUIDLE_H */
_

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [patch 1/6] git-acpi-fix-cpuidle-borkage 2
  2007-03-06 10:29 [patch 1/6] git-acpi-fix-cpuidle-borkage 2 akpm
@ 2007-03-07  8:01 ` Len Brown
  0 siblings, 0 replies; 2+ messages in thread
From: Len Brown @ 2007-03-07  8:01 UTC (permalink / raw)
  To: akpm; +Cc: linux-acpi, venkatesh.pallipadi, abelay, shaohua.li

Applied.

thanks,
-Len

On Tuesday 06 March 2007 05:29, akpm@linux-foundation.org wrote:
> From: Venkatesh Pallipadi <venkatesh.pallipadi@intel.com>
> 
> Fix the compile issues when CPU_IDLE is not configured.
> 
> Signed-off-by: Venkatesh Pallipadi <venkatesh.pallipadi@intel.com>
> Cc: Adam Belay <abelay@novell.com>
> Cc: Shaohua Li <shaohua.li@intel.com>
> Cc: Len Brown <len.brown@intel.com>
> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
> ---
> 
>  include/linux/cpuidle.h |   23 +++++++++++++++++++++++
>  1 file changed, 23 insertions(+)
> 
> diff -puN include/linux/cpuidle.h~git-acpi-fix-cpuidle-borkage-2 include/linux/cpuidle.h
> --- a/include/linux/cpuidle.h~git-acpi-fix-cpuidle-borkage-2
> +++ a/include/linux/cpuidle.h
> @@ -130,10 +130,21 @@ struct cpuidle_driver {
>  	struct module 		*owner;
>  };
>  
> +#ifdef CONFIG_CPU_IDLE
> +
>  extern int cpuidle_register_driver(struct cpuidle_driver *drv);
>  extern void cpuidle_unregister_driver(struct cpuidle_driver *drv);
>  extern int cpuidle_force_redetect(struct cpuidle_device *dev);
>  
> +#else
> +
> +static inline int cpuidle_register_driver(struct cpuidle_driver *drv)
> +{return 0;}
> +static inline void cpuidle_unregister_driver(struct cpuidle_driver *drv) { }
> +static inline int cpuidle_force_redetect(struct cpuidle_device *dev)
> +{return 0;}
> +
> +#endif
>  
>  /******************************
>   * CPUIDLE GOVERNOR INTERFACE *
> @@ -153,8 +164,20 @@ struct cpuidle_governor {
>  	struct module 		*owner;
>  };
>  
> +#ifdef CONFIG_CPU_IDLE
> +
>  extern int cpuidle_register_governor(struct cpuidle_governor *gov);
>  extern void cpuidle_unregister_governor(struct cpuidle_governor *gov);
>  extern int cpuidle_get_bm_activity(void);
>  
> +#else
> +
> +static inline int cpuidle_register_governor(struct cpuidle_governor *gov)
> +{return 0;}
> +static inline void cpuidle_unregister_governor(struct cpuidle_governor *gov) { }
> +static inline int cpuidle_get_bm_activity(void)
> +{return 0;}
> +
> +#endif
> +
>  #endif /* _LINUX_CPUIDLE_H */
> _
> 

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2007-03-07  8:02 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-03-06 10:29 [patch 1/6] git-acpi-fix-cpuidle-borkage 2 akpm
2007-03-07  8:01 ` Len Brown

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).