RE: Build error at drivers/base/power/domain_governor.c whenPM_RUNTIME is not set
From: Kukjin Kim
Date: Thu Jan 12 2012 - 02:51:46 EST
Rafael J. Wysocki wrote:
>
> On Monday, January 09, 2012, Kukjin Kim wrote:
> > Hi Rafael,
> >
> > This is just reporting of build error.
> >
> > Current mainline happens build error at
> drivers/base/power/domain_governor.c
> > file like following when CONFIG_PM_RUNTIME is not set. For example, it
> > happens with s3c6400_defconfig now.
> >
> > drivers/base/power/domain_governor.c: In function 'default_stop_ok':
> > drivers/base/power/domain_governor.c:25: error: 'struct dev_pm_info' has
> no
> > member named 'max_time_suspended_ns'
> > drivers/base/power/domain_governor.c:29: error: 'struct dev_pm_info' has
> no
> > member named 'max_time_suspended_ns'
> > drivers/base/power/domain_governor.c: In function
> 'default_power_down_ok':
> > drivers/base/power/domain_governor.c:94: error: 'struct dev_pm_info' has
> no
> > member named 'max_time_suspended_ns'
> > drivers/base/power/domain_governor.c:98: error: 'struct dev_pm_info' has
> no
> > member named 'max_time_suspended_ns'
> > drivers/base/power/domain_governor.c:100: error: 'struct dev_pm_info'
> has no
> > member named 'suspend_time'
>
> The appended patch fixes the problem for me, can you please test it?
>
Hi Rafael,
Looks ok to me :)
Thanks.
Best regards,
Kgene.
--
Kukjin Kim <kgene.kim@xxxxxxxxxxx>, Senior Engineer,
SW Solution Development Team, Samsung Electronics Co., Ltd.
> ---
> drivers/base/power/domain_governor.c | 24 +++++++++++++++++++-----
> 1 file changed, 19 insertions(+), 5 deletions(-)
>
> Index: linux/drivers/base/power/domain_governor.c
> ===================================================================
> --- linux.orig/drivers/base/power/domain_governor.c
> +++ linux/drivers/base/power/domain_governor.c
> @@ -12,6 +12,8 @@
> #include <linux/pm_qos.h>
> #include <linux/hrtimer.h>
>
> +#ifdef CONFIG_PM_RUNTIME
> +
> /**
> * default_stop_ok - Default PM domain governor routine for stopping
> devices.
> * @dev: Device to check.
> @@ -137,16 +139,28 @@ static bool default_power_down_ok(struct
> return true;
> }
>
> -struct dev_power_governor simple_qos_governor = {
> - .stop_ok = default_stop_ok,
> - .power_down_ok = default_power_down_ok,
> -};
> -
> static bool always_on_power_down_ok(struct dev_pm_domain *domain)
> {
> return false;
> }
>
> +#else /* !CONFIG_PM_RUNTIME */
> +
> +bool default_stop_ok(struct device *dev)
> +{
> + return false;
> +}
> +
> +#define default_power_down_ok NULL
> +#define always_on_power_down_ok NULL
> +
> +#endif /* !CONFIG_PM_RUNTIME */
> +
> +struct dev_power_governor simple_qos_governor = {
> + .stop_ok = default_stop_ok,
> + .power_down_ok = default_power_down_ok,
> +};
> +
> /**
> * pm_genpd_gov_always_on - A governor implementing an always-on policy
> */
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/