From patchwork Wed Jul 26 11:37:55 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: 126276 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:a985:0:b0:3e4:2afc:c1 with SMTP id t5csp340067vqo; Wed, 26 Jul 2023 04:42:54 -0700 (PDT) X-Google-Smtp-Source: APBJJlFqYKvaW8Ws5A4WGI7J7XJF6znK1Nr9RKSxQude5bIKaYFP9gLQb57vpOlsH7f19Epq8+Bd X-Received: by 2002:aa7:c50c:0:b0:51d:7fa6:62ca with SMTP id o12-20020aa7c50c000000b0051d7fa662camr1486924edq.14.1690371774201; Wed, 26 Jul 2023 04:42:54 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1690371774; cv=pass; d=google.com; s=arc-20160816; b=04kYMqDsusCYXiiwlD/OwGgmUPvJvdTZmEVAJvuYwHMN8zkQfA1HyzHmxGxd1qGaVX hxIwqjm4CotdipuTwkUZZmnVQuDxrxXR/l8eF+K4wg3UKmR9SdvnNWhZPSBvyjmf8Fyp DcR/JgRHlhTUGJ0WDvqclZuadKhZNZ7NJoDE03Qg/4xvTt91aH7N8Fr5FtkDqZfYFpJi jLz/ww7N2uDSkqu7G/b9QWz3cGGeX8w5lfXdLtseV0ZdMxCMNJNl1F0de8znWO1jzQ3R b+Ty6PfHx0q1Ajy12xwIVWSxNxmozD5ARPUYNcXTqiFqrvWRclm8i/G0jLUB1GMVSU6c bhSQ== 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=XrdEbn+GJN1lr+qf46f60e6mU9uZS3/v+ivs5C8jFnk=; fh=UoQJShiVdOJxG3HaMurBK+cEpdyFWfIgvJbMUgBbuIw=; b=G6SOcXBBjDIudFoePOqhHc6HgIZs/k8nHQYBqvYSWhNuh1gNBCbZHPR8FZVVYqKJS3 wMDDimqIN8NazX8NnSGwps9UcN7tVIVtmrb2356EqhuM1v/bWylGPulUYXSlVHZoMOt0 xIi1PezuId00jn0ImZzv58La3fVqdnm9hSeFI4Oj0Mp8mC+dxsOrGwHdfQZvEzrFbg3c JRxGSgNNYybasvQmLLiPS/qhYGC5vL6pYYRmXvlp2/ejkpQLgW0Qz7EFmimExrcWxSgl OgTJtMvucSkNM4fWp9qkXkvFQTKayDIC6IlkgnVcBx2CVrNAKGLlM95SF2DrjW9dEJv7 Phfg== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@vivo.com header.s=selector2 header.b=Z5F1eLUe; 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 y4-20020a056402134400b005223ab5506fsi3418235edw.546.2023.07.26.04.42.28; Wed, 26 Jul 2023 04:42: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; dkim=pass header.i=@vivo.com header.s=selector2 header.b=Z5F1eLUe; 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 S234201AbjGZLjg (ORCPT + 99 others); Wed, 26 Jul 2023 07:39:36 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36892 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234203AbjGZLjL (ORCPT ); Wed, 26 Jul 2023 07:39:11 -0400 Received: from APC01-SG2-obe.outbound.protection.outlook.com (mail-sgaapc01on2126.outbound.protection.outlook.com [40.107.215.126]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CE4A0AA; Wed, 26 Jul 2023 04:38:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=BR+Ghz765HFIeAGSQvfm73c1NLaJUE3P/aqhDpy4T4eVCq2C9nqRpOmhCLJfrEVDYuU3eLvXLDHyQeQpeukVGJLaa/bR1YRZxZFgqEs3Jjj0nEwshm9hHjkpw3/egkUQaWSDLUsT3EZrXR6e5yVlttOTTp3eqYRx1k1V0Lew4FQlIMNElmy/8bSxkWJmv1OIZi3pos4TB5eb02V3BIQStmpPO05QDubG6mIBUNqnNleBEtYV2eEDsYC4n51sgrDrg16rOe1nko3ZNL3R4OCviaG+f9WMTjz5zNRnGNt0ZcsWPHYH+/KdpnjCgcGQEbrhhYoL52/1+5Dcp4cfptx2Cg== 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=XrdEbn+GJN1lr+qf46f60e6mU9uZS3/v+ivs5C8jFnk=; b=A3aKFY6vrwMzLMKh2Xq7glV5NleCgevqQt3JAXLZuKi2rwZDHLsIMelnhlB7CuFVEMurpdp51yEh/zhBUZZTJ4EkpzKHDk8rZxmlYGQVzpz4CIoB4/MP50O5i1vKYnbLRFlnbYNHCBETw9fQuYADVdu9dVYcs3cavguq8UagnIwjLh4HIz6u7IC4yhrvo1eFy4bUu3JxIXZWg8hZqMnPy9ydNyX8tRpmH5D7SKeFZ1Z0sTkiABEO38iCf9x4gb3mTViooApodWTtrvPBIg45npkcxm92ssa+fcrrJ6XdilirgeW8uVjRdmkU9N8Ehx/FcLJpbnaCgPnJ97mjiJAFvQ== 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=XrdEbn+GJN1lr+qf46f60e6mU9uZS3/v+ivs5C8jFnk=; b=Z5F1eLUeLi5DBmjw8AF0OZ6AtxnxSNH7pxK/7fZIeTxptklP/VDSruCRscrf/rHGTupIDa8s1O9BQ4n3QZtxzyE3ZEmlvLpfBbJs/UcgQpTnLQkSDCJ5GD85m921cE0QV7qlRacTib2xzFeXNgFh3OQB31wV+88A/ub68d9J3hSnpe3ddehhwqyxylshvNyrt+e64RaSEolyYtan/dOVDPaH/bWMiaFwruXk4cp9X4wA2DejlNNRw8M9yMgahmikTlFntzuwK3tity+EU9p29eDB5OR3EdDVSWVn7njcJ1/hhXV/pKjoxv8gRTyiBephEQ4BHUqZyr3uFLWUTyhQfg== 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 KL1PR06MB6210.apcprd06.prod.outlook.com (2603:1096:820:d9::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6609.31; Wed, 26 Jul 2023 11:38:41 +0000 Received: from SEZPR06MB5269.apcprd06.prod.outlook.com ([fe80::732f:ea1d:45a1:1e0b]) by SEZPR06MB5269.apcprd06.prod.outlook.com ([fe80::732f:ea1d:45a1:1e0b%3]) with mapi id 15.20.6631.026; Wed, 26 Jul 2023 11:38:40 +0000 From: Yangtao Li To: Neal Liu , Greg Kroah-Hartman , Joel Stanley , Andrew Jeffery Cc: Yangtao Li , linux-aspeed@lists.ozlabs.org, linux-usb@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH 09/30] usb: gadget: aspeed_udc: Convert to devm_platform_ioremap_resource() Date: Wed, 26 Jul 2023 19:37:55 +0800 Message-Id: <20230726113816.888-9-frank.li@vivo.com> X-Mailer: git-send-email 2.39.0 In-Reply-To: <20230726113816.888-1-frank.li@vivo.com> References: <20230726113816.888-1-frank.li@vivo.com> X-ClientProxiedBy: SI2P153CA0033.APCP153.PROD.OUTLOOK.COM (2603:1096:4:190::21) To SEZPR06MB5269.apcprd06.prod.outlook.com (2603:1096:101:78::6) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SEZPR06MB5269:EE_|KL1PR06MB6210:EE_ X-MS-Office365-Filtering-Correlation-Id: a3e9ce5f-a596-4fac-bd7d-08db8dccdbaa X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: gC1dN9gna+uZH0IuzmIBOrGeVteiVfI5IXVpTk2D+wxyyeI9oZ37sOpmP6aACWRPWG62TBcL1Pf0cXyY61TmDPwN/It2EkqWNsa0GKiTS6jyXQS/0uRhwyvElB6wFirfAfr0KJ73aPOD/ecdednLw0EFf2lhHIcO7clQAr0qh6O5zxzuiaZ3gc+H3s1QHhY4Lw+190ZVJr5SqTm1+mdXUV9I2Y8nWTAmcvMbWSxfhdyTvPTte1kin7Qp8XsMJJNlwVeJ3QSVwI6haCxKiDefhYu7DAj5Lu/OUogQT4dBzKVohKvDo3z259k9KyX/dHKeK9nmEca7S2B5oSgVjyZzywJoEDMa2Om+mnw9UxgNzAAx1m8gLfeaYANf8ARPBAhT3NfJtBCJfRcDPsqzoDmRSt8kvpfRWYVLVhAUKR1W0WzKPpDmBRYag4O9aojFS6dJpqI4FtGUx9stJRj2L0+GzCL+iBlX+oj6PIq7QO/6dYF2iBqNkxXOwfKj0QOa8NuU52WUcislKmpkD7HQZiEzbEil3kkzCm2oPQ9JJ5Z+572S/hvie+saMbbFnrstIrbt4Mm4Pfe4qqUPX8NZ/tF36LX8sOzyNnYUbfz2EiG+No+N6JLVjGV4Gn5pm+y2eF59 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)(366004)(376002)(136003)(39860400002)(451199021)(6506007)(8676002)(5660300002)(8936002)(41300700001)(316002)(478600001)(52116002)(110136005)(2906002)(6666004)(6486002)(186003)(1076003)(6512007)(26005)(2616005)(66556008)(4326008)(66476007)(66946007)(38100700002)(83380400001)(38350700002)(36756003)(86362001);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: MR93Dq2T9k07D/QKm0Xbilo5y+d9tZanNh9TGp8fTn+lbwH08vfuZla2Oy1Aixr5EUOO9EabDR7gdJlCmEZ3h+IZGDtXsTC+ao105ZM9iUMbKCnPWi/Ii9wnbVUJf8TYi130HtRNa1D0i8U24EibBOlS9f7E5zAubHzy9NuvIlN5wbpD1tCXBF66UeSA5xTQ283Lqj/QMyN6I1Le5VUYfQc2Doof/oCsR4jiJSgEwW24cMj2Jc5wJo4BBn+rBG8cu8e19sA3hrVMVlferozRxEFwEutMwB2fT73pu9CAJK7gS/LVsximVL6+LHpU+enBtZjDaX+M17N9jnbAtEfM0uYDf8UMxSc/fwuahyfzbunv3HnP5bqrAm+6QEv76AZk7/VBvdsvCpKOK9g1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/+DCISfz0h64hg4C4U39xhAJyo0NhWlsss/YldSaUwX3Zcm2LV/JtwBdIOE/89A5EWxY4kTzvJ0i6VuBLjJis2cE9vtwnx/se6ZPZrzM6coswpFcZHayZRfonPRu9 X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: a3e9ce5f-a596-4fac-bd7d-08db8dccdbaa X-MS-Exchange-CrossTenant-AuthSource: SEZPR06MB5269.apcprd06.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 26 Jul 2023 11:38:40.3392 (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: Br1Tq0KWyqNcqnjDin8yKZmodh5nFLDzdk/PBupNJBkyn400meHjWbQLX+fexCrAGYZ6lop28G8DSjaj+8a3+w== X-MS-Exchange-Transport-CrossTenantHeadersStamped: KL1PR06MB6210 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_NONE, RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,SPF_PASS,T_SCC_BODY_TEXT_LINE, URIBL_BLOCKED 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: 1772483273551965394 X-GMAIL-MSGID: 1772483273551965394 Use devm_platform_ioremap_resource() to simplify code. Signed-off-by: Yangtao Li --- drivers/usb/gadget/udc/aspeed_udc.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/usb/gadget/udc/aspeed_udc.c b/drivers/usb/gadget/udc/aspeed_udc.c index 01968e2167f9..2ef89a442f50 100644 --- a/drivers/usb/gadget/udc/aspeed_udc.c +++ b/drivers/usb/gadget/udc/aspeed_udc.c @@ -1468,7 +1468,6 @@ static int ast_udc_probe(struct platform_device *pdev) enum usb_device_speed max_speed; struct device *dev = &pdev->dev; struct ast_udc_dev *udc; - struct resource *res; int rc; udc = devm_kzalloc(&pdev->dev, sizeof(struct ast_udc_dev), GFP_KERNEL); @@ -1484,8 +1483,7 @@ static int ast_udc_probe(struct platform_device *pdev) udc->gadget.name = "aspeed-udc"; udc->gadget.dev.init_name = "gadget"; - res = platform_get_resource(pdev, IORESOURCE_MEM, 0); - udc->reg = devm_ioremap_resource(&pdev->dev, res); + udc->reg = devm_platform_ioremap_resource(pdev, 0); if (IS_ERR(udc->reg)) { dev_err(&pdev->dev, "Failed to map resources\n"); return PTR_ERR(udc->reg);