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

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

As of the patch ("PM / Domains: Mark "name" const in
genpd_dev_pm_attach_by_name()") it's clear that the name in
dev_pm_domain_attach_by_name() can be const.  Mark it as so.  This
allows drivers to pass in a name that was declared "const" in a
driver.

Fixes: 27dceb81 ("PM / Domains: Introduce dev_pm_domain_attach_by_name()")
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 7416f1f2
...@@ -160,7 +160,7 @@ EXPORT_SYMBOL_GPL(dev_pm_domain_attach_by_id); ...@@ -160,7 +160,7 @@ EXPORT_SYMBOL_GPL(dev_pm_domain_attach_by_id);
* For a detailed function description, see dev_pm_domain_attach_by_id(). * For a detailed function description, see dev_pm_domain_attach_by_id().
*/ */
struct device *dev_pm_domain_attach_by_name(struct device *dev, struct device *dev_pm_domain_attach_by_name(struct device *dev,
char *name) const char *name)
{ {
if (dev->pm_domain) if (dev->pm_domain)
return ERR_PTR(-EEXIST); return ERR_PTR(-EEXIST);
......
...@@ -341,7 +341,7 @@ int dev_pm_domain_attach(struct device *dev, bool power_on); ...@@ -341,7 +341,7 @@ int dev_pm_domain_attach(struct device *dev, bool power_on);
struct device *dev_pm_domain_attach_by_id(struct device *dev, struct device *dev_pm_domain_attach_by_id(struct device *dev,
unsigned int index); unsigned int index);
struct device *dev_pm_domain_attach_by_name(struct device *dev, struct device *dev_pm_domain_attach_by_name(struct device *dev,
char *name); const char *name);
void dev_pm_domain_detach(struct device *dev, bool power_off); void dev_pm_domain_detach(struct device *dev, bool power_off);
void dev_pm_domain_set(struct device *dev, struct dev_pm_domain *pd); void dev_pm_domain_set(struct device *dev, struct dev_pm_domain *pd);
#else #else
...@@ -355,7 +355,7 @@ static inline struct device *dev_pm_domain_attach_by_id(struct device *dev, ...@@ -355,7 +355,7 @@ static inline struct device *dev_pm_domain_attach_by_id(struct device *dev,
return NULL; return NULL;
} }
static inline struct device *dev_pm_domain_attach_by_name(struct device *dev, static inline struct device *dev_pm_domain_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