Skip to content

Commit 4984dbb

Browse files
Shyam Sundar S Kjwrdegoede
authored andcommitted
platform/x86/amd/pmf: Make source_as_str() as non-static
Add amd_pmf prefix to source_as_str() function, so that the function name does not look generic. As this is a helper function make it as non-static so that it can be reused across multiple PMF features. Reviewed-by: Mario Limonciello <[email protected]> Signed-off-by: Shyam Sundar S K <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Hans de Goede <[email protected]>
1 parent d0ba7ad commit 4984dbb

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

drivers/platform/x86/amd/pmf/pmf.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -600,6 +600,7 @@ int apmf_get_static_slider_granular(struct amd_pmf_dev *pdev,
600600
struct apmf_static_slider_granular_output *output);
601601
bool is_pprof_balanced(struct amd_pmf_dev *pmf);
602602
int amd_pmf_power_slider_update_event(struct amd_pmf_dev *dev);
603+
const char *amd_pmf_source_as_str(unsigned int state);
603604

604605

605606
int apmf_update_fan_idx(struct amd_pmf_dev *pdev, bool manual, u32 idx);

drivers/platform/x86/amd/pmf/sps.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ static const char *slider_as_str(unsigned int state)
2727
}
2828
}
2929

30-
static const char *source_as_str(unsigned int state)
30+
const char *amd_pmf_source_as_str(unsigned int state)
3131
{
3232
switch (state) {
3333
case POWER_SOURCE_AC:
@@ -47,7 +47,8 @@ static void amd_pmf_dump_sps_defaults(struct amd_pmf_static_slider_granular *dat
4747

4848
for (i = 0; i < POWER_SOURCE_MAX; i++) {
4949
for (j = 0; j < POWER_MODE_MAX; j++) {
50-
pr_debug("--- Source:%s Mode:%s ---\n", source_as_str(i), slider_as_str(j));
50+
pr_debug("--- Source:%s Mode:%s ---\n", amd_pmf_source_as_str(i),
51+
slider_as_str(j));
5152
pr_debug("SPL: %u mW\n", data->prop[i][j].spl);
5253
pr_debug("SPPT: %u mW\n", data->prop[i][j].sppt);
5354
pr_debug("SPPT_ApuOnly: %u mW\n", data->prop[i][j].sppt_apu_only);

0 commit comments

Comments
 (0)