From patchwork Mon Jul 10 03:23:51 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?b?5p2O5oms6Z+s?= X-Patchwork-Id: 117588 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:9f45:0:b0:3ea:f831:8777 with SMTP id v5csp4766329vqx; Sun, 9 Jul 2023 21:11:11 -0700 (PDT) X-Google-Smtp-Source: APBJJlHee+lnIxcrdkKv5VAn9zxNgbI3qzQAqdhRd+Dvb8zU5nPVhkrD0uY22+fkI7L2JkXSA89o X-Received: by 2002:ac2:4e08:0:b0:4fb:7381:4c69 with SMTP id e8-20020ac24e08000000b004fb73814c69mr9569480lfr.28.1688962271388; Sun, 09 Jul 2023 21:11:11 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1688962271; cv=pass; d=google.com; s=arc-20160816; b=SWk/LeRcawWra4PT15orG7zaCIIzC6wjzdFhhJIkKAINupBs2qQ4XVTOkVAm6lVzhK jt3+UDJ3FUpwE7L/641i4LZSMd6WJGfeFKUGbN2n7spYnpytASFyk9hFQ3Zlv8cW79Ea za4k/iQNqe3frvqZ1xWLsjy49LkwmN5Fj8P1NSaDHvCO4R7HLUkmED0KTgMrOKQaKP3W 7vbf46IC3+620FEUqeFhKp7UVQNE+uWQKstfMfAfOVnocuIJJDSqtUhlqvfb7geGYF4z c48TTLxg1MSWtR3m0Y0UYVrIt9MQQXWN4+fDWxJPswumv3NIGss2p9NALCQL4SnFgR6W OFWw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:content-transfer-encoding :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=hX8d3Rt/yv4cLgjgnhQifBprqlClsb7HOd2RAGU+eVU=; fh=T066uiqTjxYahUH956oepKMkel8Bcf1VtzASGxEcXvM=; b=bJvj5EJbsp3La+yG+UXIyfe/a4oPPs/CAgT+OWZOX8vtD9ZdjtCgtO1DbQbjj+P/u2 rvCgp0GwY5xJZs8L3DH5+Hd0WeomEuxT6IJlcu29rVKvdPpzpwM/nsdWmgE4R/g/GlVG rqTmYhv+EWzfY/alXIpvTktcLOaxS7G/87FmF88s9r61xpW15yhVp4NkNgePJ+wJ13Pf 10QT4BhyFUCJy8dCKcrigmOb+ZuBClfdZb4WKgXJvmqZC1yXTMkhUdD6W2Xo/jFmwm07 UfGANKytwj10LPRCRgLhMmIpOeAkC2ZC1Cxv3qFapnavfvWdblJftmxIAHFTdk58XtPM oqOQ== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@vivo.com header.s=selector2 header.b=njtuL3O8; arc=pass (i=1 spf=pass spfdomain=vivo.com dkim=pass dkdomain=vivo.com dmarc=pass fromdomain=vivo.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=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=vivo.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id z23-20020aa7d417000000b0051de2d71329si8167650edq.597.2023.07.09.21.10.47; Sun, 09 Jul 2023 21:11:11 -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; dkim=pass header.i=@vivo.com header.s=selector2 header.b=njtuL3O8; arc=pass (i=1 spf=pass spfdomain=vivo.com dkim=pass dkdomain=vivo.com dmarc=pass fromdomain=vivo.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=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=vivo.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230360AbjGJD2B (ORCPT + 99 others); Sun, 9 Jul 2023 23:28:01 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57504 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230213AbjGJD1K (ORCPT ); Sun, 9 Jul 2023 23:27:10 -0400 Received: from APC01-TYZ-obe.outbound.protection.outlook.com (mail-tyzapc01on2122.outbound.protection.outlook.com [40.107.117.122]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A687910FF for ; Sun, 9 Jul 2023 20:25:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Dh8EgDO7ZHDCI3P9AJhVnGh0/2aatrqWMzCGrSgYmQzmb2FH3tzdL0DHH9Sr8dDj4ntLJpVh2x/WI2JD/ZIZd+XkJX0Uu86wuDeRafDR0/5suHwI4ebG83wQ565Kz//DY2tQzv6TXZYBY4/NdAw+uaGLmRnWkHdV5wNTVoxketQXH+9GpAvPd4C6+pkBpwXErrKTxwiAmLY4YjQTV/gpYiEI0QvcNLd/GlxwUE3w8lVTRsgfYWUOHIG21NibPppXDZAA5gAA9A51OwtvqImRyQhxCIPKN8TCBAQJvF/cOmmCt614aBqvg6sb0CupZfFXpkZas253j8t1NIjL7mpvEQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=hX8d3Rt/yv4cLgjgnhQifBprqlClsb7HOd2RAGU+eVU=; b=n1XZ4bzoWiwm5TnQknHimQ+AVJfFg892BttlnPNvNiuyJHKd/21HT98YKTXDWDC5n4klsgFguCBgzd8+ARWZVdNd1xBmCfAOj4xJxBX1KQ4KyKTELwvXtwBaQPkfnYBRQ/LdctNpLvFElndT74DGgOmG1Nhx8IU1FDUvc7kld+eB0YN10jTnIffmyh0RfKMO7RcJEfFiAZ3sr/Ee5x+BULm1qPhXu/wcEoHAjpMHGTWPYYlyR/OynN2hRLNbyyqyLzs9cPSrqTCl0aFIMVQUSzWi4nmTPeSxp8RcjyyIVIXJznMhCR+7FYhKvxx3gNpgV/l9PbyrA2PBP4p9/8Dobw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=vivo.com; dmarc=pass action=none header.from=vivo.com; dkim=pass header.d=vivo.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=vivo.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=hX8d3Rt/yv4cLgjgnhQifBprqlClsb7HOd2RAGU+eVU=; b=njtuL3O8mqL3up8WKbEmi9NaT2dBnetbfWUaVU+UGqm6OdBN7F2eh5LchARWbYlbT4AbGrHnwFDoMU+I4738o9nYHxTzdZy/ZLtk7OglAK+VanZD2+fbO0QLSjGStZKUPbDMhsejG2THObE8BhlgeEHFROyZzt60IF45wLBsak01WNcFDsiRr8v5NCLiRFteXLhq+6C1Bs+Ef2adB/D5QEmcLHEHEJRLtMe6pEj0TE/CTMi31bwPQ0naf9REAEhhqCnHMWNM8tTNOgqNXcmFKZiangjGd+7MUYcv2A6GdFFatmWe7ldlt8PHK/PgHlxpVdiM3KEArJab92cO2H6Aug== Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=vivo.com; Received: from SEZPR06MB5269.apcprd06.prod.outlook.com (2603:1096:101:78::6) by SEYPR06MB5376.apcprd06.prod.outlook.com (2603:1096:101:8f::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6565.29; Mon, 10 Jul 2023 03:24:45 +0000 Received: from SEZPR06MB5269.apcprd06.prod.outlook.com ([fe80::fa0e:6c06:7474:285c]) by SEZPR06MB5269.apcprd06.prod.outlook.com ([fe80::fa0e:6c06:7474:285c%5]) with mapi id 15.20.6565.028; Mon, 10 Jul 2023 03:24:44 +0000 From: Yangtao Li To: Joel Stanley , David Airlie , Daniel Vetter , Andrew Jeffery Cc: Yangtao Li , linux-aspeed@lists.ozlabs.org, dri-devel@lists.freedesktop.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH v2 15/19] drm/aspeed: Convert to devm_platform_ioremap_resource() Date: Mon, 10 Jul 2023 11:23:51 +0800 Message-Id: <20230710032355.72914-15-frank.li@vivo.com> X-Mailer: git-send-email 2.39.0 In-Reply-To: <20230710032355.72914-1-frank.li@vivo.com> References: <20230710032355.72914-1-frank.li@vivo.com> X-ClientProxiedBy: SGXP274CA0020.SGPP274.PROD.OUTLOOK.COM (2603:1096:4:b8::32) To SEZPR06MB5269.apcprd06.prod.outlook.com (2603:1096:101:78::6) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SEZPR06MB5269:EE_|SEYPR06MB5376:EE_ X-MS-Office365-Filtering-Correlation-Id: 6ab087a7-6fbd-46f1-fce1-08db80f534c2 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 7b7+xCh73WeozwqxH4Du7EfSc2yap085JqWTibyAgkaB6EaOFalHwS6EOCD/aWpUNu1rpcA3mpeUGECaILuk2WZKKxZY9DhwzKkh0TazY0yCy55Pwo0yXd0RIXqfibTHch4ERW4HAOi+JA6jQxfrhjMHNrMVJsmO3zbMYniubIcuRTS+YT9KGTqOmIrZIabaQlBynWpafHhLijJKpqaLaO4aSinDxfAOBMRPbPG20byCbgtGXRklNi4PJQdNCupDFnEk3hBa+z1/JYgVo7IBf1dyMCaEVXIQgyO1MwWf4kMiBRguYE9YHrmeSkzWTNgcLRxxl/fivyKy+zeLGJssTN+JCAguy2wgEnCpjRmyTLjR/kaoHwPro4JMtBt2DB3kiDhJMc8r98meIYaCLbea5+AAqqVC7B1MAlOTm/n2hcwuXpENz6BWxhEl164vzLfDA8wYvZSotIPr4ZWkvyB8SxnbZIZRq4tMPtk8cKZ7ACUg5Kc7eWfI9vtllbEoWiIKlloG3kcTqrIOJP8C8PdSUN/MrhrmK9287Kw872LohPp4317W7+B1ILWNYqHg/QKgS61YirDJ+zCy8LCfBcoP+OXazn8qG7ai2mUg86EwfaZksf3ISzGHfrmO8RX0VpGw X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:SEZPR06MB5269.apcprd06.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230028)(4636009)(396003)(346002)(39860400002)(376002)(366004)(136003)(451199021)(6506007)(1076003)(5660300002)(26005)(478600001)(6512007)(4744005)(2906002)(110136005)(186003)(83380400001)(2616005)(41300700001)(86362001)(316002)(38100700002)(8676002)(38350700002)(8936002)(52116002)(6666004)(36756003)(66946007)(66476007)(4326008)(6486002)(66556008);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: ORviGm6leSCCIgZTOk5Of8r2sQIVxrNlj9ApbOcJlhOhdVF941p/0UHdYM71S//Bp9izC0F+Eg4jwiDTq/lVglOye42L5FpB5AnVXb7yGHXjNKF2bH1wIIOahVyvECG+SYxJkXL3p8WIJLDBPwQYHzo93IqpgBxtSEz/8M+QxwOrsqo3RAhZ+vSptaIdxRWZnYpQmpHDDeXWPgNRQTkAEeVYLQSMdOYyhEfSR+oCdBD0M1x5a0en5J+zfUsHgp2F8eKXuusyuE3E5ZALiRV6SzCWD4/H+4YxXJ4d4BbsOhxtJTxNs2b1KYfeG8NR7h/gNO0JpKReWVLhAFRu0v3xIoz8Y34CiPnXweqk3uFWN3+Y6p3q1aiiPA0pXsTe8sK1OUcmxEGW5QZ/bcwicYjzGB935dDjxPvO9kOTDv6Gq4VZ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wDVxhqfjvmULr6jgrf8tqYL42DD8VaEGXm5okgWgoZ8Tta32GJew59ZFLTroK2F4zYYTzeCY/RN6COlGn0u1A/i0tQP1uso7Gtogoo92YJPD X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: 6ab087a7-6fbd-46f1-fce1-08db80f534c2 X-MS-Exchange-CrossTenant-AuthSource: SEZPR06MB5269.apcprd06.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 10 Jul 2023 03:24:44.5719 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 923e42dc-48d5-4cbe-b582-1a797a6412ed X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: N63Kza7frI9lcXyBkGt0lLh14V1WFqNFjji2m00k+9GcfU9cc1hYL1kpvU5K7tOIxDbADjxovCEOFx9sXw+7Kg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SEYPR06MB5376 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_BLOCKED, RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,SPF_PASS,T_SCC_BODY_TEXT_LINE 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: INBOX X-GMAIL-THRID: 1771005302623748562 X-GMAIL-MSGID: 1771005302623748562 Use devm_platform_ioremap_resource() to simplify code. Signed-off-by: Yangtao Li --- drivers/gpu/drm/aspeed/aspeed_gfx_drv.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/gpu/drm/aspeed/aspeed_gfx_drv.c b/drivers/gpu/drm/aspeed/aspeed_gfx_drv.c index c8c7f8215155..d681248f098c 100644 --- a/drivers/gpu/drm/aspeed/aspeed_gfx_drv.c +++ b/drivers/gpu/drm/aspeed/aspeed_gfx_drv.c @@ -144,11 +144,9 @@ static int aspeed_gfx_load(struct drm_device *drm) struct device_node *np = pdev->dev.of_node; const struct aspeed_gfx_config *config; const struct of_device_id *match; - struct resource *res; int ret; - res = platform_get_resource(pdev, IORESOURCE_MEM, 0); - priv->base = devm_ioremap_resource(drm->dev, res); + priv->base = devm_platform_ioremap_resource(pdev, 0); if (IS_ERR(priv->base)) return PTR_ERR(priv->base);