Message ID | 20230705135159.33327-1-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 v5csp1885827vqx; Wed, 5 Jul 2023 06:55:43 -0700 (PDT) X-Google-Smtp-Source: APBJJlH3cnhVrtEHnjkAvYE1qyfdEGamz8h8z7zWiGJd1zC/L9tw0H1QYQGbgskvR6mv//XrwuVi X-Received: by 2002:a05:6a00:2292:b0:641:d9b:a444 with SMTP id f18-20020a056a00229200b006410d9ba444mr16509042pfe.31.1688565342905; Wed, 05 Jul 2023 06:55:42 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1688565342; cv=pass; d=google.com; s=arc-20160816; b=T1xfSwJzyfvmDhUBYFoUY3VPnH3NIbwdH2MvqDDAvm/iRCG+sQUxewjblFOBW8k++v sqRxuuNUC1bTqb7U6ECBREY699O0yaz7Z80GzQb2RMm+lqaXsj9ib7Fb7sIck4Bk9ebL TlcG72hwPzTVB3lQcMC9Ew06mMQNa6xfHtkqjj4wAHFJn0NIebS6NyvBB9W9cMln7Di6 ole7sluWFYT1TFrs/If3klLqx5yvenORs55nf2GcNjHpXHLXf2hhZHwyJbN4AwXpeWYn bjpqZ8AlcOhVF4ajeNXCYPL4s2pzCSeZXUFLCiFY7HHUyQQI4TECGFBbI6qk6+BOKDvX fzBg== 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 :message-id:date:subject:cc:to:from:dkim-signature; bh=0JhT7tYU77z/kX/T4rfE0ji973y3A2PxXUt6jegiMds=; fh=gISrTNxL5ZGNez8sIfDJi82ooSrXUHqPzZeEPGJvxkM=; b=lEH6MPWTlWZUtWguGF9HMZhpUtKbTNq9Vv5qv6i/7aUspWiL1wAUM3VMInsuPXOHvj 5A6FWVFB25ONukDYuQXFfzSTfL4WlydnxQSxBOLqzxrD1u75mC/eLilDgI+QySdxyYsE 4wn4JAFERO2nsftfXBsf1R1lXEWw+R11TfgppPAwNqD1Gj/ulibvUlNmIfSihLvd9Q+5 uG23MvLkZnE6yyzJ8VzpygTJIjPEwVls7eSo9iHLdS7xrmlIGn3hQUPJuFmHbKYpy4NO Auf1Bz1US6HuWGGEdDg7tWKwFA0SO0rr2HNveO+vup07U+8PK0QziBSOHB2NQaFO9ADl 10Tw== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@vivo.com header.s=selector2 header.b=W1rXeErz; 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 cw1-20020a056a00450100b00625559a78a2si16615718pfb.107.2023.07.05.06.55.25; Wed, 05 Jul 2023 06:55:42 -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=W1rXeErz; 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 S232362AbjGENwP (ORCPT <rfc822;tebrre53rla2o@gmail.com> + 99 others); Wed, 5 Jul 2023 09:52:15 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52484 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232302AbjGENwN (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Wed, 5 Jul 2023 09:52:13 -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 B003010F; Wed, 5 Jul 2023 06:52:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=GfuaWCOafVDxyi6Rm+2E/mD+UPhSKyifuXuTX8zXyiFoD9RCDidgV3Vyiv6CJqaifjykkuw/B86pH/pATBW7JRaPUmofdyIm3RpLMXvAfBTzsACy/QidgzDAjgPycl7/yV4Jq4k2iyeqMKl9R/VPBwQvulPcIknLQCtyZWNzPSnyHgH3ib/mvm3ezSW5vCmxZF0hfa8r/odevkNfm6mRBWb/jZVwCr7j5juEHrZ9iwO1fLmmLCsDCLG9bErRr9aSKy3bl6TTpV+di/PUX/Oei8hItIKNk+RnOvz46ZM5xzUfVHTutxYgj5aJ7niJQ9nktVTjBXAgkM6g1ZvqFYpQMQ== 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=0JhT7tYU77z/kX/T4rfE0ji973y3A2PxXUt6jegiMds=; b=iyFtLUQIF7jl8YxkF3TDo+drTpsoRXxKTAchQfXcNzdbc9MhggecYdqyBNB7ZQmrcqeQW+nUqLKmdvL65Yq3SgN5qNTv+reXRpy1W4uastyAJ6ji1SoTSYmwhAF1JkAAxALJgUjYGcix2/xf/ts5KkoPjk/xcDTEXuBvOLopjlhtnYYl0FvUEzjdQ2hU/3AsYUcYgZl8A9/t0+dnmYeFvdYUEG6F561mBbPMn/xoZdKzi09Njmnr8veUwVAyHjH8WewgWSxOHfpvgwVC0Zx2YcHPqZk/zrdt/z8Z1ZeEDRfFToHAv3h4QkpD11EYihZEr4rMSmid6Jd4oA5aJodZ8g== 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=0JhT7tYU77z/kX/T4rfE0ji973y3A2PxXUt6jegiMds=; b=W1rXeErzY0fxNBHQwzSL3aR/1aZPSN3ylK8jCMdZovBzMds3kMRzGs+R8k8S5mkY1a9JRZYVhmMU4D7lGdJZkM3p4sVQhJQ4Uj2pVZsuW1eBavasGez6NOZrnaIY8S/nGdm6p/aBXlhDaT6x32GyEFHZ4Zv1qcU+pPu/TI9MDHPFU5G+sJS/vCFuY1MSK5SuYwYyrxiKKL8eFHOUMV3nmzSgM5iD8RJEQaShDyXTTGL3+gZaz1fTBWJliNP9GskWKibUzbUX486SH6mchVUaujBUzS7BFaOuUL3a+cizmFP4rtRaP+DUo3h2yxZlixWqzKwDqa0LUq80Hz/+h/nUow== 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:09 +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:08 +0000 From: Yangtao Li <frank.li@vivo.com> To: Codrin Ciubotariu <codrin.ciubotariu@microchip.com>, Andi Shyti <andi.shyti@kernel.org>, Nicolas Ferre <nicolas.ferre@microchip.com>, Alexandre Belloni <alexandre.belloni@bootlin.com>, Claudiu Beznea <claudiu.beznea@microchip.com> Cc: Yangtao Li <frank.li@vivo.com>, linux-i2c@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH 01/11] i2c: at91: Use devm_platform_get_and_ioremap_resource() Date: Wed, 5 Jul 2023 21:51:48 +0800 Message-Id: <20230705135159.33327-1-frank.li@vivo.com> X-Mailer: git-send-email 2.39.0 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: d0c1df3f-ba78-460e-09ee-08db7d5f0631 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: cnYmh15NcTIckIxKAWj+RRYXsYAwk6sQfU7ojQRX3lmZ8d7m0lgZk7wA5JadvPIF/fTXzfk7thJO3PDIH3Mlwxh/mIS8ESOHrTbXRus73iFCHRczSoYYB+4JspppV+Wu4HimO2YGE7pxW5amYw9g0CoR3ZNcyt8HzRH1HSOSEz4MIYpYwlTPfYG7kGVL4p4+jYlNcwUJ03EQ+sfY18mBuXxHPijm7eHD2/2jhadY2l38wxPfjFN5IDpx1CTOxZ6bBcFqGfIqxnFnHQAMhVJv9avgZcpOgfyhTyn4ZAf1qqFH9DhL0AlZAFaORF64yy8LqGSSgxI4NyxaIguNjW/MYrp9ZBaJmpOwk2kWJfVLWi6Q+hr+llH1u6RBNufePwpmvngpcLz+eikjojyu+EEThbwzhWFT+65zJGAg2GHnXXLXtmUzO4r05U//xuuHy7R8IBvA7aK2yFgzRDRCqOqVEVCGTC99/L9MNGptJwWxXXEaoSXaqINX55m/czNxR3mEzSbPzZItseuzRB7NJ18sVgOLK7zdv2dCL29rrxMoaP8rC/KGI7qMhJx07dGP+b67i1WVKnox1mR/8Jhu/wqbbG8Vq2TGGfNbSIk4oGU9N5CsaniKuyXqKROr8jwkgHyJ 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)(5660300002)(316002)(2906002)(41300700001)(83380400001);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: cPkFrbYlNQKjCQ3MJhypN7dM/p8Lr0zgrg3zd+44+Alc8GqdLsnjNVHcpxz2ZUCiEJ038AFxz6XNGXBYtPu3wFBCTJTD5acdNI77y6ms06T2YvuzQKmeGopgxuKeODhnAT/3jphjo8Fx7QoyW4pVMZ8Uk6QzgLx9NEUpYBStnzz5tfY0e68TPhZBlY3fhXU5bnydn4hs7eGzrMWXRJpmnAuwVrV8EIfVTCRvs6OQozT36H16KSFRBb0zjg/PGtTvKIW2MfbhJ/cIw+SUdFUPTwk8FOyfqu9RiEsbXtFHUJw2F6BRAt3IXLSMT3krPQUcu/tfoNRivuHYCQIPHhKAFcfmWozd2woKpx4FmlYbag+CmKQ+p26vr7rgwOM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3Xnud/q9Tjjei+ytuw9+s4jTAiT4KmlAbd19hSppJqNNbuzbsngBEHbpT8N1RiHHdoyPtSXJMAmBTGb8wme/JGJLvEYHDa4575DOjzfow8e3tsyfNlL7wOntWmNRZNBIqrPzuuDmOciBS2cD0WYY9W X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: d0c1df3f-ba78-460e-09ee-08db7d5f0631 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:08.4749 (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: CF9zwR12hLYaVoRyuYeZzMxedtI6xFQQU1gLy72LL+OiTJLqc0ZMiLnCdDIt5KiSmO998zLbFk5vbDZyaipc7Q== 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?1770589093212348393?= X-GMAIL-MSGID: =?utf-8?q?1770589093212348393?= |
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-at91-core.c | 10 +++-------
1 file changed, 3 insertions(+), 7 deletions(-)
diff --git a/drivers/i2c/busses/i2c-at91-core.c b/drivers/i2c/busses/i2c-at91-core.c index 05ad3bc3578a..de3b8f1053e7 100644 --- a/drivers/i2c/busses/i2c-at91-core.c +++ b/drivers/i2c/busses/i2c-at91-core.c @@ -207,19 +207,15 @@ static int at91_twi_probe(struct platform_device *pdev) dev->dev = &pdev->dev; - mem = platform_get_resource(pdev, IORESOURCE_MEM, 0); - if (!mem) - return -ENODEV; + dev->base = devm_platform_get_and_ioremap_resource(pdev, 0, &mem); + if (IS_ERR(dev->base)) + return PTR_ERR(dev->base); phy_addr = mem->start; dev->pdata = at91_twi_get_driver_data(pdev); if (!dev->pdata) return -ENODEV; - dev->base = devm_ioremap_resource(&pdev->dev, mem); - if (IS_ERR(dev->base)) - return PTR_ERR(dev->base); - dev->irq = platform_get_irq(pdev, 0); if (dev->irq < 0) return dev->irq;