Commit 7416f1f2 authored by Douglas Anderson's avatar Douglas Anderson Committed by Rafael J. Wysocki

PM / Domains: Mark "name" const in genpd_dev_pm_attach_by_name()

The genpd_dev_pm_attach_by_name() simply takes the name and passes it
to of_property_match_string() where the argument is "const char *".
Adding a const here allows a later patch to add a const to
dev_pm_domain_attach_by_name() which allows drivers to pass in a name
that was declared "const" in a driver.

Fixes: 5d6be70a ("PM / Domains: Introduce option to attach a device by name to genpd")
Signed-off-by: default avatarDouglas Anderson <dianders@chromium.org>
Reviewed-by: default avatarStephen Boyd <swboyd@chromium.org>
Acked-by: default avatarViresh Kumar <viresh.kumar@linaro.org>
Reviewed-by: default avatarUlf Hansson <ulf.hansson@linaro.org>
Signed-off-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
parent e16a42c3
...@@ -2483,7 +2483,7 @@ EXPORT_SYMBOL_GPL(genpd_dev_pm_attach_by_id); ...@@ -2483,7 +2483,7 @@ EXPORT_SYMBOL_GPL(genpd_dev_pm_attach_by_id);
* power-domain-names DT property. For further description see * power-domain-names DT property. For further description see
* genpd_dev_pm_attach_by_id(). * genpd_dev_pm_attach_by_id().
*/ */
struct device *genpd_dev_pm_attach_by_name(struct device *dev, char *name) struct device *genpd_dev_pm_attach_by_name(struct device *dev, const char *name)
{ {
int index; int index;
......
...@@ -271,7 +271,7 @@ int genpd_dev_pm_attach(struct device *dev); ...@@ -271,7 +271,7 @@ int genpd_dev_pm_attach(struct device *dev);
struct device *genpd_dev_pm_attach_by_id(struct device *dev, struct device *genpd_dev_pm_attach_by_id(struct device *dev,
unsigned int index); unsigned int index);
struct device *genpd_dev_pm_attach_by_name(struct device *dev, struct device *genpd_dev_pm_attach_by_name(struct device *dev,
char *name); const char *name);
#else /* !CONFIG_PM_GENERIC_DOMAINS_OF */ #else /* !CONFIG_PM_GENERIC_DOMAINS_OF */
static inline int of_genpd_add_provider_simple(struct device_node *np, static inline int of_genpd_add_provider_simple(struct device_node *np,
struct generic_pm_domain *genpd) struct generic_pm_domain *genpd)
...@@ -324,7 +324,7 @@ static inline struct device *genpd_dev_pm_attach_by_id(struct device *dev, ...@@ -324,7 +324,7 @@ static inline struct device *genpd_dev_pm_attach_by_id(struct device *dev,
} }
static inline struct device *genpd_dev_pm_attach_by_name(struct device *dev, static inline struct device *genpd_dev_pm_attach_by_name(struct device *dev,
char *name) const char *name)
{ {
return NULL; return NULL;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment