History

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.

Douglas Anderson committed 7 years ago

Commit 7416f1f1 parent e16a42c2 files · +3 −3Browse files

Showing the changes to include/linux (1 of 2 files). Show all

Unified · Split

include/linux/pm_domain.h+2−2
@@ -271,7 +271,7 @@ int genpd_dev_pm_attach(struct device *dev); · 270 unmodified lines
271struct device *genpd_dev_pm_attach_by_id(struct device *dev,271struct device *genpd_dev_pm_attach_by_id(struct device *dev,
272 unsigned int index);272 unsigned int index);
273struct device *genpd_dev_pm_attach_by_name(struct device *dev,273struct device *genpd_dev_pm_attach_by_name(struct device *dev,
274 char *name);274 const char *name);
275#else /* !CONFIG_PM_GENERIC_DOMAINS_OF */275#else /* !CONFIG_PM_GENERIC_DOMAINS_OF */
276static inline int of_genpd_add_provider_simple(struct device_node *np,276static inline int of_genpd_add_provider_simple(struct device_node *np,
277 struct generic_pm_domain *genpd)277 struct generic_pm_domain *genpd)
@@ -324,7 +324,7 @@ static inline struct device *genpd_dev_pm_attach_by_id(struct device *dev, · 46 unmodified lines
324}324}
325 325
326static inline struct device *genpd_dev_pm_attach_by_name(struct device *dev,326static inline struct device *genpd_dev_pm_attach_by_name(struct device *dev,
327 char *name)327 const char *name)
328{328{
329 return NULL;329 return NULL;
330}330}

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