mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 10:41:38 -04:00
PM / devfreq: qoslat: implement get_dev_status()
The qoslat devfreq device does not implement the get_dev_status() devfreq profile API. This will lead to a crash if a governor tries to invoke devfreq_update_stats(). Implement the API to prevent this from happening. Change-Id: I668c3b55a1585d8eb561da03475e1567b194feef Signed-off-by: Amir Vajid <[email protected]>
This commit is contained in:
parent
66b4463f98
commit
324982fad1
1 changed files with 12 additions and 1 deletions
|
|
@ -1,6 +1,6 @@
|
|||
// SPDX-License-Identifier: GPL-2.0-only
|
||||
/*
|
||||
* Copyright (c) 2019, The Linux Foundation. All rights reserved.
|
||||
* Copyright (c) 2019-2020, The Linux Foundation. All rights reserved.
|
||||
*/
|
||||
|
||||
#define pr_fmt(fmt) "devfreq-qcom-qoslat: " fmt
|
||||
|
|
@ -82,6 +82,16 @@ static int dev_get_cur_freq(struct device *dev, unsigned long *freq)
|
|||
return 0;
|
||||
}
|
||||
|
||||
static int dev_get_dev_status(struct device *dev,
|
||||
struct devfreq_dev_status *stat)
|
||||
{
|
||||
struct qoslat_data *d = dev_get_drvdata(dev);
|
||||
|
||||
stat->current_frequency = d->qos_level;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int devfreq_qcom_qoslat_probe(struct platform_device *pdev)
|
||||
{
|
||||
struct device *dev = &pdev->dev;
|
||||
|
|
@ -114,6 +124,7 @@ static int devfreq_qcom_qoslat_probe(struct platform_device *pdev)
|
|||
p = &d->profile;
|
||||
p->target = dev_target;
|
||||
p->get_cur_freq = dev_get_cur_freq;
|
||||
p->get_dev_status = dev_get_dev_status;
|
||||
p->polling_ms = 10;
|
||||
|
||||
ret = dev_pm_opp_of_add_table(dev);
|
||||
|
|
|
|||
Loading…
Reference in a new issue