Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

opp: Change type of dev_pm_opp_attach_genpd(names) argument

Elements of the 'names' array are not changed by the code, constify them
for consistency.

Signed-off-by: Dmitry Osipenko <digetx@gmail.com>
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>

authored by

Dmitry Osipenko and committed by
Viresh Kumar
3734b9f2 8b7912f4

+7 -7
+3 -3
drivers/opp/core.c
··· 2348 2348 * "required-opps" are added in DT. 2349 2349 */ 2350 2350 struct opp_table *dev_pm_opp_attach_genpd(struct device *dev, 2351 - const char **names, struct device ***virt_devs) 2351 + const char * const *names, struct device ***virt_devs) 2352 2352 { 2353 2353 struct opp_table *opp_table; 2354 2354 struct device *virt_dev; 2355 2355 int index = 0, ret = -EINVAL; 2356 - const char **name = names; 2356 + const char * const *name = names; 2357 2357 2358 2358 opp_table = _add_opp_table(dev, false); 2359 2359 if (IS_ERR(opp_table)) ··· 2457 2457 * 2458 2458 * Return: 0 on success and errorno otherwise. 2459 2459 */ 2460 - int devm_pm_opp_attach_genpd(struct device *dev, const char **names, 2460 + int devm_pm_opp_attach_genpd(struct device *dev, const char * const *names, 2461 2461 struct device ***virt_devs) 2462 2462 { 2463 2463 struct opp_table *opp_table;
+4 -4
include/linux/pm_opp.h
··· 156 156 struct opp_table *dev_pm_opp_register_set_opp_helper(struct device *dev, int (*set_opp)(struct dev_pm_set_opp_data *data)); 157 157 void dev_pm_opp_unregister_set_opp_helper(struct opp_table *opp_table); 158 158 int devm_pm_opp_register_set_opp_helper(struct device *dev, int (*set_opp)(struct dev_pm_set_opp_data *data)); 159 - struct opp_table *dev_pm_opp_attach_genpd(struct device *dev, const char **names, struct device ***virt_devs); 159 + struct opp_table *dev_pm_opp_attach_genpd(struct device *dev, const char * const *names, struct device ***virt_devs); 160 160 void dev_pm_opp_detach_genpd(struct opp_table *opp_table); 161 - int devm_pm_opp_attach_genpd(struct device *dev, const char **names, struct device ***virt_devs); 161 + int devm_pm_opp_attach_genpd(struct device *dev, const char * const *names, struct device ***virt_devs); 162 162 struct dev_pm_opp *dev_pm_opp_xlate_required_opp(struct opp_table *src_table, struct opp_table *dst_table, struct dev_pm_opp *src_opp); 163 163 int dev_pm_opp_xlate_performance_state(struct opp_table *src_table, struct opp_table *dst_table, unsigned int pstate); 164 164 int dev_pm_opp_set_rate(struct device *dev, unsigned long target_freq); ··· 376 376 return -EOPNOTSUPP; 377 377 } 378 378 379 - static inline struct opp_table *dev_pm_opp_attach_genpd(struct device *dev, const char **names, struct device ***virt_devs) 379 + static inline struct opp_table *dev_pm_opp_attach_genpd(struct device *dev, const char * const *names, struct device ***virt_devs) 380 380 { 381 381 return ERR_PTR(-EOPNOTSUPP); 382 382 } ··· 384 384 static inline void dev_pm_opp_detach_genpd(struct opp_table *opp_table) {} 385 385 386 386 static inline int devm_pm_opp_attach_genpd(struct device *dev, 387 - const char **names, 387 + const char * const *names, 388 388 struct device ***virt_devs) 389 389 { 390 390 return -EOPNOTSUPP;