From patchwork Thu Jul 6 07:20:39 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: 699692 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 679C4EB64DC for ; Thu, 6 Jul 2023 07:21:08 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233448AbjGFHVH (ORCPT ); Thu, 6 Jul 2023 03:21:07 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42946 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233342AbjGFHVG (ORCPT ); Thu, 6 Jul 2023 03:21:06 -0400 Received: from APC01-TYZ-obe.outbound.protection.outlook.com (mail-tyzapc01on20701.outbound.protection.outlook.com [IPv6:2a01:111:f403:704b::701]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0EA94DA; Thu, 6 Jul 2023 00:21:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Je9YUIZ0/g8Q+a//gGHbAnnSmYP/uG8rLBHrS1sELCVELDuRRxcTcaDajQ4bXh2TgosP1Drna1pNT4QnRqnCUHqCFOnL23vYOhwEZdR4Qj2sFWwKQF3teZ2xC0bhipeEWEjJ4mwqU7/NPCPFFb40au85gp5ozqez5EIf4RlQrWPvm4qhWmKgTJsAP+Q/N1Vz+ZbVj+lCc2QLgwjNSv2Yt+t16i6rzOBjnfSzbZ3erG+qXIt0aKl5yxFqZAF78vufUFskC10KrU/vYAPwyGylrSLP9mv12K9G53PDVGC39VGKn7eLILpjJgjX8k1UPFE9CRhdY2LvJffk1NCR3GC0KQ== 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=p3g3RwmgsSxadIrRmjCFZfjIaT8MX/+tAHqmEKpFboA=; b=J0rRqFS9ywyquOWktmDZHZquOGiugV/hU4YLJKR8+xNzNhDV1szwTEUl8x0ldJrr8/TCY2fW+Fk+PKD0lJ6xPUH3l9lopku4DlC2QLyBPqlpM0QkQmsrRIoKnVbMtd72nEXQK2kT6KIWPa7sHeOGHvHP/OxLHOI20wLlEc8TSJuevFoQavLJBxQZDRcwAjzweUfGDZTgZG3/k1x5+fsheqilMLlxZT/VtSSocJNNtsQd9uA/4+QHwbt3+m7REYa+IIABj1EcPOvdICNKT0pNWLw0YWb3gwkQB2UwxD7zC+lVRrTFatUhFM61GinhReF+iFPP+Epa5+HLaPkXrp9dVw== 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=p3g3RwmgsSxadIrRmjCFZfjIaT8MX/+tAHqmEKpFboA=; b=nyMm/XM24ZTGzLeoSZZPrx1QtjqY6hF5wM5mA3/NQBAlwtb8G0JYEPWmqmC+2LNFTiucUfTRzKNmfNYepVcF00CISF1RvKhoIyA9FpHXIKnE5DziXR0itUwd06h1ixmR78hgK6QNg5TGaru/qtM+Zs9vg2uMAUZ9fhYSmp6x/2M3ga5vuKsE6j8LMBzLGS9PoLIHKEDVTrR04rfXSYlpag0rudk3NghhLbIObm2u+D7FMAwAfGMXuevIsE3vggCx3YsmZzo5w1VBTReKgQEBqEvjwzif19/iWZKRpTJOY+QTlqzBNMiD8OyjGKIdISyQkmFN8XoGngCDt/LYWDGVEg== 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 SEYPR06MB6081.apcprd06.prod.outlook.com (2603:1096:101:d6::7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6565.17; Thu, 6 Jul 2023 07:20:59 +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.016; Thu, 6 Jul 2023 07:20:59 +0000 From: Yangtao Li To: Andy Gross , Bjorn Andersson , Konrad Dybcio Cc: Yangtao Li , linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 4/7] bus: qcom-ebi2: Convert to devm_platform_ioremap_resource() Date: Thu, 6 Jul 2023 15:20:39 +0800 Message-Id: <20230706072042.31296-4-frank.li@vivo.com> X-Mailer: git-send-email 2.39.0 In-Reply-To: <20230706072042.31296-1-frank.li@vivo.com> References: <20230706072042.31296-1-frank.li@vivo.com> X-ClientProxiedBy: SG2PR02CA0129.apcprd02.prod.outlook.com (2603:1096:4:188::19) To SEZPR06MB5269.apcprd06.prod.outlook.com (2603:1096:101:78::6) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SEZPR06MB5269:EE_|SEYPR06MB6081:EE_ X-MS-Office365-Filtering-Correlation-Id: ade49132-6427-437b-2b53-08db7df18bde X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: ttIAotpyeeHZzp8RqmNYITMY2jdGwlmHwlxpjdYiboxGC8Q87q96xBVVtgHZm+ImJ2It4HICOjmFhZzDNmbw476/s1sGWInFg28Me2aFVsTXPYlLfpeXRqI6xC9a59kObQN9DsdNXjcmdRwGgsWvhu1yqCXYDBPqSFNxtuSjGnYYr9VTsTTfzuC/ITSVEvTLbOxWt1Hmuj5CzGodltPDkrbT3QwBoQpMiRYULXrUnKbJZ8LuuMoCCXG3ZCo+sDjA6BHXMFyOzZiwbp61dFLDGxYZpsmbaedVGNvo8YY4EZbQs/vRcU1NsA4U1QvhZdRJ73MnGm8CVoGmZXyl6Sk9l/jrJ7zxuSTFKR/L/IqUmYkJoUSKu16GLqwKqZ+8W6NUFtuxyhG7XIWv06n0oNnNmL8C342G0mMYgyR0mbDnnoSRyPTscXLMAxwAIq6H3r4Mg3lwwTdJN1lKu8i42f3UAftWTBnpWl9v+ZQHScawwIwfam6RPzr7+lipYWuEFEFYHw04ZjKSHpUl6TnFFcbJZ0YB1qvLIWBRdelMT67JWPsu3AAgkewAPc7vsGy0IvY6EDy+Nkqcxd4Uv5yh0UeJ+jMVE+I4qFAlaMv5Gt2MdEX+2xmCu6QxmGZ5wlXPd+jh 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)(376002)(366004)(39860400002)(346002)(136003)(451199021)(38100700002)(478600001)(66476007)(66946007)(110136005)(52116002)(6486002)(2616005)(6666004)(66556008)(41300700001)(8676002)(8936002)(38350700002)(316002)(4326008)(186003)(83380400001)(6512007)(6506007)(1076003)(26005)(86362001)(5660300002)(2906002)(36756003); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: AaXW4+ZYaIdAgtqQAtg52gNTRbdG8SHii+PYOG/5FAlAmXOiEd2NOeKfuXr2E7HOb9DTjdbT0sDoV6plnYYUYZ7vOy/Cgkqa11R2Zjk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db96UEysgigS66EOE16afvFovjFCuKTcJe62w5gZWHWDQ5DzZENXRV500I7nnbTGpymm+yoNA+UAcHCqDxPfhnqGvuuwGC283b8G5pO9G4WSNqOTVhbXIW16UFzOu7BG1913owM/ZtZPD8vliQMazHY/VnRwor4aEp6mPV/Fm88YgvUuppYTdepjxYWJ/pLU/FEtcJQTz/jxiixZurJvIkTWKI+yAkOojExCOnbFlcB9M32jFANDBN2Zq6gT6wgJeSgCvHmRUDJGXzs9X+GJKQMo086q7t8s1bKV6nBqcPI66FnzaeDNym5smGvcbMElYZO3oh6O27l4LjPaVKQD6FdtblY5z2Ob7AxO1tPlXSbcFqrpNPEqHqnJqV7T6zeXAcn8R1G0OsX19FvccZ/RszoWQ1zKkvOuAlzc7J7Gkye777pTY17 X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: ade49132-6427-437b-2b53-08db7df18bde X-MS-Exchange-CrossTenant-AuthSource: SEZPR06MB5269.apcprd06.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 06 Jul 2023 07:20:59.2706 (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: CUaJkMPIe/RSXbMzCIqVgmmD6nuf2rZPH0DakTv1RXPIvDXpwZxss0hvjAGZf6SQF+2xKfUBsKu++BPvs3PLlg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SEYPR06MB6081 Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org Use devm_platform_ioremap_resource() to simplify code. Signed-off-by: Yangtao Li --- drivers/bus/qcom-ebi2.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/drivers/bus/qcom-ebi2.c b/drivers/bus/qcom-ebi2.c index c1fef1b4bd89..01e76bb05218 100644 --- a/drivers/bus/qcom-ebi2.c +++ b/drivers/bus/qcom-ebi2.c @@ -294,7 +294,6 @@ static int qcom_ebi2_probe(struct platform_device *pdev) struct device_node *np = pdev->dev.of_node; struct device_node *child; struct device *dev = &pdev->dev; - struct resource *res; void __iomem *ebi2_base; void __iomem *ebi2_xmem; struct clk *ebi2xclk; @@ -325,15 +324,13 @@ static int qcom_ebi2_probe(struct platform_device *pdev) goto err_disable_2x_clk; } - res = platform_get_resource(pdev, IORESOURCE_MEM, 0); - ebi2_base = devm_ioremap_resource(dev, res); + ebi2_base = devm_platform_ioremap_resource(pdev, 0); if (IS_ERR(ebi2_base)) { ret = PTR_ERR(ebi2_base); goto err_disable_clk; } - res = platform_get_resource(pdev, IORESOURCE_MEM, 1); - ebi2_xmem = devm_ioremap_resource(dev, res); + ebi2_xmem = devm_platform_ioremap_resource(pdev, 1); if (IS_ERR(ebi2_xmem)) { ret = PTR_ERR(ebi2_xmem); goto err_disable_clk;