From nobody Sun Sep 22 04:29:31 2024 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id BD98DC433F5 for ; Tue, 10 May 2022 10:49:31 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240164AbiEJKxZ (ORCPT ); Tue, 10 May 2022 06:53:25 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36004 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240100AbiEJKwl (ORCPT ); Tue, 10 May 2022 06:52:41 -0400 Received: from mail-pl1-x636.google.com (mail-pl1-x636.google.com [IPv6:2607:f8b0:4864:20::636]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 155D42AC0E7 for ; Tue, 10 May 2022 03:48:36 -0700 (PDT) Received: by mail-pl1-x636.google.com with SMTP id n18so16401807plg.5 for ; Tue, 10 May 2022 03:48:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=tzF3zMl148ythS9iGSJQp8oXHfarSiI1rX+VL1jsG+s=; b=jZeTzcOZnlADgIFe3NUqIMmSuY7M9pUwvK8p5IFeb+DvxZI0dXmBftEtJP7l2z2uTM jrX/MFC9DnVK2rqlNU7fBXgMeTJvT9Zh6VT8+eTUpzxMhn+00+HdsQzDXCt6qcZs6420 2f9cKqvtuMDNR+89Bqpks7OFnVk4YzwNfuDN4= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=tzF3zMl148ythS9iGSJQp8oXHfarSiI1rX+VL1jsG+s=; b=eIi4Zv1UtNCRblFD/d3VvTP1Ik/MeIkqX9CBz26qj2PP06Uhgn6DNYzzbA2BKuAHm3 77HtnIggJQNKzY8EupRcWJ+BlEeTrXirPsqLY9ph026ik8b6dkdFmNM8da5hjCd+fJ95 WiEUUJjVmnfSnmI3vCLTbbqrbHKNLH8xahOUy0cHANdZqjnohQ5ksmnVuo4OG2iar59Q /JxRBNPoOFiH4eFcc2cub/LSGJXqiCokOilakuaXBj+zaOMQnpxiXyRHxdJMvbrOl00+ LoBl9t8ZLdJJI5ZrnaPIFsPn5jYvbCeURxi990SMporUL/5nHuUiaApaGo2NMnFceeAO KC5A== X-Gm-Message-State: AOAM531rKtPnb6ZpQFklYcbCp4JRFw546Hpku/ivpPdh+pdlbwm10l1M Iweajn33uS1qk0wyzO6jgeE2Hw== X-Google-Smtp-Source: ABdhPJzg4hcOpMXUhbbguk4wcBkfp9MKOzQzpx82C9nBakbzVvlhEej4m/INwNRulsfCiSpL4GziVA== X-Received: by 2002:a17:90b:2250:b0:1dc:6437:8b10 with SMTP id hk16-20020a17090b225000b001dc64378b10mr22474118pjb.119.1652179715683; Tue, 10 May 2022 03:48:35 -0700 (PDT) Received: from wenstp920.tpe.corp.google.com ([2401:fa00:1:10:6dcd:8578:55cf:2b12]) by smtp.gmail.com with ESMTPSA id q9-20020a170902e30900b0015e8d4eb21esm1659691plc.104.2022.05.10.03.48.33 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 10 May 2022 03:48:35 -0700 (PDT) From: Chen-Yu Tsai To: Michael Turquette , Stephen Boyd , Chun-Jie Chen , Miles Chen , Rex-BC Chen Cc: Chen-Yu Tsai , Matthias Brugger , AngeloGioacchino Del Regno , linux-clk@vger.kernel.org, linux-mediatek@lists.infradead.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH v2 10/11] clk: mediatek: mt8173: Fix usage of mtk_clk_register_ref2usb_tx() Date: Tue, 10 May 2022 18:48:03 +0800 Message-Id: <20220510104804.544597-11-wenst@chromium.org> X-Mailer: git-send-email 2.36.0.512.ge40c2bad7a-goog In-Reply-To: <20220510104804.544597-1-wenst@chromium.org> References: <20220510104804.544597-1-wenst@chromium.org> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" As part of the effort to improve the MediaTek clk drivers, the next step is to switch from the old 'struct clk' clk prodivder APIs to the new 'struct clk_hw' ones. The apmixed clk library contains one special clk type that doesn't fit any of the generic clk types. This type is currently used only on the MT8173 SoC. The code for this clk type was converted by the coccinelle script from the previous patch, but the call site was not. Fix the return variable type for mtk_clk_register_ref2usb_tx() in the MT8173 clk driver. Signed-off-by: Chen-Yu Tsai Reviewed-by: Miles Chen --- drivers/clk/mediatek/clk-mt8173.c | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/drivers/clk/mediatek/clk-mt8173.c b/drivers/clk/mediatek/clk-m= t8173.c index 511b4da9e727..68d3a9749316 100644 --- a/drivers/clk/mediatek/clk-mt8173.c +++ b/drivers/clk/mediatek/clk-mt8173.c @@ -993,6 +993,7 @@ static void __init mtk_apmixedsys_init(struct device_no= de *node) { struct clk_hw_onecell_data *clk_data; void __iomem *base; + struct clk_hw *hw; struct clk *clk; int r, i; =20 @@ -1013,16 +1014,13 @@ static void __init mtk_apmixedsys_init(struct devic= e_node *node) for (i =3D 0; i < ARRAY_SIZE(apmixed_usb); i++) { const struct mtk_clk_usb *cku =3D &apmixed_usb[i]; =20 - clk =3D mtk_clk_register_ref2usb_tx(cku->name, cku->parent, - base + cku->reg_ofs); - - if (IS_ERR(clk)) { - pr_err("Failed to register clk %s: %ld\n", cku->name, - PTR_ERR(clk)); + hw =3D mtk_clk_register_ref2usb_tx(cku->name, cku->parent, base + cku->r= eg_ofs); + if (IS_ERR(hw)) { + pr_err("Failed to register clk %s: %ld\n", cku->name, PTR_ERR(hw)); continue; } =20 - clk_data->hws[cku->id] =3D __clk_get_hw(clk); + clk_data->hws[cku->id] =3D hw; } =20 clk =3D clk_register_divider(NULL, "hdmi_ref", "tvdpll_594m", 0, --=20 2.36.0.512.ge40c2bad7a-goog