lkml.org 
[lkml]   [2021]   [Dec]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] cpufreq: qcom-hw: Use optional irq API
On 16-11-21, 18:03, Stephen Boyd wrote:
> Use platform_get_irq_optional() to avoid a noisy error message when the
> irq isn't specified. The irq is definitely optional given that we only
> care about errors that are -EPROBE_DEFER here.
>
> Cc: Thara Gopinath <thara.gopinath@linaro.org>
> Signed-off-by: Stephen Boyd <swboyd@chromium.org>
> ---
> drivers/cpufreq/qcom-cpufreq-hw.c | 8 +++++---
> 1 file changed, 5 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/cpufreq/qcom-cpufreq-hw.c b/drivers/cpufreq/qcom-cpufreq-hw.c
> index a2be0df7e174..b442d4983a22 100644
> --- a/drivers/cpufreq/qcom-cpufreq-hw.c
> +++ b/drivers/cpufreq/qcom-cpufreq-hw.c
> @@ -382,9 +382,11 @@ static int qcom_cpufreq_hw_lmh_init(struct cpufreq_policy *policy, int index)
> * Look for LMh interrupt. If no interrupt line is specified /
> * if there is an error, allow cpufreq to be enabled as usual.
> */
> - data->throttle_irq = platform_get_irq(pdev, index);
> - if (data->throttle_irq <= 0)
> - return data->throttle_irq == -EPROBE_DEFER ? -EPROBE_DEFER : 0;
> + data->throttle_irq = platform_get_irq_optional(pdev, index);
> + if (data->throttle_irq == -ENXIO)
> + return 0;
> + if (data->throttle_irq < 0)
> + return data->throttle_irq;
>
> data->cancel_throttle = false;
> data->policy = policy;

Applied. Thanks.

--
viresh

\
 
 \ /
  Last update: 2021-12-03 05:48    [W:0.073 / U:0.392 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site