Message ID | 20230421083402.21364-1-yang.lee@linux.alibaba.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp914815vqo; Fri, 21 Apr 2023 01:42:25 -0700 (PDT) X-Google-Smtp-Source: AKy350a0eSEJCNG/3jXZ6zSuR/WeGt/yMQj3ivS5iX1qrfIVQG0Ih65AoHuxxNPzSfDQXwxh+t7H X-Received: by 2002:a17:90a:8683:b0:246:b4b4:5540 with SMTP id p3-20020a17090a868300b00246b4b45540mr4641553pjn.1.1682066545213; Fri, 21 Apr 2023 01:42:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1682066545; cv=none; d=google.com; s=arc-20160816; b=LV0R4cLPxG9TrkJjK/svaSPs9wKFu+lBFehH1HOQY6V9bQBkNmVK+IqTgrn0ZteTJZ 1jCWM2bFnUmrWZh4Gnry26y7Gwut9pLfyLBB6QSkJ6nD9XwAT6U3nst9DqpdhpzeVYBL l3HDeTJeUs53+aVyGUwbl152sYepOg1WUjlAR8rZd49RrzijrxJAUB1eSzB0Rltd+qDf rXgkYWZurPwAgkxlSwvF/EKN3DMoMAGKbraDEyv0rcRpeVxYf8aKL+QvIRrluCn7nCPn cv8ywzk4InySMf4dI7eIpUPysl/I81V7iBWgtANhUsBYzF0apDo2LUXnCKE/YOTVwI4o lsiw== 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 Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id f16-20020a63f110000000b00524da606617si828227pgi.233.2023.04.21.01.42.13; Fri, 21 Apr 2023 01:42:25 -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 S230299AbjDUIeL (ORCPT <rfc822;cjcooper78@gmail.com> + 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 <rfc822;linux-kernel@vger.kernel.org>); 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 <linux-kernel@vger.kernel.org>; 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 <yang.lee@linux.alibaba.com> 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 <yang.lee@linux.alibaba.com> 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: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1763774609699518748?= X-GMAIL-MSGID: =?utf-8?q?1763774609699518748?= |
Series |
[-next] drm/stm: dsi: Use devm_platform_ioremap_resource()
|
|
Commit Message
Yang Li
April 21, 2023, 8:34 a.m. UTC
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 <yang.lee@linux.alibaba.com>
---
drivers/gpu/drm/stm/dw_mipi_dsi-stm.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
Comments
Hi Yang, On 4/21/23 10:34, Yang Li wrote: > 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 <yang.lee@linux.alibaba.com> > --- > 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); Thanks for the patch. Acked-by: Raphael Gallais-Pou <raphael.gallais-pou@foss.st.com>
On 4/21/23 10:34, Yang Li wrote: > 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 <yang.lee@linux.alibaba.com> > --- > 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); Applied on drm-misc-next. Many thanks for your patch, Philippe :-)
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);