Received: by 2002:a05:6358:9144:b0:117:f937:c515 with SMTP id r4csp1924847rwr; Fri, 21 Apr 2023 01:22:51 -0700 (PDT) X-Google-Smtp-Source: AKy350YQzIKppdnJpChnigglUkDiRM1KGhZpxF7tdKFoXgp7IEb2h+m2LFn0xGR3aXPKKq0xJ7oi X-Received: by 2002:a05:6a00:1818:b0:634:10a8:538c with SMTP id y24-20020a056a00181800b0063410a8538cmr5836313pfa.12.1682065371458; Fri, 21 Apr 2023 01:22:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1682065371; cv=none; d=google.com; s=arc-20160816; b=MtdorOc8kNXU4POMvISb/+KuGTEppuhQ+6AA6vYhjb/X8kbpdfaFcdx7SK7O3IJidi NCWsmO1ZpG8BN60NDVccZPh2KKlmtYPrRgqp3fcdcOfww18VZxsg3lHET4MtFtnFO6WA 2gYkcrn1us+r03Y8Jn6YHepBohDE1nweJ/qh9Cs53m7baL6NuzbN6JBn3cFJnd+qRD0f 1ZkwIpXuBnRQxIuKwe+zV2X2t7PUntOGHm0rt6WFgU91RlWKUzeNhej7Jyz33h+MmNR+ o70v4F0EXyIK1jx6mg8V28vhtixRj4C8YIikEyJ1xVfQshkpmwd2kzVesBf0tRvrpT7M yIbQ== 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=4OJUt/HW52IAdCORvZ9qHgq+rY8EDYXVBA9aE8KRBTk=; b=jPVaOlFJlP0N8Xe9/8JO4eiSdnQ4fVCcGQtVwm4QyR+UIQvMHMr4aw6KicBXYPOdtE q1vQwkgfNZICNdSwYSOYR5bca9q0enNKnFEhQo0itkfgJJr3phTWAwC6rDe2tMUWdaSq 7w8K6fUtX/CkurUVz1uO2L0Q8icVX/rv2lv0Y2FdqC7bPJAuPcu0gtFiLlA+rvTE/D5K DqkvofQ1cDsrl2fYVu+e8fPF48FVCVikyT0lJ5xDaZf3bV7FWtKwB47kDkL3GrHaqGPl +LetiODHlmdN59mDhMzQVSlo2shvKTCr4KpPLHp4ti/8UIXWXM5UbW6TvHK/ro475ZBi jUHw== 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 g62-20020a636b41000000b00513522599casi3914442pgc.831.2023.04.21.01.22.39; Fri, 21 Apr 2023 01:22:51 -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 S230488AbjDUINZ (ORCPT + 99 others); Fri, 21 Apr 2023 04:13:25 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44536 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230052AbjDUINX (ORCPT ); Fri, 21 Apr 2023 04:13:23 -0400 Received: from out30-112.freemail.mail.aliyun.com (out30-112.freemail.mail.aliyun.com [115.124.30.112]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6C07B76BA for ; Fri, 21 Apr 2023 01:13:09 -0700 (PDT) X-Alimail-AntiSpam: AC=PASS;BC=-1|-1;BR=01201311R951e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=ay29a033018046059;MF=yang.lee@linux.alibaba.com;NM=1;PH=DS;RN=8;SR=0;TI=SMTPD_---0Vgc1Elp_1682064785; Received: from localhost(mailfrom:yang.lee@linux.alibaba.com fp:SMTPD_---0Vgc1Elp_1682064785) by smtp.aliyun-inc.com; Fri, 21 Apr 2023 16:13:05 +0800 From: Yang Li To: hjc@rock-chips.com Cc: heiko@sntech.de, airlied@gmail.com, daniel@ffwll.ch, dri-devel@lists.freedesktop.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Yang Li Subject: [PATCH -next] drm/rockchip: dsi: Use devm_platform_get_and_ioremap_resource() Date: Fri, 21 Apr 2023 16:13:03 +0800 Message-Id: <20230421081303.122452-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_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_get_and_ioremap_resource(), as this is exactly what this function does. Signed-off-by: Yang Li --- drivers/gpu/drm/rockchip/dw-mipi-dsi-rockchip.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/gpu/drm/rockchip/dw-mipi-dsi-rockchip.c b/drivers/gpu/drm/rockchip/dw-mipi-dsi-rockchip.c index 917e79951aac..ab57df7c6eab 100644 --- a/drivers/gpu/drm/rockchip/dw-mipi-dsi-rockchip.c +++ b/drivers/gpu/drm/rockchip/dw-mipi-dsi-rockchip.c @@ -1351,8 +1351,7 @@ static int dw_mipi_dsi_rockchip_probe(struct platform_device *pdev) if (!dsi) return -ENOMEM; - res = platform_get_resource(pdev, IORESOURCE_MEM, 0); - dsi->base = devm_ioremap_resource(dev, res); + dsi->base = devm_platform_get_and_ioremap_resource(pdev, 0, &res); if (IS_ERR(dsi->base)) { DRM_DEV_ERROR(dev, "Unable to get dsi registers\n"); return PTR_ERR(dsi->base); -- 2.20.1.7.g153144c