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.
Unified · Split
| @@ -160,7 +160,7 @@ EXPORT_SYMBOL_GPL(dev_pm_domain_attach_by_id); · 159 unmodified lines | ||
| 160 | 160 | * For a detailed function description, see dev_pm_domain_attach_by_id(). |
| 161 | 161 | */ |
| 162 | 162 | struct device *dev_pm_domain_attach_by_name(struct device *dev, |
| 163 | − char *name) | |
| 163 | + const char *name) | |
| 164 | 164 | { |
| 165 | 165 | if (dev->pm_domain) |
| 166 | 166 | return ERR_PTR(-EEXIST); |
| @@ -341,7 +341,7 @@ int dev_pm_domain_attach(struct device *dev, bool power_on); · 340 unmodified lines | ||
| 341 | 341 | struct device *dev_pm_domain_attach_by_id(struct device *dev, |
| 342 | 342 | unsigned int index); |
| 343 | 343 | struct device *dev_pm_domain_attach_by_name(struct device *dev, |
| 344 | − char *name); | |
| 344 | + const char *name); | |
| 345 | 345 | void dev_pm_domain_detach(struct device *dev, bool power_off); |
| 346 | 346 | void dev_pm_domain_set(struct device *dev, struct dev_pm_domain *pd); |
| 347 | 347 | #else |
| @@ -355,7 +355,7 @@ static inline struct device *dev_pm_domain_attach_by_id(struct device *dev, · 7 unmodified lines | ||
| 355 | 355 | return NULL; |
| 356 | 356 | } |
| 357 | 357 | static inline struct device *dev_pm_domain_attach_by_name(struct device *dev, |
| 358 | − char *name) | |
| 358 | + const char *name) | |
| 359 | 359 | { |
| 360 | 360 | return NULL; |
| 361 | 361 | } |