Received: by 2002:a05:6a10:1287:0:0:0:0 with SMTP id d7csp5026218pxv; Wed, 28 Jul 2021 01:00:58 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx9BpTCgtFt6NZ2YHTB7CCE8YHYeBZ4Le1UWHmvQpfGcRjCLRkTP0rWcmn9XtH1UyOq9uN0 X-Received: by 2002:a5e:8619:: with SMTP id z25mr22453139ioj.13.1627459258220; Wed, 28 Jul 2021 01:00:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1627459258; cv=none; d=google.com; s=arc-20160816; b=gTEXUfEuqMD9sfz074MMn/MXz9TYXZcpt1HRlnv+hQfLxzIxqa4Sf1eNAkNNfVvnP2 0e+QqnoNJxSlZORa/voWMAZ3G9oQyrt/BKpYDbk2H1iWwDJOu1DUPH7qIqf6s5j+uF4v 60Z1WS8tJBNyUhcByEhAM/SjKsuhCaSyAW1TyI62sZw8XqmjtQNO0bt9eOoYil5aqrPh fbUgDt4UcDnj3f5G8fkqwvuQ+bdwgYbJoelDaex12wyP3hSU1gCqM+UDCNqkOLkf14Bh UashjhT23MSpyDm6byfVp6N3jEzoc1KES83WDfRJ16iVgap4KOFx1KyT/E2Uy84K45ro tnFQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:references:in-reply-to:message-id :date:subject:cc:to:from; bh=0BDZ2ctXzvmlFqwn4Za6yQtDKBKvKjvZXTy26fSvoJ8=; b=nUAgnTacidm5JEcpQBATs9R+5od7DgZIDpfYcxGI2iKsaTWWM4AmiXDPm7DGLqr9tO s6TeHC7wS/w5aNPhDl4hqrf+7w0fH9Y9rgKDPMzmuuvCGj7oGxO1OJKXoJFov7MMX0OQ cw5Az1x6Jm5avGZ3DfLr1jTN5bpH540W4uL5cGX+0BfhSV2GyNL672A41LMyrFGYFgYB W1s4XxG/QYMfM+u/FyBlzNBvUMlWrTfRviwDbkx0R567vnC1l6BzELIGvIJKNDQhunYb ujW3ztoeI2GbC0Nc1cBX7/IPpJaVHQfWhdu1gst5RVoPt/kSEAOp4xMPyhkqk311JDp7 G87w== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=mediatek.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id x1si5730056ilp.101.2021.07.28.01.00.47; Wed, 28 Jul 2021 01:00:58 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=mediatek.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235341AbhG1H7f (ORCPT + 99 others); Wed, 28 Jul 2021 03:59:35 -0400 Received: from mailgw02.mediatek.com ([210.61.82.184]:43092 "EHLO mailgw02.mediatek.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S235070AbhG1H7R (ORCPT ); Wed, 28 Jul 2021 03:59:17 -0400 X-UUID: 18a18a3682fc48beade026321c9e7dac-20210728 X-UUID: 18a18a3682fc48beade026321c9e7dac-20210728 Received: from mtkmbs10n2.mediatek.inc [(172.21.101.183)] by mailgw02.mediatek.com (envelope-from ) (Generic MTA with TLSv1.2 ECDHE-RSA-AES256-GCM-SHA384 256/256) with ESMTP id 870256727; Wed, 28 Jul 2021 15:59:11 +0800 Received: from mtkcas10.mediatek.inc (172.21.101.39) by mtkmbs06n2.mediatek.inc (172.21.101.130) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Wed, 28 Jul 2021 15:59:09 +0800 Received: from localhost.localdomain (10.17.3.153) by mtkcas10.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.0.1497.2 via Frontend Transport; Wed, 28 Jul 2021 15:59:08 +0800 From: Chunfeng Yun To: Vinod Koul , Rob Herring , Chun-Kuang Hu CC: Chunfeng Yun , Kishon Vijay Abraham I , Philipp Zabel , Matthias Brugger , , , , , , , Eddie Hung Subject: [PATCH 7/9] phy: phy-mtk-hdmi: convert to devm_platform_ioremap_resource Date: Wed, 28 Jul 2021 15:58:29 +0800 Message-ID: <1627459111-2907-7-git-send-email-chunfeng.yun@mediatek.com> X-Mailer: git-send-email 1.8.1.1.dirty In-Reply-To: <1627459111-2907-1-git-send-email-chunfeng.yun@mediatek.com> References: <1627459111-2907-1-git-send-email-chunfeng.yun@mediatek.com> MIME-Version: 1.0 Content-Type: text/plain X-MTK: N Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Use devm_platform_ioremap_resource to simplify code Signed-off-by: Chunfeng Yun --- drivers/phy/mediatek/phy-mtk-hdmi.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/drivers/phy/mediatek/phy-mtk-hdmi.c b/drivers/phy/mediatek/phy-mtk-hdmi.c index 8ad8f717ef43..5fb4217fb8e0 100644 --- a/drivers/phy/mediatek/phy-mtk-hdmi.c +++ b/drivers/phy/mediatek/phy-mtk-hdmi.c @@ -100,7 +100,6 @@ static int mtk_hdmi_phy_probe(struct platform_device *pdev) { struct device *dev = &pdev->dev; struct mtk_hdmi_phy *hdmi_phy; - struct resource *mem; struct clk *ref_clk; const char *ref_clk_name; struct clk_init_data clk_init = { @@ -116,11 +115,9 @@ static int mtk_hdmi_phy_probe(struct platform_device *pdev) if (!hdmi_phy) return -ENOMEM; - mem = platform_get_resource(pdev, IORESOURCE_MEM, 0); - hdmi_phy->regs = devm_ioremap_resource(dev, mem); - if (IS_ERR(hdmi_phy->regs)) { + hdmi_phy->regs = devm_platform_ioremap_resource(pdev, 0); + if (IS_ERR(hdmi_phy->regs)) return PTR_ERR(hdmi_phy->regs); - } ref_clk = devm_clk_get(dev, "pll_ref"); if (IS_ERR(ref_clk)) { -- 2.18.0