Received: by 2002:a05:6a10:1287:0:0:0:0 with SMTP id d7csp5026858pxv; Wed, 28 Jul 2021 01:01:56 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwMFrurpB1biYlvtx/E8muk+Vt1o8W+zp23kIg8UKdhe4htgtC6ZS6qkSCQah9OU1GEsZ+P X-Received: by 2002:a05:6638:264e:: with SMTP id n14mr25120513jat.71.1627459316733; Wed, 28 Jul 2021 01:01:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1627459316; cv=none; d=google.com; s=arc-20160816; b=kO7Nxk9UjRK5guaEEoP1HieyRqDHFMUJcHSmvtPAFoV6mJX4loqljoDW3yOJlxSwNS pvKnIZf1u/UkzLhMjyU3WlsznycAjpfLy8GiLNtWBKI+Bl6Ym6C1Bad3DjITBdxqUjJE v+paTQlCIEsw5oRWUeDAfTeRaD6gvIxh1HeGPg84X5dLpIVI2S3NWbW4qQikD79xv4xq KrKXZA4yY4Wk9LS0eKa6wS7IFN1IOaV3vZg0K+2cVqoEKuuiN320F5sdcmfUpa/GwYzu PdjFF3UEwXntkpCyDX4jusFZMblJaE/31dlcNPIuWaJS83hF5Srvm5TmSmr6w+15pnwW oDTw== 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=ioBsahqqnq+1cEbN+doI6OZXCKYpy14Ui4TSDwtqhEs=; b=LdpWqTEM1BuqwOGuAKupKkjP/548edY4ZbQgPfoUEb4H/D93hptdYAjhQe5bXC8bCv pWUohfVKLONUEEozThgoWGepiYr3jeuK2OE6Bp6eBWL4HX6FosnlqqIZ62Bw5fTznOpf PbihnkOzPkHgde6kvTpFsK6+YhfdisTMAVT2Cl8HTN7YQjJlf840Wq62lChmxdPRT+uI lbLh2qsf+g4Zu0aF4CXARxdgEwF+mSS1FG8COKva508TWMhy8UJTigSxxyHgzIwJerUm If9P8yO4KOpWOES243o02TjCQJ8VRMiko+hdN5UxgbFIJHFKC5NgkIyo3RCbbd0Ww+oH yBcQ== 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 a3si5724221ion.84.2021.07.28.01.01.45; Wed, 28 Jul 2021 01:01:56 -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 S235169AbhG1H7g (ORCPT + 99 others); Wed, 28 Jul 2021 03:59:36 -0400 Received: from mailgw01.mediatek.com ([60.244.123.138]:38426 "EHLO mailgw01.mediatek.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S235113AbhG1H7T (ORCPT ); Wed, 28 Jul 2021 03:59:19 -0400 X-UUID: 8e57036523d742eaa3a1241d0db2c2c5-20210728 X-UUID: 8e57036523d742eaa3a1241d0db2c2c5-20210728 Received: from mtkexhb01.mediatek.inc [(172.21.101.102)] by mailgw01.mediatek.com (envelope-from ) (Generic MTA with TLSv1.2 ECDHE-RSA-AES256-SHA384 256/256) with ESMTP id 1643274991; Wed, 28 Jul 2021 15:59:13 +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:12 +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:10 +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 9/9] phy: phy-mtk-mipi-dsi: convert to devm_platform_ioremap_resource Date: Wed, 28 Jul 2021 15:58:31 +0800 Message-ID: <1627459111-2907-9-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-mipi-dsi.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/drivers/phy/mediatek/phy-mtk-mipi-dsi.c b/drivers/phy/mediatek/phy-mtk-mipi-dsi.c index 61c942fbf4a1..28ad9403c441 100644 --- a/drivers/phy/mediatek/phy-mtk-mipi-dsi.c +++ b/drivers/phy/mediatek/phy-mtk-mipi-dsi.c @@ -130,7 +130,6 @@ static int mtk_mipi_tx_probe(struct platform_device *pdev) { struct device *dev = &pdev->dev; struct mtk_mipi_tx *mipi_tx; - struct resource *mem; const char *ref_clk_name; struct clk *ref_clk; struct clk_init_data clk_init = { @@ -148,11 +147,9 @@ static int mtk_mipi_tx_probe(struct platform_device *pdev) mipi_tx->driver_data = of_device_get_match_data(dev); - mem = platform_get_resource(pdev, IORESOURCE_MEM, 0); - mipi_tx->regs = devm_ioremap_resource(dev, mem); - if (IS_ERR(mipi_tx->regs)) { + mipi_tx->regs = devm_platform_ioremap_resource(pdev, 0); + if (IS_ERR(mipi_tx->regs)) return PTR_ERR(mipi_tx->regs); - } ref_clk = devm_clk_get(dev, NULL); if (IS_ERR(ref_clk)) { -- 2.18.0