Received: by 2002:a05:6358:9144:b0:117:f937:c515 with SMTP id r4csp1941381rwr; Fri, 21 Apr 2023 01:42:19 -0700 (PDT) X-Google-Smtp-Source: AKy350b78tc7F0IREAHLHWPL9V0FF3LSSzSPqOVM7XadObV/q6eoFKUmemZwhEGgnB3hBs//nm4h X-Received: by 2002:aa7:88d1:0:b0:63b:8778:99f7 with SMTP id k17-20020aa788d1000000b0063b877899f7mr5915196pff.9.1682066539097; Fri, 21 Apr 2023 01:42:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1682066539; cv=none; d=google.com; s=arc-20160816; b=NDUXt+OoMseJmK+XvWeFzwn3tHu/RME5btlH5Sk6W0C6xARay/sTjklAr25wyN6ZKT mwhPJDA7JaS+EqXjCcFkK6YW0RENGsPwWyAk6/3Lzos7p2PYoXV+8OXNgVQoa1rFx7tT CZJ+QMJDdySKThI455rpEPxpElQBJbwSNfEyuG2zDNmMkwOl/10mQd4VrqE1vbn94YFx R87dWc960xiwoiyhF5mKExc+pt41Q1PNf2OV4nXTEYaVnax0ngWJFOnbMU0gihEuxEH3 AgSz7bgyIVvZitn3gK0gZObj/e+E2BBzbKOtA5K78TtX3wa39qfXEYRQP4LfRhCNvUJl 29JA== 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; bh=KhbZYwIYcfth15iDwK85Q9+Uk888utzLNeCe/qf4+Io=; b=eHJ58JSG8nTeWVYdZDLWMqFJOWledZyN4pl7Q+oDLlwxWHQply+3pfshDoGBMdF1Ow mWuvp9x1YzTgFbPBg3QVbSQHMzv7acNu6jkzc4qmqCPeUyQYgvwE7Gc6xgUoIqTtuJJn fUt+9tu55InmJwOOMnu7ZAwMDLYCG+MOePjCy4n29x6HN0swBlEIJsbuJkhhVR6KX6Kc 9WUEqc9MRHSrWBVDcGXYbuZA6mQJX93zEcyAQpPastPLADA0lkzYPZu6BWXRBxLFNre6 7h0sVlI+FtZ7h8799XXdkC3nkUN7I6VqxkA6BgDJBGn8AWp138F9HvlLWlcmnyWLz13Z NN+w== ARC-Authentication-Results: i=1; mx.google.com; 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=fail (p=NONE sp=NONE dis=NONE) header.from=alibaba.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id g18-20020aa79f12000000b0063aed85c989si3897250pfr.71.2023.04.21.01.42.07; Fri, 21 Apr 2023 01:42:19 -0700 (PDT) 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; 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=fail (p=NONE sp=NONE dis=NONE) header.from=alibaba.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230154AbjDUIeL (ORCPT + 99 others); Fri, 21 Apr 2023 04:34:11 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57546 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230025AbjDUIeJ (ORCPT ); Fri, 21 Apr 2023 04:34:09 -0400 Received: from out30-113.freemail.mail.aliyun.com (out30-113.freemail.mail.aliyun.com [115.124.30.113]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5D3F04C0E for ; Fri, 21 Apr 2023 01:34:07 -0700 (PDT) X-Alimail-AntiSpam: AC=PASS;BC=-1|-1;BR=01201311R671e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=ay29a033018045168;MF=yang.lee@linux.alibaba.com;NM=1;PH=DS;RN=12;SR=0;TI=SMTPD_---0Vgc5eZY_1682066043; Received: from localhost(mailfrom:yang.lee@linux.alibaba.com fp:SMTPD_---0Vgc5eZY_1682066043) by smtp.aliyun-inc.com; Fri, 21 Apr 2023 16:34:04 +0800 From: Yang Li To: yannick.fertre@foss.st.com Cc: raphael.gallais-pou@foss.st.com, philippe.cornu@foss.st.com, airlied@gmail.com, daniel@ffwll.ch, mcoquelin.stm32@gmail.com, alexandre.torgue@foss.st.com, dri-devel@lists.freedesktop.org, linux-stm32@st-md-mailman.stormreply.com, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Yang Li Subject: [PATCH -next] drm/stm: dsi: Use devm_platform_ioremap_resource() Date: Fri, 21 Apr 2023 16:34:02 +0800 Message-Id: <20230421083402.21364-1-yang.lee@linux.alibaba.com> X-Mailer: git-send-email 2.20.1.7.g153144c MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-9.9 required=5.0 tests=BAYES_00, ENV_AND_HDR_SPF_MATCH,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE,UNPARSEABLE_RELAY, USER_IN_DEF_SPF_WL autolearn=ham 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 Convert platform_get_resource(),devm_ioremap_resource() to a single call to devm_platform_ioremap_resource(), as this is exactly what this function does. Signed-off-by: Yang Li --- drivers/gpu/drm/stm/dw_mipi_dsi-stm.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/gpu/drm/stm/dw_mipi_dsi-stm.c b/drivers/gpu/drm/stm/dw_mipi_dsi-stm.c index 89897d5f5c72..1750b6a25e87 100644 --- a/drivers/gpu/drm/stm/dw_mipi_dsi-stm.c +++ b/drivers/gpu/drm/stm/dw_mipi_dsi-stm.c @@ -444,15 +444,13 @@ static int dw_mipi_dsi_stm_probe(struct platform_device *pdev) struct device *dev = &pdev->dev; struct dw_mipi_dsi_stm *dsi; struct clk *pclk; - struct resource *res; int ret; dsi = devm_kzalloc(dev, sizeof(*dsi), GFP_KERNEL); if (!dsi) return -ENOMEM; - res = platform_get_resource(pdev, IORESOURCE_MEM, 0); - dsi->base = devm_ioremap_resource(dev, res); + dsi->base = devm_platform_ioremap_resource(pdev, 0); if (IS_ERR(dsi->base)) { ret = PTR_ERR(dsi->base); DRM_ERROR("Unable to get dsi registers %d\n", ret); -- 2.20.1.7.g153144c