From patchwork Wed Jul 26 11:38:01 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yangtao Li X-Patchwork-Id: 13327887 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 7E1B8C001DC for ; Wed, 26 Jul 2023 11:40:13 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234237AbjGZLkM (ORCPT ); Wed, 26 Jul 2023 07:40:12 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37850 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234194AbjGZLjy (ORCPT ); Wed, 26 Jul 2023 07:39:54 -0400 Received: from APC01-PSA-obe.outbound.protection.outlook.com (mail-psaapc01on2125.outbound.protection.outlook.com [40.107.255.125]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9C13E2D73; Wed, 26 Jul 2023 04:39:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=g9xMoaVYrJH/GrR1aDQuLnoDpV/DXH4fdN67GBGLrbspRGAROxfM3UQT0YwEqf/GMkYM/l/8FXWqzBpt9ZI2xN5GnTsSyry80m5YxqcpHO6ppDMBwaCdPDLOTda+LcQZ3fZw6gwOsb0SGPZ8DA1dhoc1jIvL1xYIOSoqQsgoAgTzv6srqPUJp3xGfQOP6VB32gtT7pQq1KT0dN0VYmQRILJQgtB0NFl6TbeXp2w7aY22F95iCkSoWb7ovSucCQhlWKpHV3VYPUHIZWD1DxJ4Ex9s6bTMGaljfeCpzNiVqfS1ADKT2ofc5iCdy5Rv01xjyGo992QRLo/xyHgAsvBL5g== 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=kC8QRr3SEdUyv6V/mzsB6ZiTd2TxC/JtlBCSiToeSqQ=; b=MFjDqyYpRIaf5TJf4kCRAVhPzQ0Jd1GpYl00XvE2bJxZb7eRYrypGHy7SUUhVIZ0FQLVb6StQaY3M3uSQXz2opEQr3NsKoqCUmSyeXoq+25qJkcngN7ex5eKzVg1GpMN7uQ/+a/tZLFsxsHihHGPP71e4jweoIGLgUu8Sk1yrRbyitZ9pTfiHgHg6KIKOCgzc90qd2GNCy6hN634G6VtdWfPjIvmYNnyCVwr7lwvio8sVdBHdMO8n9BmTBkowrtC4ynRpzXH9GY0e80FmQidubzRjJNme1IrqjBkq85ZafFPyj1ZiBjFKE0jS4WcT58QWVl9QRoN6COdZei4LgX79Q== 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=kC8QRr3SEdUyv6V/mzsB6ZiTd2TxC/JtlBCSiToeSqQ=; b=KmsqZv92AJo/aaQnqPcI9IoKVF6ByGTruBq44J51tpXzV4xVmotc4RT+hAP9eNzAvKwfjv4s0I3VQnrjk8U0JfCihXQrCIuM9jA0tSq4uO1N7Dl3b2E2LIQSl5KliHH/BN3suc7DCstqE4n3/7kOPirGl013w0xsLe5E9DP4s5pitZntPLZJYnuV2VhSCX8+RNkshCg1vju1Aok3bMb3zFaeV8/4uYfSNEJB9NXNawjZCDFyBd3HmW2o1SDW05GmXToOkenOj5jgUx1axM1g/oyr54QmJsH88rJBSgXPfU05NSWpDPJ2MY/h+w+Do1Wk+0td3adt204HWLNwCdwV0Q== 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 SI2PR06MB4203.apcprd06.prod.outlook.com (2603:1096:4:e8::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:49 +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:49 +0000 From: Yangtao Li To: Alan Stern , Greg Kroah-Hartman Cc: Yangtao Li , linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 15/30] usb: host: ohci-platform: Use devm_platform_get_and_ioremap_resource() Date: Wed, 26 Jul 2023 19:38:01 +0800 Message-Id: <20230726113816.888-15-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_|SI2PR06MB4203:EE_ X-MS-Office365-Filtering-Correlation-Id: b7339ea2-34f5-4e07-8b51-08db8dcce0ed X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: Rm88aR5vgotnqpVJQxrYiSXdv72MICZc/+ydxs2A0+3yVkvOU1GuFJtvT87gGaIs0J/EprU47kVqe9gIA4Nsaz3MgMK8BY74U0k4guRSb3ygAvK7nu2aJkagUCQEiuTEijdt4lYh0mCig8uWzns1n70m5JS+KkVlDrmzxy6PA1PI2hCuyp+XCQEVfI70vm+Iqn1sTTGxvJq2DBpFJzy7AUp8VYsvuD++WX0Rr1+ys69JnS1NQD6BdiNYC4xMJB8mnTaJIMf+0GdmsvDtUKhRwofhQMl70mU94XwFF+7QvZ06x6Mwv8f6MjyNNruN1Ap2VGWKBkpX/RmrxKIUsxcZ7rHw9pJN9tu4r71XOpMhSlqb//k0pBFKD6WZXOFQOMAmUZEMsduL2xN/fJoIK0Q3jxDaSSxM+YK5pwhtDk5Olyv40nP+4sl5qWsi9AimXutmlIJcLLV7ymJ4KnWql8cdhPkfWadudWdPbH4+zPZKEvnYH0SBurfITGmXB7q7ODy6Ek1oaK8sXodowea0cU4pgO+BHIAYRqZIQR2NMQMP7T9L7AGXjiX2VBJRaLjlmUPPNg3U2KqahHB24gSSwxGVqoX1xHZd5THrawe3DAMqvEQjOCwICY/7BmVScvTRDFGW 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)(366004)(39860400002)(396003)(346002)(376002)(136003)(451199021)(86362001)(38100700002)(38350700002)(66556008)(478600001)(4326008)(316002)(110136005)(6512007)(8936002)(5660300002)(8676002)(6666004)(6486002)(2906002)(1076003)(186003)(52116002)(4744005)(26005)(6506007)(83380400001)(66946007)(41300700001)(36756003)(66476007)(2616005);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: QcOuUn8k1/Iaxmvp5KPHpcVmEbN7IDOIi8fgxzszKZFAG6i0bTKw3v4Hn18A3VXeZpZcpbJPUK/jUfU2jOUaHw3fw7fdmypa6yVSEbGgrGcC41b9m5Mcxeja1q9nma6OFZq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whCgs66Ar/YWfQQHWfXcWwM+e1/LQVr6OWkGLyyJ9UO2+QUGqGLFC1MxncBoiElYS2l18fDNJg6NbPuqt9BC2wGHAONfv0skn8Zc3RvOVVPZorxktb4ijiryp6Hla/naNHsglqylBZTxRs6KH6ptY+RxXhhMiguQZUmCwL4kdPS4+rPJIDl95jZS6tUSxjUPbAPEXV5Wd9OHYae9lxJRFXmW0oadodJPzP+cAsCNr9SKDRd8yab+E5RneHAbmw58X3+fH2Lm79g+uMAqjc8+ntdZjqZuxlgQKu+yVtRdJTaj0fE50w1knEude80VGStIok/iD+5eHuOH/0hoRTYN6vUAdosmF/cIiNBCUUrSmbKblS/zZsq X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: b7339ea2-34f5-4e07-8b51-08db8dcce0ed 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:49.1569 (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: 2Lh/vSSUqcnWEOqV1yYmO6UcsJlQqAJLnQY9v3xTw9pJOEG9N4o3SUSJMFWVn0ximhCQ8TMPIVbFZwZ6vuxi8w== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SI2PR06MB4203 Precedence: bulk List-ID: X-Mailing-List: linux-usb@vger.kernel.org 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: Yangtao Li --- drivers/usb/host/ohci-platform.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/usb/host/ohci-platform.c b/drivers/usb/host/ohci-platform.c index 45a2c981319e..4a75507325dd 100644 --- a/drivers/usb/host/ohci-platform.c +++ b/drivers/usb/host/ohci-platform.c @@ -200,8 +200,7 @@ static int ohci_platform_probe(struct platform_device *dev) goto err_reset; } - res_mem = platform_get_resource(dev, IORESOURCE_MEM, 0); - hcd->regs = devm_ioremap_resource(&dev->dev, res_mem); + hcd->regs = devm_platform_get_and_ioremap_resource(dev, 0, &res_mem); if (IS_ERR(hcd->regs)) { err = PTR_ERR(hcd->regs); goto err_power;