PM / domains: Remove system PM callbacks from gpd_dev_ops
There no users of these callbacks, let's simplify the generic power domain by removing them. Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org> Reviewed-by: Kevin Hilman <khilman@linaro.org> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
This commit is contained in:
parent
67da6d4bf4
commit
1e0407ca54
@ -770,46 +770,6 @@ static bool genpd_dev_active_wakeup(struct generic_pm_domain *genpd,
|
||||
return GENPD_DEV_CALLBACK(genpd, bool, active_wakeup, dev);
|
||||
}
|
||||
|
||||
static int genpd_suspend_dev(struct generic_pm_domain *genpd, struct device *dev)
|
||||
{
|
||||
return GENPD_DEV_CALLBACK(genpd, int, suspend, dev);
|
||||
}
|
||||
|
||||
static int genpd_suspend_late(struct generic_pm_domain *genpd, struct device *dev)
|
||||
{
|
||||
return GENPD_DEV_CALLBACK(genpd, int, suspend_late, dev);
|
||||
}
|
||||
|
||||
static int genpd_resume_early(struct generic_pm_domain *genpd, struct device *dev)
|
||||
{
|
||||
return GENPD_DEV_CALLBACK(genpd, int, resume_early, dev);
|
||||
}
|
||||
|
||||
static int genpd_resume_dev(struct generic_pm_domain *genpd, struct device *dev)
|
||||
{
|
||||
return GENPD_DEV_CALLBACK(genpd, int, resume, dev);
|
||||
}
|
||||
|
||||
static int genpd_freeze_dev(struct generic_pm_domain *genpd, struct device *dev)
|
||||
{
|
||||
return GENPD_DEV_CALLBACK(genpd, int, freeze, dev);
|
||||
}
|
||||
|
||||
static int genpd_freeze_late(struct generic_pm_domain *genpd, struct device *dev)
|
||||
{
|
||||
return GENPD_DEV_CALLBACK(genpd, int, freeze_late, dev);
|
||||
}
|
||||
|
||||
static int genpd_thaw_early(struct generic_pm_domain *genpd, struct device *dev)
|
||||
{
|
||||
return GENPD_DEV_CALLBACK(genpd, int, thaw_early, dev);
|
||||
}
|
||||
|
||||
static int genpd_thaw_dev(struct generic_pm_domain *genpd, struct device *dev)
|
||||
{
|
||||
return GENPD_DEV_CALLBACK(genpd, int, thaw, dev);
|
||||
}
|
||||
|
||||
/**
|
||||
* pm_genpd_sync_poweroff - Synchronously power off a PM domain and its masters.
|
||||
* @genpd: PM domain to power off, if possible.
|
||||
@ -991,7 +951,7 @@ static int pm_genpd_suspend(struct device *dev)
|
||||
if (IS_ERR(genpd))
|
||||
return -EINVAL;
|
||||
|
||||
return genpd->suspend_power_off ? 0 : genpd_suspend_dev(genpd, dev);
|
||||
return genpd->suspend_power_off ? 0 : pm_generic_suspend(dev);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -1012,7 +972,7 @@ static int pm_genpd_suspend_late(struct device *dev)
|
||||
if (IS_ERR(genpd))
|
||||
return -EINVAL;
|
||||
|
||||
return genpd->suspend_power_off ? 0 : genpd_suspend_late(genpd, dev);
|
||||
return genpd->suspend_power_off ? 0 : pm_generic_suspend_late(dev);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -1099,7 +1059,7 @@ static int pm_genpd_resume_early(struct device *dev)
|
||||
if (IS_ERR(genpd))
|
||||
return -EINVAL;
|
||||
|
||||
return genpd->suspend_power_off ? 0 : genpd_resume_early(genpd, dev);
|
||||
return genpd->suspend_power_off ? 0 : pm_generic_resume_early(dev);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -1120,7 +1080,7 @@ static int pm_genpd_resume(struct device *dev)
|
||||
if (IS_ERR(genpd))
|
||||
return -EINVAL;
|
||||
|
||||
return genpd->suspend_power_off ? 0 : genpd_resume_dev(genpd, dev);
|
||||
return genpd->suspend_power_off ? 0 : pm_generic_resume(dev);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -1141,7 +1101,7 @@ static int pm_genpd_freeze(struct device *dev)
|
||||
if (IS_ERR(genpd))
|
||||
return -EINVAL;
|
||||
|
||||
return genpd->suspend_power_off ? 0 : genpd_freeze_dev(genpd, dev);
|
||||
return genpd->suspend_power_off ? 0 : pm_generic_freeze(dev);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -1163,7 +1123,7 @@ static int pm_genpd_freeze_late(struct device *dev)
|
||||
if (IS_ERR(genpd))
|
||||
return -EINVAL;
|
||||
|
||||
return genpd->suspend_power_off ? 0 : genpd_freeze_late(genpd, dev);
|
||||
return genpd->suspend_power_off ? 0 : pm_generic_freeze_late(dev);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -1227,7 +1187,7 @@ static int pm_genpd_thaw_early(struct device *dev)
|
||||
if (IS_ERR(genpd))
|
||||
return -EINVAL;
|
||||
|
||||
return genpd->suspend_power_off ? 0 : genpd_thaw_early(genpd, dev);
|
||||
return genpd->suspend_power_off ? 0 : pm_generic_thaw_early(dev);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -1248,7 +1208,7 @@ static int pm_genpd_thaw(struct device *dev)
|
||||
if (IS_ERR(genpd))
|
||||
return -EINVAL;
|
||||
|
||||
return genpd->suspend_power_off ? 0 : genpd_thaw_dev(genpd, dev);
|
||||
return genpd->suspend_power_off ? 0 : pm_generic_thaw(dev);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -1956,14 +1916,6 @@ void pm_genpd_init(struct generic_pm_domain *genpd,
|
||||
genpd->domain.ops.complete = pm_genpd_complete;
|
||||
genpd->dev_ops.save_state = pm_genpd_default_save_state;
|
||||
genpd->dev_ops.restore_state = pm_genpd_default_restore_state;
|
||||
genpd->dev_ops.suspend = pm_generic_suspend;
|
||||
genpd->dev_ops.suspend_late = pm_generic_suspend_late;
|
||||
genpd->dev_ops.resume_early = pm_generic_resume_early;
|
||||
genpd->dev_ops.resume = pm_generic_resume;
|
||||
genpd->dev_ops.freeze = pm_generic_freeze;
|
||||
genpd->dev_ops.freeze_late = pm_generic_freeze_late;
|
||||
genpd->dev_ops.thaw_early = pm_generic_thaw_early;
|
||||
genpd->dev_ops.thaw = pm_generic_thaw;
|
||||
mutex_lock(&gpd_list_lock);
|
||||
list_add(&genpd->gpd_list_node, &gpd_list);
|
||||
mutex_unlock(&gpd_list_lock);
|
||||
|
@ -35,14 +35,6 @@ struct gpd_dev_ops {
|
||||
int (*stop)(struct device *dev);
|
||||
int (*save_state)(struct device *dev);
|
||||
int (*restore_state)(struct device *dev);
|
||||
int (*suspend)(struct device *dev);
|
||||
int (*suspend_late)(struct device *dev);
|
||||
int (*resume_early)(struct device *dev);
|
||||
int (*resume)(struct device *dev);
|
||||
int (*freeze)(struct device *dev);
|
||||
int (*freeze_late)(struct device *dev);
|
||||
int (*thaw_early)(struct device *dev);
|
||||
int (*thaw)(struct device *dev);
|
||||
bool (*active_wakeup)(struct device *dev);
|
||||
};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user