Skip to content

Commit 8f5783a

Browse files
bebarinovireshk
authored andcommitted
cpufreq: qcom-hw: Use optional irq API
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 <[email protected]> Signed-off-by: Stephen Boyd <[email protected]> Signed-off-by: Viresh Kumar <[email protected]>
1 parent 3ed6dfb commit 8f5783a

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

drivers/cpufreq/qcom-cpufreq-hw.c

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -374,9 +374,11 @@ static int qcom_cpufreq_hw_lmh_init(struct cpufreq_policy *policy, int index)
374374
* Look for LMh interrupt. If no interrupt line is specified /
375375
* if there is an error, allow cpufreq to be enabled as usual.
376376
*/
377-
data->throttle_irq = platform_get_irq(pdev, index);
378-
if (data->throttle_irq <= 0)
379-
return data->throttle_irq == -EPROBE_DEFER ? -EPROBE_DEFER : 0;
377+
data->throttle_irq = platform_get_irq_optional(pdev, index);
378+
if (data->throttle_irq == -ENXIO)
379+
return 0;
380+
if (data->throttle_irq < 0)
381+
return data->throttle_irq;
380382

381383
data->cancel_throttle = false;
382384
data->policy = policy;

0 commit comments

Comments
 (0)