From patchwork Fri Apr 21 08:13:03 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yang Li X-Patchwork-Id: 86175 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp913449vqo; Fri, 21 Apr 2023 01:38:54 -0700 (PDT) X-Google-Smtp-Source: AKy350Y4JoS3PergcSHV1I4h00RBRLaWj5G5djJgWKYr1vYu7wtVGZRhOJA+w+Uzi0jSA+r2n0RX X-Received: by 2002:a05:6a21:33a2:b0:f2:9378:814a with SMTP id yy34-20020a056a2133a200b000f29378814amr879009pzb.49.1682066334138; Fri, 21 Apr 2023 01:38:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1682066334; cv=none; d=google.com; s=arc-20160816; b=i8s2uB/KieFlg6wWV9MQuZds2ro8z+KXTjBMaJXcUCS9VC8rlMDaPNpgqFQXHTTk8R zJbYyrEHkeI8bBfB6185n2JVofAfZ7MkexGQhdv2b6FKxGcb0FOQaxDNe0Vfn5HteYq1 9eq9Z/jAa5t9VgKZup+bSUBtBfA/4wCe48E+6L2tQ6DAEfnQ/QlOUJnPTsN7O9tmKIrT tI6MlDvTSqD9eQ/4oMIBH45V51LbhaFUN5w7RVUNI1SIHty7Dgjg/Nhi8OXoC96cZsq7 OEz3kbkQz/OJ17TpFAeo9k7gY9+UlCboA5xa6+T5xLts+bJFWvikaE8ehCrbGlSKFnHr 0UWQ== 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 Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id u12-20020a63600c000000b005211941267asi3854739pgb.153.2023.04.21.01.38.39; Fri, 21 Apr 2023 01:38:54 -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 S231165AbjDUINZ (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 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 X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1763774388233997082?= X-GMAIL-MSGID: =?utf-8?q?1763774388233997082?= 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);