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.
Showing the changes to include/linux (1 of 2 files). Show all
Unified · Split
| @@ -341,7 +341,7 @@ int dev_pm_domain_attach(struct device *dev, bool power_on); · 340 unmodified lines | |||
| 341 | struct device *dev_pm_domain_attach_by_id(struct device *dev, | 341 | struct device *dev_pm_domain_attach_by_id(struct device *dev, |
| 342 | unsigned int index); | 342 | unsigned int index); |
| 343 | struct device *dev_pm_domain_attach_by_name(struct device *dev, | 343 | struct device *dev_pm_domain_attach_by_name(struct device *dev, |
| 344 | char *name); | 344 | const char *name); |
| 345 | void dev_pm_domain_detach(struct device *dev, bool power_off); | 345 | void dev_pm_domain_detach(struct device *dev, bool power_off); |
| 346 | void dev_pm_domain_set(struct device *dev, struct dev_pm_domain *pd); | 346 | void dev_pm_domain_set(struct device *dev, struct dev_pm_domain *pd); |
| 347 | #else | 347 | #else |
| @@ -355,7 +355,7 @@ static inline struct device *dev_pm_domain_attach_by_id(struct device *dev, · 7 unmodified lines | |||
| 355 | return NULL; | 355 | return NULL; |
| 356 | } | 356 | } |
| 357 | static inline struct device *dev_pm_domain_attach_by_name(struct device *dev, | 357 | static inline struct device *dev_pm_domain_attach_by_name(struct device *dev, |
| 358 | char *name) | 358 | const char *name) |
| 359 | { | 359 | { |
| 360 | return NULL; | 360 | return NULL; |
| 361 | } | 361 | } |