From patchwork Tue Mar 14 05:58:26 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yang Li X-Patchwork-Id: 69325 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:5915:0:0:0:0:0 with SMTP id v21csp1595533wrd; Mon, 13 Mar 2023 23:32:41 -0700 (PDT) X-Google-Smtp-Source: AK7set93jEEunZQkZZ1UyrbgBR3QDNu+ifpX+tYfa6dGdAbvdkjaEWa23CcBteJc9rx+x5QGOEj3 X-Received: by 2002:a17:902:ce90:b0:198:9e29:cc4f with SMTP id f16-20020a170902ce9000b001989e29cc4fmr43561626plg.43.1678775561433; Mon, 13 Mar 2023 23:32:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1678775561; cv=none; d=google.com; s=arc-20160816; b=pYVAqxql1WGEDaA3OSriL49/K2aMrJS7ycsln7eHiu7KWy1yMHR85OOhQdl9O5btyB RNAr4469NKKYAd7jC4fb4ft0NaTYaReHmz/qD+3v1Mwjo9XRByAgSI+sT+kQ1z/rvETI jMcgZgyuRBNImIY15c6E0NQIhGmsQ3Z15spiyFcmpSnoaZv/jMWe0vtZSqak3QfR002+ eXx3sBMjA1IHL/lUr58pKiOxDwUgdqiL7J1taWQcqSFozzvMwl3gNfFV/o38DM+7F9s7 nHS3cypBP+WZu1q00nX6DQj8u4hNaHQ+w1aWCjFLwNcqaHt757Flmh+LLeA0NzSJqtGI r56Q== 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=CM/DHmhIE18wOXtREr4lOnqD6D6v0idV+4TWYLbm798=; b=P9qvAJhTJ9A5dK/NWEz+R8XNnfcY+A0rs6cp6fb5NE3WxHDtXohqhfehIlpde4IJjE EfQairaYm5XbLKAyOZ34IeeVtJprerjvPAeTo9W9BxejVxFBIv4KJwAy9XIUYn5fGEbA 2P2TOI95c920buyVvb/rXYLFru/MVy4g8l6Cqz/lbkfsEc2MZ62Gee7f9dPO2KMXeEkQ 2OqKnj9AyIMCxlb5X9RrWYxarlxcf+uhKigXpUzLOZx2PtOXeP5xYWgaqR6s5XaL3VrE hothPFGxyip70o/508G4WCrA1x1/3PRnCExja8cdRka1v756EXoovTTPt42fXKLIb5bx 9u4g== 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 jz6-20020a170903430600b0019edb7346fbsi1747395plb.18.2023.03.13.23.32.26; Mon, 13 Mar 2023 23:32:41 -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 S229730AbjCNF6e (ORCPT + 99 others); Tue, 14 Mar 2023 01:58:34 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56010 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229483AbjCNF6d (ORCPT ); Tue, 14 Mar 2023 01:58:33 -0400 Received: from out30-100.freemail.mail.aliyun.com (out30-100.freemail.mail.aliyun.com [115.124.30.100]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 06A7BDBCE; Mon, 13 Mar 2023 22:58:30 -0700 (PDT) X-Alimail-AntiSpam: AC=PASS;BC=-1|-1;BR=01201311R131e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=ay29a033018046060;MF=yang.lee@linux.alibaba.com;NM=1;PH=DS;RN=11;SR=0;TI=SMTPD_---0VdqmYya_1678773506; Received: from localhost(mailfrom:yang.lee@linux.alibaba.com fp:SMTPD_---0VdqmYya_1678773506) by smtp.aliyun-inc.com; Tue, 14 Mar 2023 13:58:27 +0800 From: Yang Li To: mchehab@kernel.org Cc: eugen.hristev@collabora.com, nicolas.ferre@microchip.com, alexandre.belloni@bootlin.com, claudiu.beznea@microchip.com, gregkh@linuxfoundation.org, linux-media@vger.kernel.org, linux-staging@lists.linux.dev, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Yang Li Subject: [PATCH -next] media: atmel: atmel-isc: Use devm_platform_ioremap_resource() Date: Tue, 14 Mar 2023 13:58:26 +0800 Message-Id: <20230314055826.103682-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_DNSWL_NONE,RCVD_IN_MSPIKE_H2, SPF_HELO_NONE,SPF_PASS,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?1760323762903536774?= X-GMAIL-MSGID: =?utf-8?q?1760323762903536774?= According to commit 7945f929f1a7 ("drivers: provide devm_platform_ioremap_resource()"), convert platform_get_resource(), devm_ioremap_resource() to a single call to Use devm_platform_ioremap_resource(), as this is exactly what this function does. Signed-off-by: Yang Li Reviewed-by: Claudiu Beznea --- drivers/staging/media/deprecated/atmel/atmel-sama5d2-isc.c | 4 +--- drivers/staging/media/deprecated/atmel/atmel-sama7g5-isc.c | 4 +--- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/drivers/staging/media/deprecated/atmel/atmel-sama5d2-isc.c b/drivers/staging/media/deprecated/atmel/atmel-sama5d2-isc.c index ba0614f981a2..eebb336efce7 100644 --- a/drivers/staging/media/deprecated/atmel/atmel-sama5d2-isc.c +++ b/drivers/staging/media/deprecated/atmel/atmel-sama5d2-isc.c @@ -389,7 +389,6 @@ static int atmel_isc_probe(struct platform_device *pdev) { struct device *dev = &pdev->dev; struct isc_device *isc; - struct resource *res; void __iomem *io_base; struct isc_subdev_entity *subdev_entity; int irq; @@ -403,8 +402,7 @@ static int atmel_isc_probe(struct platform_device *pdev) platform_set_drvdata(pdev, isc); isc->dev = dev; - res = platform_get_resource(pdev, IORESOURCE_MEM, 0); - io_base = devm_ioremap_resource(dev, res); + io_base = devm_platform_ioremap_resource(pdev, 0); if (IS_ERR(io_base)) return PTR_ERR(io_base); diff --git a/drivers/staging/media/deprecated/atmel/atmel-sama7g5-isc.c b/drivers/staging/media/deprecated/atmel/atmel-sama7g5-isc.c index 01ababdfcbd9..beed40fe3f91 100644 --- a/drivers/staging/media/deprecated/atmel/atmel-sama7g5-isc.c +++ b/drivers/staging/media/deprecated/atmel/atmel-sama7g5-isc.c @@ -378,7 +378,6 @@ static int microchip_xisc_probe(struct platform_device *pdev) { struct device *dev = &pdev->dev; struct isc_device *isc; - struct resource *res; void __iomem *io_base; struct isc_subdev_entity *subdev_entity; int irq; @@ -392,8 +391,7 @@ static int microchip_xisc_probe(struct platform_device *pdev) platform_set_drvdata(pdev, isc); isc->dev = dev; - res = platform_get_resource(pdev, IORESOURCE_MEM, 0); - io_base = devm_ioremap_resource(dev, res); + io_base = devm_platform_ioremap_resource(pdev, 0); if (IS_ERR(io_base)) return PTR_ERR(io_base);