PM / Domains: Drop unused in-parameter to some genpd functions
Both genpd_alloc_dev_data() and genpd_add_device(), that are internal genpd functions, allow a struct gpd_timing_data *td to be passed as an in-parameter. However, as NULL is always passed, let's just drop the in-parameter altogether. Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org> Acked-by: Viresh Kumar <viresh.kumar@linaro.org> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
This commit is contained in:

committed by
Rafael J. Wysocki

parent
51dcf7482f
commit
a174920d69
@@ -1396,8 +1396,7 @@ EXPORT_SYMBOL_GPL(pm_genpd_syscore_poweron);
|
|||||||
|
|
||||||
#endif /* CONFIG_PM_SLEEP */
|
#endif /* CONFIG_PM_SLEEP */
|
||||||
|
|
||||||
static struct generic_pm_domain_data *genpd_alloc_dev_data(struct device *dev,
|
static struct generic_pm_domain_data *genpd_alloc_dev_data(struct device *dev)
|
||||||
struct gpd_timing_data *td)
|
|
||||||
{
|
{
|
||||||
struct generic_pm_domain_data *gpd_data;
|
struct generic_pm_domain_data *gpd_data;
|
||||||
int ret;
|
int ret;
|
||||||
@@ -1412,9 +1411,6 @@ static struct generic_pm_domain_data *genpd_alloc_dev_data(struct device *dev,
|
|||||||
goto err_put;
|
goto err_put;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (td)
|
|
||||||
gpd_data->td = *td;
|
|
||||||
|
|
||||||
gpd_data->base.dev = dev;
|
gpd_data->base.dev = dev;
|
||||||
gpd_data->td.constraint_changed = true;
|
gpd_data->td.constraint_changed = true;
|
||||||
gpd_data->td.effective_constraint_ns = PM_QOS_RESUME_LATENCY_NO_CONSTRAINT_NS;
|
gpd_data->td.effective_constraint_ns = PM_QOS_RESUME_LATENCY_NO_CONSTRAINT_NS;
|
||||||
@@ -1504,8 +1500,7 @@ static void genpd_clear_cpumask(struct generic_pm_domain *genpd,
|
|||||||
genpd_update_cpumask(genpd, dev, false);
|
genpd_update_cpumask(genpd, dev, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
static int genpd_add_device(struct generic_pm_domain *genpd, struct device *dev,
|
static int genpd_add_device(struct generic_pm_domain *genpd, struct device *dev)
|
||||||
struct gpd_timing_data *td)
|
|
||||||
{
|
{
|
||||||
struct generic_pm_domain_data *gpd_data;
|
struct generic_pm_domain_data *gpd_data;
|
||||||
int ret;
|
int ret;
|
||||||
@@ -1515,7 +1510,7 @@ static int genpd_add_device(struct generic_pm_domain *genpd, struct device *dev,
|
|||||||
if (IS_ERR_OR_NULL(genpd) || IS_ERR_OR_NULL(dev))
|
if (IS_ERR_OR_NULL(genpd) || IS_ERR_OR_NULL(dev))
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
|
|
||||||
gpd_data = genpd_alloc_dev_data(dev, td);
|
gpd_data = genpd_alloc_dev_data(dev);
|
||||||
if (IS_ERR(gpd_data))
|
if (IS_ERR(gpd_data))
|
||||||
return PTR_ERR(gpd_data);
|
return PTR_ERR(gpd_data);
|
||||||
|
|
||||||
@@ -1553,7 +1548,7 @@ int pm_genpd_add_device(struct generic_pm_domain *genpd, struct device *dev)
|
|||||||
int ret;
|
int ret;
|
||||||
|
|
||||||
mutex_lock(&gpd_list_lock);
|
mutex_lock(&gpd_list_lock);
|
||||||
ret = genpd_add_device(genpd, dev, NULL);
|
ret = genpd_add_device(genpd, dev);
|
||||||
mutex_unlock(&gpd_list_lock);
|
mutex_unlock(&gpd_list_lock);
|
||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
@@ -2259,7 +2254,7 @@ int of_genpd_add_device(struct of_phandle_args *genpdspec, struct device *dev)
|
|||||||
goto out;
|
goto out;
|
||||||
}
|
}
|
||||||
|
|
||||||
ret = genpd_add_device(genpd, dev, NULL);
|
ret = genpd_add_device(genpd, dev);
|
||||||
|
|
||||||
out:
|
out:
|
||||||
mutex_unlock(&gpd_list_lock);
|
mutex_unlock(&gpd_list_lock);
|
||||||
@@ -2429,7 +2424,7 @@ static int __genpd_dev_pm_attach(struct device *dev, struct device *base_dev,
|
|||||||
|
|
||||||
dev_dbg(dev, "adding to PM domain %s\n", pd->name);
|
dev_dbg(dev, "adding to PM domain %s\n", pd->name);
|
||||||
|
|
||||||
ret = genpd_add_device(pd, dev, NULL);
|
ret = genpd_add_device(pd, dev);
|
||||||
mutex_unlock(&gpd_list_lock);
|
mutex_unlock(&gpd_list_lock);
|
||||||
|
|
||||||
if (ret < 0) {
|
if (ret < 0) {
|
||||||
|
Reference in New Issue
Block a user