diff --git a/asoc/codecs/audio-ext-clk-up.c b/asoc/codecs/audio-ext-clk-up.c index 7808fceac3..2f8a07c7fa 100644 --- a/asoc/codecs/audio-ext-clk-up.c +++ b/asoc/codecs/audio-ext-clk-up.c @@ -189,8 +189,9 @@ static int lpass_hw_vote_prepare(struct clk_hw *hw) &clk_priv->lpass_core_hwvote_client_handle); #endif if (ret < 0) { - pr_err("%s lpass core hw vote failed %d\n", - __func__, ret); + if (__ratelimit(&rtl)) + pr_err("%s lpass core hw vote failed %d\n", + __func__, ret); return ret; } } diff --git a/soc/swr-mstr-ctrl.c b/soc/swr-mstr-ctrl.c index af3a1a68c0..5e29b84b35 100644 --- a/soc/swr-mstr-ctrl.c +++ b/soc/swr-mstr-ctrl.c @@ -497,6 +497,7 @@ static int swrm_get_ssp_period(struct swr_mstr_ctrl *swrm, static int swrm_core_vote_request(struct swr_mstr_ctrl *swrm, bool enable) { int ret = 0; + static DEFINE_RATELIMIT_STATE(rtl, 1 * HZ, 1); if (!swrm->handle) return -EINVAL; @@ -509,8 +510,9 @@ static int swrm_core_vote_request(struct swr_mstr_ctrl *swrm, bool enable) if (swrm->core_vote) { ret = swrm->core_vote(swrm->handle, enable); if (ret) - dev_err_ratelimited(swrm->dev, - "%s: core vote request failed\n", __func__); + if (__ratelimit(&rtl)) + dev_err_ratelimited(swrm->dev, + "%s: core vote request failed\n", __func__); } exit: mutex_unlock(&swrm->clklock);