Message ID | 20230705135159.33327-4-frank.li@vivo.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:9f45:0:b0:3ea:f831:8777 with SMTP id v5csp1887884vqx; Wed, 5 Jul 2023 06:59:55 -0700 (PDT) X-Google-Smtp-Source: APBJJlFDuheiWPA5WVRcoDD3f8G71FEI2oD8DRLjdu/2pGn8G3KjYBODdvQujENZ9hIEURylnwDw X-Received: by 2002:a05:6358:cb1e:b0:134:d691:8b21 with SMTP id gr30-20020a056358cb1e00b00134d6918b21mr11197563rwb.23.1688565595124; Wed, 05 Jul 2023 06:59:55 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1688565595; cv=pass; d=google.com; s=arc-20160816; b=O7qhMGxhM1u7knB+tAD7ZAeQU0Lkr4yS0Pcwka+oVY1+uFy+RY+XaSisE1CKaO1px6 qGvDvqkIFmMOd8QUOwgaswI/bZZQuMWhUBImJERU9NueFy98tngHLdYGreKSc4ACTXzT AQ3TaHJeH1wwbQNE4ir/tbuWs0XTOS6pFRFsk94wu2VG9Mv8sXZM/b9EADCyuTC8kgz6 7ib6hNWGaecWWajnuPsi+4KlbVwFLgxDTcpkTgaD02CppdbleqXLrN7x5XGmLinbykzJ 7ZB4mqUotx193s8Q/HgvY3sv32mmIEhyumc5e9kkKFjH33N3iER0T8oCdR2cQPIEHqU9 sOuw== 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=EtGdsGjKwrkleQHLRTgg+RRLnMhaS9ZoWfQWbgk0L7c=; fh=YeDJltnuqUcgf1h4/ohHp52uJfXecYTOSZuz10BBvHM=; b=gZXmsrPvXw6ddEMwVqZARp6eV8QzwGrHk/EWw9ibVPnsuVgcNsSpYhDhsOXUsYnwXU WpxQ26sQvURQ2+OwF7dAN0pDWh4snHLEKIZAJFupn0lR+1tCNSXlNdIJaRnxNgGGmOqG sLWMZQWSkSHaQLOQsTUJefib2L2RcWTMuwn1Z3ZWLYdSPQhW/wohz+2Tw3a/Hefd1AQw 5cYtd78aiSLCUu3C4fz3BaBT8WQY1MBFjAJXbhgc48rKdd5dLM0uRTIUPMJ9m7WvsHM2 hEya+ZToLck19xkHWYDlOnBRKV7FQbEQ5JdlP4J1BrxvGgeJOweR+i+03zqlWC3pBjIF J8Hg== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@vivo.com header.s=selector2 header.b=HKRemG+E; 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 f38-20020a631f26000000b00553828de1cbsi22365173pgf.791.2023.07.05.06.59.38; Wed, 05 Jul 2023 06:59:55 -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=HKRemG+E; 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 S230158AbjGENwX (ORCPT <rfc822;tebrre53rla2o@gmail.com> + 99 others); Wed, 5 Jul 2023 09:52:23 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52504 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232369AbjGENwR (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Wed, 5 Jul 2023 09:52:17 -0400 Received: from APC01-SG2-obe.outbound.protection.outlook.com (mail-sgaapc01on2118.outbound.protection.outlook.com [40.107.215.118]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 50973F7; Wed, 5 Jul 2023 06:52:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=WnfJ4xRP+z0VcxwjZN6ohwul72yqqiuLABs/wJlBZkdATFXqKQvcx4/9Zgrmmib6EdffRbLfYzcufsN51SNRPbnEx5wg3ktkFRSnxHPDXj0XgE6ogJ1Em4bpQDjK94o/oEmO0+xTSl/mc2eJ26Y5nwLNxyB4NazD8Vh0+a/asfwb2gGjSVlP8fH8tYjmdT+m5We/nKbRbj+9zhrf9/ezS5xifCDE6DRbIC0pnqmwsDKZE+xQ3fi+OuZCFIG1biFndLbpOu9UCahqsnN1jX+8f38JQn16F3gU2HNCV4gwo0Awud9GS+g5kyPEnMARFUAXimk6HjbQzQmv+QL2+W31Cg== 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=EtGdsGjKwrkleQHLRTgg+RRLnMhaS9ZoWfQWbgk0L7c=; b=cMbkh+w7osIdIk13lSsrREZwQs8gPyRrr15UtAbOOMCeFi1JJpThlJEzowaJvfHP/Fe5QKCOXgLF/gXJKWbApZB/Q0i2hkFtJcu/yffpbO2ZJQ8yBScy9fEFFSzH/1N3TNR15wcick91yK613HVzrErOw0tqmz2rN/NYa0T+o7/CjhG0qcAdnrgYSiPuHlXEq4HMMrKE1Jt+ymbMBgWQfUqeDv0SeGVLzNsnP/xwCgfyKLMigIQ7DZZDSavghqb7an6GOsz3MlxPJFFbbA73raY83k0NYw+OypS62WEr9dVqmQqJVaKaGGTV4enUFPQCKIxW0shy7/tE4Rns4y4/YA== 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=EtGdsGjKwrkleQHLRTgg+RRLnMhaS9ZoWfQWbgk0L7c=; b=HKRemG+ENqdt7dVRA2mBjkyahrKbYepDgpAuChfZOYQs0q50qN/rZrGaFmpnsd6XVJCYjO+/uv4n+3Ifj8WzaXUICTLR61DBycB1BZkfjjTDEx9EGRHf8bHDtIBWqrvopqxCqcsA0yh+KprExoOxJaZaiOnIciLDwVVqGqqrYQs/eqYDF8ZxFbj9Jk29kEn4oh0En75hh2NCkf/DjQryI/OYzxhK93U1Vug25UoE/o43ia0h5krhU1ufTdCXT/IzO6PFnHAhmZPB7PU75iLCKRLOEi5E72k1U+dUl+ouiU5/ZIEfO7pKi8YuKbj4lsmeXa3B4VUcTuL3emRb+ZVsQg== 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 PSAPR06MB3991.apcprd06.prod.outlook.com (2603:1096:301:38::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6565.17; Wed, 5 Jul 2023 13:52:12 +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; Wed, 5 Jul 2023 13:52:12 +0000 From: Yangtao Li <frank.li@vivo.com> To: Khalil Blaiech <kblaiech@nvidia.com>, Asmaa Mnebhi <asmaa@nvidia.com>, Andi Shyti <andi.shyti@kernel.org> Cc: Yangtao Li <frank.li@vivo.com>, linux-i2c@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 04/11] i2c: mlxbf: Use devm_platform_get_and_ioremap_resource() Date: Wed, 5 Jul 2023 21:51:51 +0800 Message-Id: <20230705135159.33327-4-frank.li@vivo.com> X-Mailer: git-send-email 2.39.0 In-Reply-To: <20230705135159.33327-1-frank.li@vivo.com> References: <20230705135159.33327-1-frank.li@vivo.com> Content-Transfer-Encoding: 8bit Content-Type: text/plain X-ClientProxiedBy: TYCPR01CA0049.jpnprd01.prod.outlook.com (2603:1096:405:2::13) To SEZPR06MB5269.apcprd06.prod.outlook.com (2603:1096:101:78::6) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SEZPR06MB5269:EE_|PSAPR06MB3991:EE_ X-MS-Office365-Filtering-Correlation-Id: ebcd374b-1ea2-4e9c-4759-08db7d5f0893 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 6lIAyM6Awt8BstOHUogzl14fbzD8eT0DEe7vMj2IC6RG1OfAEeAcXKIJK2PGmyrUW7oQLMVeF7K2Iy3Cvs1GgkeAhz58DiSIbquxFrKvxbE2p04q2OjeDQlZBPF05TxcSF2lh4kI/w5Iedjv7pjLsY38IEt+6Z94E8c537JG/lKeQUFPnRqo12pl42HecgAvd4Wcl2e8DWT/cPvqcK076sclhKTaeqi2J/hQFHOEgo9OmNFjs8oLlae96XD6FC7QdxgIjVTkrwNLQzz7i31S1IjYBFGUJbblIQJyox25Yl+JrEOC4F85ld6VKxX3ExFiDhJdYtjZDF2CBPZb0Zm920pW3X7kBMeMAGCVvVlSB7cB8D5Wr8GRSLMn+CdMZBeIL0EYZnBnbL/Bq78o8MMqsgjfr952mVsSEvPyokBxxqz/sS885WMeapDP1juDx48QL/bI0I8bpje7ppWCDrfrXDERLc25a/rVJbhfwstV3hjSCl6EF39a+5XXYs7ps4eyFwu0661kgb1kBdp+u2qA736tpzifkVWrTTUTseQdlhuVsghalNsWRDJMOmGLSzg+Cu3WUPDYMgJo3opTFX6InLoojjqB0sfn/49KgwlXNuG2IWGLa9a/S5aqBJZEtBnn 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)(366004)(346002)(136003)(376002)(39860400002)(451199021)(38100700002)(38350700002)(66476007)(66556008)(4326008)(66946007)(2616005)(186003)(86362001)(6486002)(52116002)(6666004)(36756003)(6512007)(26005)(6506007)(478600001)(110136005)(1076003)(8936002)(8676002)(4744005)(5660300002)(316002)(2906002)(41300700001)(83380400001);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: xbgiAKXcazg49we1h5s/GydwhtOU6olW+FqG0bvHQIZk++/5QPbxQZX/ZDUkBbpU2NIsbogy2iEnOd53ijHmcV1sisf9mlwK3M9w4dfmwO9sek4brbbXwiioUnLh81mgbSw+X5EmwETC/MeO0TfiPhAi/5bxlB2so3DzWsP0QYuoO9IrjXheAqYY8EJqTxvFUfLwAMcbaN7PZIt6TXd1wUHKbX/Eg/feMwb8obZmm2pfPpqiAsP62uO80i3nfFKEKF20JyS0Tqx2oXgDvt+fuWb3WJ63TUg9QqyK8iVLHt7S819P+5QXLqW3ipjhBb1J9RcCo8ienQIIU9zhdN0kJ8ZN4F5ZDsOEnC61n7GEbDiVsAKMhXbBT+OfMI9fGeMfP93xYEfWtF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3uk+/Qh75FAPQTZjD6RQU5kiqkJBHnvtOt0poUOAI55SriXZ2HtGAhZkS0/CVwXBTWOeYexhpk+eRg+51BKJsSrmaccjF+tIin1PpnBaJYvk4B4uAcL/wEAy1YbX67ab0 X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: ebcd374b-1ea2-4e9c-4759-08db7d5f0893 X-MS-Exchange-CrossTenant-AuthSource: SEZPR06MB5269.apcprd06.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 05 Jul 2023 13:52:12.3873 (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: SsNZRu3U2bA1tSOkWXuslGdzCii94YVwpLlbjYlppgsbNaiI8GASC9SXtIIRhGctb3aocG7wmK1fRYdO91BCzg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: PSAPR06MB3991 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: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1770589357189151266?= X-GMAIL-MSGID: =?utf-8?q?1770589357189151266?= |
Series |
[01/11] i2c: at91: Use devm_platform_get_and_ioremap_resource()
|
|
Commit Message
李扬韬
July 5, 2023, 1:51 p.m. UTC
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 <frank.li@vivo.com>
---
drivers/i2c/busses/i2c-mlxbf.c | 8 +-------
1 file changed, 1 insertion(+), 7 deletions(-)
diff --git a/drivers/i2c/busses/i2c-mlxbf.c b/drivers/i2c/busses/i2c-mlxbf.c index ae66bdd1b737..2f60e5532b54 100644 --- a/drivers/i2c/busses/i2c-mlxbf.c +++ b/drivers/i2c/busses/i2c-mlxbf.c @@ -1080,13 +1080,7 @@ static int mlxbf_i2c_init_resource(struct platform_device *pdev, if (!tmp_res) return -ENOMEM; - tmp_res->params = platform_get_resource(pdev, IORESOURCE_MEM, type); - if (!tmp_res->params) { - devm_kfree(dev, tmp_res); - return -EIO; - } - - tmp_res->io = devm_ioremap_resource(dev, tmp_res->params); + tmp_res->io = devm_platform_get_and_ioremap_resource(pdev, type, &tmp_res->params); if (IS_ERR(tmp_res->io)) { devm_kfree(dev, tmp_res); return PTR_ERR(tmp_res->io);