From patchwork Sun Nov 13 18:09:44 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dario Binacchi X-Patchwork-Id: 13041693 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 03383C4332F for ; Sun, 13 Nov 2022 18:11:17 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-Id:Date:Subject:Cc :To:From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=M53zVzA6aIvOFefI+7hq4KwqvHn17Hcqm+6OQTFHwZY=; b=Uaw1hGCsstH0iu otXmGF+iFlGcRPL0xWTGvUYTFWinbbF/dwgwsQ8oK0mVrTqGFKTNwCl12obFxPAJwmICU+6V7rW3c RmnApKywZW1cgq5qRrkC106AkN8Opg0nODt9DEETuk2HE5+2z6LGhpo38FmT0RTLZjES3oqNbBBzO BkiExYCWFWptfAdPqkxrk9fcgI7Gi6vUjfcU04U2EAKmcDymDwgbQEzuHMYoX6oEaySE5T+JkTshK OqSXyfEnI0gJB37oWb5/HFJg51RLPMYbYQ3QmOcDS68mZzCbP5aqVE80cVCgta5M8Hq0UGif85hql Z0C9aw1PQ+i58tzodj2A==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1ouHQp-00Cr2g-Oe; Sun, 13 Nov 2022 18:10:12 +0000 Received: from mail-ed1-x532.google.com ([2a00:1450:4864:20::532]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1ouHQV-00Cqkh-J8 for linux-arm-kernel@lists.infradead.org; Sun, 13 Nov 2022 18:09:52 +0000 Received: by mail-ed1-x532.google.com with SMTP id l11so14301153edb.4 for ; Sun, 13 Nov 2022 10:09:50 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amarulasolutions.com; s=google; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=4byRwPo02lvkmaR0NL7PCXZ/wh86nqqJqs0NF0iJNN4=; b=Klr8dittMggHZPqmUvNZDK5ZpTzudeRXL4AUHJzqU43nDT49Nb42aUWtHpvU8hn7ew m7B76kJn2mJMXEq/4/z2R3bf4MhcbKmVMmKdCanyADpkYqwQwS4VoZckP2z36zXJykVI aeRtqs7bLNLq6WSXm7nMqymtnj7RXCZfz5n+k= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=4byRwPo02lvkmaR0NL7PCXZ/wh86nqqJqs0NF0iJNN4=; b=Vt6JM2l/jJIjjjpiQl9EBOmPhGjOBOA5y4NerIjVh7uyer/57k0FylVohyNSGDPIjO pyqGkun/HRtqqdXKaymXEGrNuBkYJELbB/32B51MyaI1TYTtABLWlFQ4lwAjitVsPRC2 vUO0Va+wVjsgYTEETN0Nkm6ZPORn2l5vQK+08EcfhtBqvaWAANbk75Pmex57K5KNJrUl 4K/FFDrVgCHbzMHvs0gceZ5lvpdWDKCfSBb9CEXu8xithd/Bep79EmSjefy4DrNhBfHo 7KuWxKCEi9Rjzk0nF+GDWqJU1NLQDksuT00aouQ51TxZuxumw36CLT3Xu3yW/3PaBbHj u4Hw== X-Gm-Message-State: ANoB5pk6yOvYyckz+7JjBPJLHyEtefQUw9C7D8M1CrhD3ugxGvMR1i4F OkWxl+v5XALn2IWQvgL66rSDjw== X-Google-Smtp-Source: AA0mqf6H21J6diShQQYxKQGIY8g5aS8KmPOgRzb+xXR0+ifRlHAqqYHzJCMGFFEw00ZwBfVaoEijNA== X-Received: by 2002:a05:6402:381b:b0:456:d9f9:8f3a with SMTP id es27-20020a056402381b00b00456d9f98f3amr8801725edb.258.1668362989724; Sun, 13 Nov 2022 10:09:49 -0800 (PST) Received: from dario-ThinkPad-T14s-Gen-2i.homenet.telecomitalia.it (host-79-40-103-33.business.telecomitalia.it. [79.40.103.33]) by smtp.gmail.com with ESMTPSA id n23-20020a170906701700b0078db18d7972sm3197502ejj.117.2022.11.13.10.09.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 13 Nov 2022 10:09:49 -0800 (PST) From: Dario Binacchi To: linux-kernel@vger.kernel.org Cc: michael@amarulasolutions.com, Amarula patchwork , Dario Binacchi , Abel Vesa , Fabio Estevam , Michael Turquette , NXP Linux Team , Pengutronix Kernel Team , Sascha Hauer , Shawn Guo , Stephen Boyd , linux-arm-kernel@lists.infradead.org, linux-clk@vger.kernel.org Subject: [PATCH] clk: imx: DRY cleanup of imx_obtain_fixed_clock_hw() Date: Sun, 13 Nov 2022 19:09:44 +0100 Message-Id: <20221113180945.1626061-1-dario.binacchi@amarulasolutions.com> X-Mailer: git-send-email 2.32.0 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20221113_100951_670262_D3BF167F X-CRM114-Status: GOOD ( 10.10 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org The imx_obtain_fixed_clock() and imx_obtain_fixed_clock_hw() functions behave pretty similarly, DRY and call one from another. No functional changes intended. Signed-off-by: Dario Binacchi --- drivers/clk/imx/clk.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/clk/imx/clk.c b/drivers/clk/imx/clk.c index 5582f18dd632..573b1a6ca1dc 100644 --- a/drivers/clk/imx/clk.c +++ b/drivers/clk/imx/clk.c @@ -104,9 +104,7 @@ struct clk_hw *imx_obtain_fixed_clock_hw( { struct clk *clk; - clk = imx_obtain_fixed_clock_from_dt(name); - if (IS_ERR(clk)) - clk = imx_clk_fixed(name, rate); + clk = imx_obtain_fixed_clock(name, rate); return __clk_get_hw(clk); }