Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp4667246rwb; Sun, 13 Nov 2022 10:44:34 -0800 (PST) X-Google-Smtp-Source: AA0mqf5ZMEMn55qFBB5QvZIfM/QLOqLlel4GyEv1usXwhgoGEBdj5EggSsCYMSMB749NPpwdScz3 X-Received: by 2002:a05:6402:e93:b0:461:e598:e0bb with SMTP id h19-20020a0564020e9300b00461e598e0bbmr8959510eda.21.1668365073907; Sun, 13 Nov 2022 10:44:33 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1668365073; cv=none; d=google.com; s=arc-20160816; b=IXA3a6jgnNwmHoxU18BS3WsMTmZOS/TScsId6j4j2acC5iH0l3mWGslJ+eWaCjtM6O gsULSCp32nVwhKFwwHN5hoDUG5STEjHQmALiUpauR7TkbKr+NF7CGafLy9wY0lqLlg2s Z9XS9InCMPo9qk0xakCn+M89W/4IGdjZY5VC0o/bioVAs3byvm5YSSdOxFmWIJkW0/nB kLGdS/wMZxcL1vz//DnTgEZWlCPDHllbbmJ0v0JgvIDhpAHuu9chJVYSaxskdBPNzQUz VH3Mwer8yU2s342znSqYwPRU5cP8jZD/1sCLgel3Xd1txH8DbyRK1LRSCKqGqLADrvuL GNnA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=4byRwPo02lvkmaR0NL7PCXZ/wh86nqqJqs0NF0iJNN4=; b=hmVn5pTL6yTEavxb+mFaNG0X/fDNKdLrtzkKBHDATalO/53JT0AJFJObh2jeL8Finu gDPahLrNI1+LUOW9MedxVOTF1gw6y7tVsz7yj2pNQb3edhJ/Re5RXnEUFdprYBZTNm21 9YbgyKgR2t00eWENDkDL2+h/eM09IY788JSWDlNZeKHdjdOVoBlx7jTHJrxbjj3QhsMK ldfvO+ICAT4pgYRrMEMlgF7MivleEi29Wgd91syL4O8FpCWeC+SeKC9qz1iCNbWxV10X 2Gs//P06l6aNk9ZlVcy54beN3txNGDscqQDEisegmfU+SlLC8lii6vuaCJkY4UB21Qyc 7PgQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=Klr8ditt; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=amarulasolutions.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id j17-20020a17090686d100b007adef1fc90fsi5780027ejy.304.2022.11.13.10.44.10; Sun, 13 Nov 2022 10:44:33 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=Klr8ditt; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=amarulasolutions.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235388AbiKMSJx (ORCPT + 89 others); Sun, 13 Nov 2022 13:09:53 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55272 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235214AbiKMSJw (ORCPT ); Sun, 13 Nov 2022 13:09:52 -0500 Received: from mail-ed1-x52d.google.com (mail-ed1-x52d.google.com [IPv6:2a00:1450:4864:20::52d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6927BDEB for ; Sun, 13 Nov 2022 10:09:51 -0800 (PST) Received: by mail-ed1-x52d.google.com with SMTP id f7so14286107edc.6 for ; Sun, 13 Nov 2022 10:09:51 -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=5lHfl80p+YQcByKu+WAOyfhcYl3QY9b/n2YnWQFCkaB/tm20EwbEhkDBACDD8SCOug oyaYmhqw1P3635Zukrfsl9ubbay/RHuNMLcWEjXLUTsjTY8R3nzR4zNJHVHOw0v5E/44 DZOXwc8BpGLRPZ5sAhFqpIlgifV3wMtpNY3Yw4caVOoc6MYeazo+VbSrhv9bTt/slh9C Moaz991WXSB41WuvdN8Z0feBA8TrB2XEBTs//lbkzyJjPu6Z+68cxAnSS+/otpWSN1U0 7TXlCGIw5+5bCwDYg6xeUCX9+uuc5Y7E8CAUVZg2oaIXNsrW4D8AEU9CfugLQQ+aJw4L SZPA== X-Gm-Message-State: ANoB5pnSJp8cD8MUei8QS5RYoyAV0zE70QROSWbHYuuDHCfsR5E7sO+j t/Pc80ocEc5EXaDHEdh1+5P80txL1Yurnw== 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 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.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); } -- 2.32.0