History

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.

Douglas Anderson committed 7 years ago

Commit eeb35df1 parent 7416f1f2 files · +3 −3Browse files

Unified · Split

2 files
  1. drivers/base/power/common.c +1 −1
  2. include/linux/pm_domain.h +2 −2
drivers/base/power/common.c+1−1
@@ -160,7 +160,7 @@ EXPORT_SYMBOL_GPL(dev_pm_domain_attach_by_id); · 159 unmodified lines
160160 * For a detailed function description, see dev_pm_domain_attach_by_id().
161161 */
162162 struct device *dev_pm_domain_attach_by_name(struct device *dev,
163− char *name)
163+ const char *name)
164164 {
165165 if (dev->pm_domain)
166166 return ERR_PTR(-EEXIST);
include/linux/pm_domain.h+2−2
@@ -341,7 +341,7 @@ int dev_pm_domain_attach(struct device *dev, bool power_on); · 340 unmodified lines
341341 struct device *dev_pm_domain_attach_by_id(struct device *dev,
342342 unsigned int index);
343343 struct device *dev_pm_domain_attach_by_name(struct device *dev,
344− char *name);
344+ const char *name);
345345 void dev_pm_domain_detach(struct device *dev, bool power_off);
346346 void dev_pm_domain_set(struct device *dev, struct dev_pm_domain *pd);
347347 #else
@@ -355,7 +355,7 @@ static inline struct device *dev_pm_domain_attach_by_id(struct device *dev, · 7 unmodified lines
355355 return NULL;
356356 }
357357 static inline struct device *dev_pm_domain_attach_by_name(struct device *dev,
358− char *name)
358+ const char *name)
359359 {
360360 return NULL;
361361 }

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t