Skip to content

Commit 3734b9f

Browse files
digetxvireshk
authored andcommitted
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 <[email protected]> Signed-off-by: Viresh Kumar <[email protected]>
1 parent 8b7912f commit 3734b9f

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

drivers/opp/core.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2348,12 +2348,12 @@ static void _opp_detach_genpd(struct opp_table *opp_table)
23482348
* "required-opps" are added in DT.
23492349
*/
23502350
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)
23522352
{
23532353
struct opp_table *opp_table;
23542354
struct device *virt_dev;
23552355
int index = 0, ret = -EINVAL;
2356-
const char **name = names;
2356+
const char * const *name = names;
23572357

23582358
opp_table = _add_opp_table(dev, false);
23592359
if (IS_ERR(opp_table))
@@ -2457,7 +2457,7 @@ static void devm_pm_opp_detach_genpd(void *data)
24572457
*
24582458
* Return: 0 on success and errorno otherwise.
24592459
*/
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,
24612461
struct device ***virt_devs)
24622462
{
24632463
struct opp_table *opp_table;

include/linux/pm_opp.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -156,9 +156,9 @@ int devm_pm_opp_set_clkname(struct device *dev, const char *name);
156156
struct opp_table *dev_pm_opp_register_set_opp_helper(struct device *dev, int (*set_opp)(struct dev_pm_set_opp_data *data));
157157
void dev_pm_opp_unregister_set_opp_helper(struct opp_table *opp_table);
158158
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);
160160
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);
162162
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);
163163
int dev_pm_opp_xlate_performance_state(struct opp_table *src_table, struct opp_table *dst_table, unsigned int pstate);
164164
int dev_pm_opp_set_rate(struct device *dev, unsigned long target_freq);
@@ -376,15 +376,15 @@ static inline int devm_pm_opp_set_clkname(struct device *dev, const char *name)
376376
return -EOPNOTSUPP;
377377
}
378378

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)
380380
{
381381
return ERR_PTR(-EOPNOTSUPP);
382382
}
383383

384384
static inline void dev_pm_opp_detach_genpd(struct opp_table *opp_table) {}
385385

386386
static inline int devm_pm_opp_attach_genpd(struct device *dev,
387-
const char **names,
387+
const char * const *names,
388388
struct device ***virt_devs)
389389
{
390390
return -EOPNOTSUPP;

0 commit comments

Comments
 (0)