From patchwork Wed Jul 5 13:51:48 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: 699923 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 4CA02EB64DA for ; Wed, 5 Jul 2023 13:52:16 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232356AbjGENwO (ORCPT ); Wed, 5 Jul 2023 09:52:14 -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 ); 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 To: Codrin Ciubotariu , Andi Shyti , Nicolas Ferre , Alexandre Belloni , Claudiu Beznea Cc: Yangtao Li , 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 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+p26vr7rgwOMocgYE5Pp8/mEx9MrN4i/HDNY3eObTmDoBqF2uQY8LwiccByuTzWezFx6jXB7mFNQf2mQAkNr9EMlsQWVBdXPhQPsInvZQkvJImAZhZc8OMf0fZHtC/qvcAHy2KDn5DSkdtcBVOBRFWTWQNC8ojFc2k4vMKONPOz/XqFb9yAf5jCBco5kTW6osKG6zyPIi0CYDYYYXPURtoO0bTOKt44arns2BejHKtIWgHZDtNsFVOXSwlM+RGC/ok3mkxkcDmuoaJIVL7NsH3H5+ba550tuHjQUnMLt3A1QDwDZKs4MNwS6p+IRKmJAYV0dJivEdpy3SOBBGtEak16trVBO4YFTS5p65HVZSW0EaHL3FCNvzeaLEJcFrMILl0+NVKdyzXTSUdb+vGWIxzRHL0AgpJLeIUpKTZg/UB+OYoTOcDvsoCP3tmjuZpHeoNA4GDYBbBFvKOX7G0Twzqb/F/CXS3g3INRLjOEv0DZiiHBQjY1n1vUQnVdfs7fiZ7DqdgL0awFk7XIqrveCUc/MWGAfZLqCC6hEr1B7NsZQdsNRiKTW/i6BUo+ehmhdPypkbTyhCq+wj8dosJBifU4N7mbBPs4R5h0JDLBq3Dgi1AI3MJfhpbdOfcTir/2GlGZdoNxcFhI5gOLhM+7xT2QojFxHkmf5ZyeIPs+o7cg3L4/auXTXo2EMN+HDpfa59rjE6YXlavwy+vXFh/MHB90XGd84MzgibiuDrHGOX4hrumzheHz8jYlwGgJMW3cTeNjcL6hpFQAgYlncOcR6pGtOj8374xMgeFapP+kdlL50w7l4YXPDPyiurE9VM0Up6zGCPMjOLgZMSyOzNvchzltx6bOHGJWhjzczU8eIGvP1CdluGsDuAbSNgdIfj7nzqF8D0bxHx/Xjuya6cO7w4Z2DkUTxTOmvMmpTCFSavqiEkxTbr4BqYWz9bX+VNqvY4sFaVwXwqhoKkqRQLaN8YDGAQdmsgsSyLYNTnkiCG7ill0xlWLeVSt8vxm9d4VXBSWthvz7+qXP4rVhy0TCweMdxnJ+aS0uEbIeUqP87O4Pr5O2TYCDs04eNmZ+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 Precedence: bulk List-ID: X-Mailing-List: linux-i2c@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/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; From patchwork Wed Jul 5 13:51:49 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: 699382 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 ACD94C001B0 for ; Wed, 5 Jul 2023 13:52:16 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232360AbjGENwP (ORCPT ); Wed, 5 Jul 2023 09:52:15 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52492 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232331AbjGENwO (ORCPT ); Wed, 5 Jul 2023 09:52:14 -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 8D79111B; Wed, 5 Jul 2023 06:52:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=EhqH9XC1Q6vNsDKMseDj4DH6Wm+/4bOzZdMONjnC59QAERkyk+afevkyKK3AvRg03uup/AKvgH6nVbHZH2rvpwAVaSS9AAVG1XDKGdbvl6UhZsqVavOolRXU5ldF4xaDZT1hIQn0qSbGQi09fcT2y+Gu5/z82gngFNpnW3+gnDdCNV4miBo6fTwjnq+pCn4gBvA/CwfoVV37XZDZox/1B4oexMOGdKlG4KJZFbHzJDdqxfAw/kEx1im5czYoxwSJeGFxsKfl63PQtRNV/Nay4NnjmImYR9e8eSXsEbNJlTJYqOoOYYMVZoxGQvy+qdqMM5rbKkVRFmyQaNAmmPRDyw== 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=9t6QskThFSp8iFbL7euFZmsipjxCImrO/1Qs+sOCL+c=; b=D498s43dQ4cA9MITqdisMkSr1qngd1NTpfyEKNpbGwBGpD3OHN4XouzDgu27TpPAcFNKbTp+eXT3zGDgUwBW8/M17/8cKvt39JEoXjY80I0+7teekhbqDChlz9AtbbZzIFXC0cEF3j65JK69JnRCwVun1T8Q7/J0S2UEhYjFhQiv0nLCsGiD6locTK0NmyJ3dlflRVMQgZHbNjPn2zHpp3ef6f92QoJrOc7njE1hnlfgNPhn8q7ylmixJVC7MSNwGVJ6IA2qfzdY/0FRDZukPLsysuOk+JlfE8gB6hN31vuAwgnXlkqbnl1SaX7UI/VGPONPNGnVNTNmkf6O1fXa2w== 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=9t6QskThFSp8iFbL7euFZmsipjxCImrO/1Qs+sOCL+c=; b=j0XgzB9dPRCT5RKTVzhSPx9HeZ1C9/mmKdK+nvHoFUZjVOGB1jBgQoHdp2boheJN8NjmxKTQQO19bqzX+zIzYeVQbjwIM2iUo5zCVTcQJbzZHA2XktR8tIHHgw4qJCRbp/L+D7HhlzKN0ZH0EwQcANi1SsaUXy/XFQPZTetwAgTeIsKiIW5uuULauqwEkLkLisjyqImTTtthEw7I5Kj8NumLi+b9mzv0LsFe6RRSSCj486avZ2unIN44pa8IShzJ+VD/nwDuFYVHHJfXGeCbpUBiKIxY42YO7RAfMjNsPGXCg+Sjy5tHa3MyCzpOa22pNzmOthnlooLQBU6zyrcCzw== 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:11 +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:09 +0000 From: Yangtao Li To: Andi Shyti , Ray Jui , Scott Branden , Broadcom internal kernel review list Cc: Yangtao Li , linux-i2c@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH 02/11] i2c: iproc: Convert to devm_platform_ioremap_resource() Date: Wed, 5 Jul 2023 21:51:49 +0800 Message-Id: <20230705135159.33327-2-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> 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: b9b66a2e-c64a-41df-7ebf-08db7d5f0713 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: /BbZGF4A0oJRmnRuuMl25j5mXXlQ+fmhzOb2Q2PAWolKovaBr7Dbix2yZi9l8CgAnIO+pQlVdstLTjWgIlmHhv345i1q80jOMJubZbMI4N1vd2IWcT1f69fAC1ypqWYReKvsa/k8SUOns4cS/jTJW3JmiHihriBWTW5RWNmf7/iUzaYp/4dP6VMU+bWt/h07Je4e4ONcvmkwYaj4KYILw6MJEqSOaUSjawXrGmaHz0XLPHTEgTcNqIMuAtDTwXZ+3lMI2IfN5YJjCNzx9uf9bDSos51YesldIxruQJEzxZhEkL66rWS6prTu0hhhjvUVkPmxfiwmu2wgamWvKOtuwRGakB/RDAfjdNKWS0ddw2hucrzbLCep68Dc+4GzmwarAGLbu0YpGld9c0bRGDudtLm+nEGKNXiGMYbb4jj4LsYxYAAzEr54f+4JRzOISyR3/6uU/vx+lpwOi0FAsqIJmxfkiK8iefyf/eXev3qxNZEGmNJenvAcBXK36vgDwvpiBZI8dh5bqyq8DLy7x57RrhdR2ATi6q1lnPVml7CcUBLGq7eU169QvnAywKxAEPuKgI5eKXLVwFceYS4ZIyhHaT9ceBKliomkhr5bY0BAN97farvH0Hd5Jr4rubJ6p5n8 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: WWPohu1l4QSWaBWZyduJ9KPWlS2thA0GW7/mYs86O9UfjkIen2FkjGdDf4jsnL/2VNqION387EQ4BnHO8m54FUY1DAiQ0l5nOd4Xofkz1I04B448nRNTIXHhs7/mCSJZP5z5TfndJjwSP1Xf1CPAOWG9I18fm31eer3s/vzobZZqM5BZ0kzUvh19pheO0FbV+UfMs8MPVo+cxqk8kVy3RO6rWWL2sZWfUcY3TRW5UhLgxNBIISzul8t+Wv78caJzoa7Yc6lrnF5mJENDRr5gbbF8qG8IFwFPdQGvzrwMh11uC13H4L6QTCQH7buhKAaKwbaYZwYjocGIR7rQLM/Pce6iPGB+bvGGyBhK7+EP+vC/uVZeZEKudyNWNFQmNAqKW4y5RwnPuaeU99y/CsBJPZ17UjJjVQVO5CMf7mGnxGfZve9phKfC76W1acnpA7ZRJvv72GLzNSE2hkxPdx+6p0uilEeljb2CX09PcIMsZO2c6zo9nydKO/cgHCQ6DivvxpGVoWjOjnOrnIYWgDkQl6hnOxGAb8r5V/qPJXf3wC/EFv42sLAuZF7Koqq/T1WPl1/ThE7Ps4LNhTi4Gd3SH9fw3Gp/kvJyvuSZr/y+N9n4xWEfP1utv8ObJvwBQHqMKMMe6c0dLp0DHvDw7LfYFzfAajzXEmQXNB/wHkTztesgWBqF/vjelqCfl84PsU7G/724jzwD2//YS9005ZCILOIoLQocCdogahl0rFN8zSkbqfZJ32SsBtgrVG1xa+3xQQM2U3fc58gZ+UX9jTbP2dW2oebKNgYvVlDQuAX8aRZES32LRAV1DRFghbxvwuVkIMJZZuDWF+PjhpwbcxnLtjXQznMguqR12TkcxFODRpd1rOXK5vihGZq33NYO2R96elOnbLPyY/svOPbBb7Wflz1zVGuDcfn9sxqoi8xABXC4KcRcSPPSw3Bk0mVrgXnz2JGkb+fXSyjl0EguXFv219J2ZQKIhyqB9vyC5fjtXt5o4gcaCzOjPusGvJIhfFX85BpCvKV476bZGtxFMrH/l4QMPLrBAvFQn28HnD8yw+o6LJVEAxA82KedHDklHQVpXn+V8FhaLd8fSKkwCsCLiKpqvheTcMzIJCtHfIqi/kei0Z9SxFQqzGtRAZcFZ9BbgqdG9/5CevXbz7x00zyhNrMNZvpv+b2SLdqjCKTaoFZxZ4YCa819tqGUdy3fbAuj50QSYtwJf6US0/W4w4L5A8IPD6onVTkQbOgzeytE06PwoEMRgg/npbf+CfPdD8q7qNAQZogt+yZ8xkH4D0WAQiJ2FxCENyZ/6MWndMx2rMrOMLBdLN235NCm0ZAWd1N1p/fj/ritYdkIRgxxKwrB6y8XHm/FXmuJgC1ZV5tlrG9C2jj/hqCOU3afLmzpu2H5Grpqt1yw12Y4YMEgVmf+n9VF2tzRO7BWNYOmvTTH5pwoUPujSbh9WLqOCoFB2udde4i2BE4z3/gMpi1+R+VjQX8CpS6JqygwTwNu4WVSvlh3yL2qIY4I8mIs9EkGXrguLJEbIz+9ExwxDkSu0SDOlGMpJc6HTL4fWgjauxHBK3QNOtAX2nL2osAeNUN8WG0s X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: b9b66a2e-c64a-41df-7ebf-08db7d5f0713 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:09.8521 (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: AS6VAk4HYCh9AX4QAbP0CxzZLCtlVQXDDwYUr+WZJHB66HISB4WZGkw+CA7HwoWVUvLxls2Cax40r8qlFii/bA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: PSAPR06MB3991 Precedence: bulk List-ID: X-Mailing-List: linux-i2c@vger.kernel.org Use devm_platform_ioremap_resource() to simplify code. Signed-off-by: Yangtao Li --- drivers/i2c/busses/i2c-bcm-iproc.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/drivers/i2c/busses/i2c-bcm-iproc.c b/drivers/i2c/busses/i2c-bcm-iproc.c index 2d8342fdc25d..3fac85be543a 100644 --- a/drivers/i2c/busses/i2c-bcm-iproc.c +++ b/drivers/i2c/busses/i2c-bcm-iproc.c @@ -1026,7 +1026,6 @@ static int bcm_iproc_i2c_probe(struct platform_device *pdev) int irq, ret = 0; struct bcm_iproc_i2c_dev *iproc_i2c; struct i2c_adapter *adap; - struct resource *res; iproc_i2c = devm_kzalloc(&pdev->dev, sizeof(*iproc_i2c), GFP_KERNEL); @@ -1039,15 +1038,12 @@ static int bcm_iproc_i2c_probe(struct platform_device *pdev) (enum bcm_iproc_i2c_type)of_device_get_match_data(&pdev->dev); init_completion(&iproc_i2c->done); - res = platform_get_resource(pdev, IORESOURCE_MEM, 0); - iproc_i2c->base = devm_ioremap_resource(iproc_i2c->device, res); + iproc_i2c->base = devm_platform_ioremap_resource(pdev, 0); if (IS_ERR(iproc_i2c->base)) return PTR_ERR(iproc_i2c->base); if (iproc_i2c->type == IPROC_I2C_NIC) { - res = platform_get_resource(pdev, IORESOURCE_MEM, 1); - iproc_i2c->idm_base = devm_ioremap_resource(iproc_i2c->device, - res); + iproc_i2c->idm_base = devm_platform_ioremap_resource(pdev, 1); if (IS_ERR(iproc_i2c->idm_base)) return PTR_ERR(iproc_i2c->idm_base); From patchwork Wed Jul 5 13:51:50 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: 699381 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 0FEF5C001DF for ; Wed, 5 Jul 2023 13:52:18 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232302AbjGENwQ (ORCPT ); Wed, 5 Jul 2023 09:52:16 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52498 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232364AbjGENwQ (ORCPT ); Wed, 5 Jul 2023 09:52:16 -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 E9F99FC; Wed, 5 Jul 2023 06:52:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=FMO0A/Hf5EMMftm/1PYK9uiWsa0i8rcCtm5LcBxgZvPVI3G9d3bUAdPocpfiuU4VujUbyk13UTxBj4wmicjDvjtLGQCFpi+cjdVKF0HrOeA0IZDs6jPOPYNmiLzEeoTh82ls1/v9uAgJ3zo2cQZVXVsDajFdml4zamZ6LeWODHsDYHXFXpc3lE6Gx8+dcaI1r25RSP8pEIPCXkMsGj0JEHsnPvjJEzgzCp4Ixx58j82gvIPQkRIrDWloVot6doHHYHrjFU09adYzaaV5o4W7xlMaVL++vW4IIF/AmO/QaTeZdTkyOWgRkCqDj83xVguOh8Ms8VQErzu4p5Y7oyPVyg== 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=o+wD2OlQ9bWbKD7HJUG1jwJAxm3onlW79BpaaRcJxpY=; b=WmXR8Cx2TyumgWZzPzIyDlGM3xomlDuaYqsSZONjjuaRldDw5OPa83wi/XGgNuD/8sMNS35WT+pBFCAH68mmg4UIxHsTAeJl9tu5ickJs+/2oB5ty+4Aa98vsCJKedu/n8zXJMHREVclf7+BnrqorOdRGmio9naOdme/vZWL/Qkh2/Q9ZNAAk5NG/FWADuvaxHDFhdvpAqQOdM9vEc1AoEBL27+oDU85l4rX0q3J7A0WR3VsQmzvZy/1SkqhrWDYMTfU7FkGUEly9Rkz778p0gfzLFlshvusyf+qRNBGM+t3ND2MkI3kpgMZTT+C+HMBRhY1kMGI+vu8ldFOc5eEFQ== 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=o+wD2OlQ9bWbKD7HJUG1jwJAxm3onlW79BpaaRcJxpY=; b=LudEnmR288QU9MeC9KFbOvzdBVjUI9wNqqVg+LHbQrW16rOvgvMcZoFF8cn2hZyF2marJbKnqbh4AQZJIyY7Uwy0KB9UugEJn9VnkiepqNTazZjLzKLy5rqawoamwH0UC/ngkGXvoX1kxpdQuZZSvjE/cs7KwOM67jFun9trd2qRvyCsTlvT+qM2BDsKL2M4wckR22xd+qtoeRNULWneQQQjW/umyPJmrEGkfUcKZrFX4Z4hozGpxVV6K0IXMswdc+TZe8Yi9XUJ8zzBdkkJT3HduB/pa7lj7irgBmbB8fiapihddggB8pZAQMe+uv4cubtb4FQOudK7/KbMhZErIg== 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:11 +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:11 +0000 From: Yangtao Li To: Kamal Dasu , Broadcom internal kernel review list , Andi Shyti , Florian Fainelli Cc: Yangtao Li , linux-i2c@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH 03/11] i2c: brcmstb: Convert to devm_platform_ioremap_resource() Date: Wed, 5 Jul 2023 21:51:50 +0800 Message-Id: <20230705135159.33327-3-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> 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: 1c4eba2d-e317-4e3e-7f62-08db7d5f07e0 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: HoRGqvEHuGLEv8OCfrKM34pIJj7maZgFkI6Z69T3J4yEZvxVpkZn2LYsqF8NL7vJFKph6Gd6DslQV6YBo+G8NjCEe1PdxBQFSJ1iGHkZ4CF8SXlm7fK6cJhzV2vj3TPsZRPbFVfngfV+cqh/ZNoq1RduB2HvnzRP7s4YI06F+mSMk+t9J3u2X4Pm4K/Ymhd5HT5Ih+BeGCAYVxVeKr3XIWVqKkyjg32tEem52W1sEXpbEVWWTt5hhr5rrx/FB6IP0oVWyQ+5HM+8x0wLuPEey4dN2PEfUTlpCfq0JeAHwf6Twulesbh/sHl6TCbMLhpaQ/4sPbUFMfzlaCJ4g+ujfGaBkb3BaN5Ig3w7g7apyUoptlgXfRH3MFzFrKVkULPzG5cwM8og6plM9zLc66X74XAajJJU3+dlGzSgodu/IAbnTdHzFOfEheD44dY0jUnhS1YtbpkzgcUtaOUiu++clOUqTwiCB2XTTIsd8X28bkiZ3uf72dUp0qBIYZu8LqY+S4axR7HsIgsyxkeBPvTmz6MYLPYKEe8qCs3vDhSAGOH+xoyo03rXFKqrq8bWz1LGN9Q/RAqvmci95BUUGcDxjhXI4Eh9jasJ66Ji99BGrZ/6TeqVgujDkA7leqSJLH09MId7f8jnaLyGaJuTPJe3CA== 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)(133343001); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: BkHVNqjfRNKkpdeC6QRJXJ7ZWgJHdKZThQG3jgpHsPjGImh+Vky051T0X/SxauzI89jCM+jrlR+MPkWfGjzIjkb8oeeR4ts1ivKM5aykk9JYI5WINoN/eSfleSHdDoeFLCoiR6X+GoeGPbPcjKWSK8fkjFWPXgN7HI2CWpUnMIwoxl+b1nhHYSGMx5x2o56fp8pDuHO3jaYmA305/IFDmYxjKHSNgiiYyiAW1mXBn7+GLHSMBdxBYsgIMnRbqCgLckAQPD9MnJ1sPTVnyqD2hSo6LgyzEYOkYne5mGAnHE4TkwEa58+ddsvceDBZhfABi8An0lSyS5nPgHfj20UsBpVpm5gV7Ya4gOGaOmBWSpy9/3eZhxvfhDS7fCqhhk0UF9qMcmIop0V5cM565UMst+qcVVIJMk9x2bvyoGK90OpqEtvZZpakve4esxZzm2Ev1oVVu+ZEPdHujP+L88ZjNOxkZsKS+M8SIQfw2B3F+Y3/TeryQ9lXUJpXIw8rADi5A0FUd8zhumu0rK6lZ6E/0aydeogVCluHk7lXMVSntoMpP9Y+lRQBlBT6bYCSa3LhF4mbKNERG0cjZCMWLCJr+nLReMCoC9WNceoGsoGpSTfxOwjuuWXkZ+f9VYWJetuxLPw5gjD8wlQ3J16CbTzX0hd4w7KEAZFumntlWdAsvpdnm99aV0HTx5ah/LK1OPcWiwyZbES6XKkWoKorZnr+btYyI0uygQZA6Jp7M9ViwspEaiU14+RXhXqGDAwt6ZYBSVDA3W7p9jUqvrd4VoAIIIoXstKdzwzKgtqrn0jx9BwBxDTdYssLUA4b369wE7sxDDZyKwFRsRVmSc/p5c/HU8gbUdrFzeAJkh52i3gKKj10Nj04wFZnEq7+mqiT6uBi5x+cZMDWULWMEu6/+9y6JAm6RqHUnlzVRBAti7kfPxCFyCt1WSpUrN7Pjxp0dr1PEVLEOOj5WvqioaenKavTyL7YQvP5w6FGQ2BJ/v92rx0cUbuGXOossUr6qCTHHMpws7r4+pUXZDSXHDxyUAcfGkr+D8PvhAaGAUGvyAgVFH0HiDEx2yWyPVWuTPnJ0BwS1j2Ut4RHmSkDLhmy+953h7pAaX+2HXFKdsY9i/CTCIE9Rs/dHFoJDnr6SfeZUwgwFxXg5WTTDJ83bPkRXm+eldY5ffa3x7XqsAN41IWGopU4AOPFjt06hLAMSMLSB3cJUwZ+rOebBdEgbNIAPQe9VYR0EbPuVqlv8UJzxN6J2Ti0MIFPd2L0s4FMG66nDgjNcUo3atPqEh46bjLxwsBbce+yCuBR5gcxrFW93OMDtA9tiCHYiAFM41cS4cWQ+8S9n16dzxbZFoV5vduJl/R4niPayoPFaW7yzpzvx/QIncC84404yF6vKjpIZZYgJH/KMi1JV1Iudx0vmp8q2HjW9QAurufzrYxbpfGN5I98KOCJnuKAuqjGELELzl7eB4mlCyWTkLjDM0uvP72nsxBvuhOd50AWPr4wXbEbMcYWcs4d7vcXWBxe7jU2yfzHqgjeQdQSzic5vK8l0MrfOP3c9sFy1JL2rKCGt3LnnvCiCZo4LSMp0BaFhEZJQRSgKQZY X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: 1c4eba2d-e317-4e3e-7f62-08db7d5f07e0 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:11.2073 (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: MeNOJUHduFqIChA+otRU02FimWXDSqnYL+zGrwpKI1Tzxeo7WkK0myGE+JAhexLL4Hdw6EIBFn0CPssSmsEoBw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: PSAPR06MB3991 Precedence: bulk List-ID: X-Mailing-List: linux-i2c@vger.kernel.org Use devm_platform_ioremap_resource() to simplify code. Signed-off-by: Yangtao Li --- drivers/i2c/busses/i2c-brcmstb.c | 19 ++++++------------- 1 file changed, 6 insertions(+), 13 deletions(-) diff --git a/drivers/i2c/busses/i2c-brcmstb.c b/drivers/i2c/busses/i2c-brcmstb.c index cf92cbcb8c86..0d422487161a 100644 --- a/drivers/i2c/busses/i2c-brcmstb.c +++ b/drivers/i2c/busses/i2c-brcmstb.c @@ -594,11 +594,10 @@ static int bcm2711_release_bsc(struct brcmstb_i2c_dev *dev) static int brcmstb_i2c_probe(struct platform_device *pdev) { - int rc = 0; struct brcmstb_i2c_dev *dev; struct i2c_adapter *adap; - struct resource *iomem; const char *int_name; + int rc; /* Allocate memory for private data structure */ dev = devm_kzalloc(&pdev->dev, sizeof(*dev), GFP_KERNEL); @@ -614,18 +613,15 @@ static int brcmstb_i2c_probe(struct platform_device *pdev) init_completion(&dev->done); /* Map hardware registers */ - iomem = platform_get_resource(pdev, IORESOURCE_MEM, 0); - dev->base = devm_ioremap_resource(dev->device, iomem); - if (IS_ERR(dev->base)) { - rc = -ENOMEM; - goto probe_errorout; - } + dev->base = devm_platform_ioremap_resource(pdev, 0); + if (IS_ERR(dev->base)) + return PTR_ERR(dev->base); if (of_device_is_compatible(dev->device->of_node, "brcm,bcm2711-hdmi-i2c")) { rc = bcm2711_release_bsc(dev); if (rc) - goto probe_errorout; + return rc; } rc = of_property_read_string(dev->device->of_node, "interrupt-names", @@ -678,16 +674,13 @@ static int brcmstb_i2c_probe(struct platform_device *pdev) adap->dev.of_node = pdev->dev.of_node; rc = i2c_add_adapter(adap); if (rc) - goto probe_errorout; + return rc; dev_info(dev->device, "%s@%dhz registered in %s mode\n", int_name ? int_name : " ", dev->clk_freq_hz, (dev->irq >= 0) ? "interrupt" : "polling"); return 0; - -probe_errorout: - return rc; } static void brcmstb_i2c_remove(struct platform_device *pdev) From patchwork Wed Jul 5 13:51:51 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: 699922 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 E098FEB64DA for ; Wed, 5 Jul 2023 13:52:19 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231820AbjGENwS (ORCPT ); Wed, 5 Jul 2023 09:52:18 -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 ); 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 To: Khalil Blaiech , Asmaa Mnebhi , Andi Shyti Cc: Yangtao Li , 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> 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+OfMI9fGeMfP93xYEfWtFuOfxTz+ObkSz+HK/W866X0pZ9hlTZ5s6kLDZ10WIi71LmKyFnVhdYIKgJ9bD5Nez+ovWfJJueTWjShl2R8Sc9FPK3dQMKF8psreLEomUY6niwN2k4UCB+pumRMNbjEfJLEISjgbINImjOlIEkwlWD6vR3GJ86Myu1JD86W/nTUjvCaHFc3GZdzzRDF5wUc/SNTsXDVXT++xI//D7bA0VqUUNv4m9MoX0BmwYnn5j53XLF2OAr26hSRac4U9UtraW3N08irmF/WmEnj0c+q3XMuSJFJdHXxB7RN0ZHw7YSPmE6YWMPUjldIEQwO6Jw62EUIm4EecaD+XFIakdF2a2msZwkDDqxVpPJWR5fUTcN6/loCtAGbEjUh+oFTHpiHoCZ3ObTnc4plW3bOYlIdPmzWUHYUd9iTRH4tcIFk/4AFRkOINip807bptIrM6SbgWlve6xpNyt+5YoAxP0L3dMjVxdvgqG1BVBb5npFd5MFa+ZZDUIHWOoqY1sOC784AS7FDeyYLmbf7QhL+Hz9u4c1Sds2mlkE6V1iQVAVHY4qE7aslAlFGQmbUmQ5a+MKf7xbK2m1rkIReQut2WXQIcxyyfRBx6pSjyvhE+nwsgw/vGz/B6qFQla6Dq88H2gExfadhsmBEa6rnT8S9EMvNKXTtqH4DDh7iUbrUlqnxg+vIihJ4VVcPrIXXclDnguym8nQjOILEhVzJZKcuggOhPK4eyW8+/TFOf9lC/0WQmF/KViEG9qAMT88slQ0g6NhKL5yjqJc+oMGMFisD4PL1f73reTRV5slX0VgNZMduDLPiMiKSnpRNqvLq5IzCkRYF4XzZ4o61KqCdotW6RQxsrG6VZBxh7N37+K/KTLuIbVz5q5aP+FRNTFBvYl4hBLCdkaheKgTWCEVvuF8DSiJL5PmV9IMM1iawOqzpyZnaMhG+VI3ct0kW+AQbvEQE8DsMd76Bsc+sO36DpzcUuXvoZyjvY2jpW3JM+vdzWtfSOSPDxERwj+/6z+Hlt2xMvfmlwsKHSvct48oa5NLGMhjattdPhqWdzN/Fd2swi65Qgn6UUHO3H2yZ9Tc3uk+/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 Precedence: bulk List-ID: X-Mailing-List: linux-i2c@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/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); From patchwork Wed Jul 5 13:51:52 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: 699380 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 1F917C001B0 for ; Wed, 5 Jul 2023 13:52:21 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230488AbjGENwU (ORCPT ); Wed, 5 Jul 2023 09:52:20 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52524 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232380AbjGENwS (ORCPT ); Wed, 5 Jul 2023 09:52:18 -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 84730FC; Wed, 5 Jul 2023 06:52:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=No0MNdypCbYdZDhBKyPba7PHE1nqr0ybKcncQQasjcU+GTyGYX5QxfqR95R//C6uVO4sjJQkITBgwVEtvYlqlT0bYO30grNIbtNDJIpiXTN4gtp23zePWoThB+F3VcX9JS9HPwRCTiKSDKtj0S1QfA8HzIDlysj1uANx32lQ6ywsGnws+CEMSAjCcW0bn9nLIof/4VkbOOdnlr6k54jamcYUZhGteRjH1588EQ74Vn4DnqLCs28Hu1Ysx31xrX4Le7AcsOEgBSn6Jh0dsory1erYML6DWbVvd+Wnqh/etNjIuniUeANNRLW7SNcHC7/sI82b2zRGXzlArWP8pHApNQ== 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=+f1vLbTi9fKLjup7MkbKDY5dDT1cFKNHL28OvmqBpRc=; b=Sg+GD3NRPZJGKMWu2s2rIaAeGjq9ooIbXWPEcmaGwWLfYEZi9RLOr9N5eJjJV4AdN2i6XZJGUnF9ayI5F+EI6uQ48mgrMc9UEpI16vPlkrRL0oCboPCWcdUbYEjhH5zjEJvr3cWiI5Xh2V5rQx8Vy/8yW+kvwSAAPeHCBsPFP5YKaELtVsMO9QyrpIBi3gfNtiJF8IcfwAkTSE3mWzKLTFWSh6A6u698Es6fhQSLBYFYlS7u7A1LnwwhojvavrrZJOBik/U8GsWQN3B0o/Y7U6nwij/+5P8db4DGkTqGxvwav40YzIYC3sv8qpJJtO7yqqyHDDmZorQDNRMbXzi1Dw== 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=+f1vLbTi9fKLjup7MkbKDY5dDT1cFKNHL28OvmqBpRc=; b=mUDBYTKBid8J+oKn8FC22ftwXa5TD71ZKKHzfHzScg4H3wByUZIKKGx9N6OssSo3lhmDfdWZInHiDPX3HmAnXcelg3n9mK75eV4vmoaCRWZFz8MtQC9J4vWCt9oOlUisEyWJkDIgKw/wzA0VNc0yPpoZVJdAEyWC+j1n4d1kwEZyDfi8Nc0PvQImQtNKpv7y24+V85kGyZnp+EZMgBILUF2I+as/tJozXOu4iqt7T0c6xYwTtTkQBK0p22gby0lSHgqZNSOelmm4mKRxjnyaRZdQyIP8KJTeSTYf7kmWffGhlWz5U28HStTKDFZpwc8StKkSrNu8rB8wPZsOnfyrow== 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:14 +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:13 +0000 From: Yangtao Li To: Pierre-Yves MORDRET , Alain Volmat , Andi Shyti , Maxime Coquelin , Alexandre Torgue Cc: Yangtao Li , linux-i2c@vger.kernel.org, linux-stm32@st-md-mailman.stormreply.com, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH 05/11] i2c: stm32f4: Use devm_platform_get_and_ioremap_resource() Date: Wed, 5 Jul 2023 21:51:52 +0800 Message-Id: <20230705135159.33327-5-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> 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: 955ecc9a-c71b-4083-80a2-08db7d5f097a X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: VXI03kB42pLOhQS5i47vwq4B7OmnBYLn5kcZeCayerJ8Png8DEzuk/DuxEWHjfZT/ZkqSx1OdcS+5RyVD0XoqK0Ea3uJ65ywh98yW+FfcGKIMCD7jblK2mwztKZsbTT51f7XRgWusIMte5AGwasZ3vX6/SFp1fveTyKQXDT7bj7zshRVS98ELd43OMVmWaizMfttBgywG0uk7dnVOyK12K/lVO9nN95Hk5lrIbAqMJR06csEgAbf4s9+oATruBhp3lr5JX9zYWXTzZ3PO0OQf+S+3ca6hXe/Mv9tV/6gfABVq5p3iVCJQ0Mk/r2helRxinFi8P/gqaNFBnzne3OtWEiNhuu3V9YuHyReYOvip8miIsJAZAX/jFPHmcHABhSlCmrodk526mejPGg3UZMZwKYcJuUsLMedoYr5+rQp2n66W8/kWCUHxYmiCmPNVHCvw6anVTll0nkv54d6gpca/OtdVA9lpfJMLHUzr5Jk07e/72GVp/oB6beuvoDM0l4Q9VR6FBizAzBV2qb0UZnEkEVc6ZcwGOVGjF4YsUohQQFG+H9O+6H3C7t6PR4lKV50Apgtv+VOiFK03Xvlk+jckwQolbUKEkawnqWJZwV2qX55hS73pAc/XvDnilqrD0d9 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: rr479FB2RqAs/6yVNZtNJMWanO0p0rHBx68xgGoYnrcbGDBCLJ+jpGHx+xb79LWoIpDPUxZmIYf8fyjnFXdMYnXEN0K0sND61SOA5r1TKCkWlXDIDH3vdReMdhfW2+//pmOIb612EPgahvBk9Ej+lDcnhQFa1bMOkF04VbXCQFFqGNJMmV8LuM727L1VsiJyfrJs0IRJICovwMzt0klMK6RQkTObXOzxGEVegoWzsukz03W0I+uwBwZBCotGvGIbmQHJiXuYucLRUW2Rk+RerV2jWlHXKWnD1bZUUxYrNNE7MWLS+hd2Iq3F1mvYyQOizzEDVsmAy4BQG7+RVDK7ZD8FHa/UU8USME/fGhlEk9hTEYEuk1AtPQ6DBAzWl2OSOMOr+Vu/bHc1BpbHZP3v7Uh016YutiXh9cxEzIm44kttT2jgeT7M8z0bhGKZwjtVxfryildhjZIqew2jWC6N3nBjG8Q2PYJR9gnYqRqh1WxPKNyfeaM2SftyB+ihsh1Adu3ecInaLWSSzzf96Wq0tfuvBTKf+jIDx+Xq0lEp8Q1yXR+5Oa3T7KJDc44wVDKam+osehWddjYBPCHh0q5jlrdLLK2MmCCPn6q2KDc5LpvQZyAt387kO6PxMQY2n3RbppJm+0kgUpqsmj8TVGca/36pAMwQIYXdkJM+Ez0BF4EVi3UvFLpy5TcwJ+RXKWJpiDYtFJ0VTS79s2H/Cg0A0wuCOYjriUWX8LDBbGQtPfyOhFQjeZrVz+WZCdXj9OG/0nUj5+j2F+g8B5yXRqS7jqMS3bbXTlTC5gdNFhVyRR066vUN0+ZT3DnU2dQ8c67i9hbeZAgVgzdF5fkIeXIYk/bFy3h1E8EWHQY6TvV5qzMzcya2rDQSYG4tFlpZmEzejWOisSnFrWYy6oTsNPdzP4EboRKYsh79CZxpVwqzx7ksX2/S5QtKx2JUeRyrRfMIpbdfT1URjk6xKUjtrl8IQ7TLRty6SzbS5mfMUodFxLz4Ssl7f09tisj3LuXkThd6pbSCxQyakBLR8pBbcH9oV6OAEa8YUxfBjG5sIocB9AaxK1geac79MnaBhobocEyvfrQ3eWraENQVqx2Avr1xGmTzVJrStljF/CU9hY/JFTCDsW6OEkEwEr26wgbHDD5tjnNR/Vr4W0vqCVY4wsSlqPvdRA/C1lK9FK8nUzGsz0DVhskMpWApE6Nv3CyGjza17ASx6eJx4zzjOj7LKG5WdzV5dmSY+ZEG6tRW8WUITG7/NNPyvY0q39rTTZVb8KPyY+baLZDI6otVeOyhKrNeoX4Rv1AHvXvmoAXowQesE/0YzyBI8HD/3mQgrBoPN1nHBIMDEtxUTW0okU+kon4k819v6xKxPjJS+w5TKNJjpxJ5OW2rO7fgg0Gyg5z4mqEtxKRpiYyp+vejAkzaxXQWAMv/sbEEq+Ky7j8rCSslLqRbJVotWKxNtlZMMbwcqUQOZfgO50TCkcpSpu03f+Ad1D7fM1ri1m3Gtuk0WiKzT+8RVKwxVQMm7E9Jh+qe3umvV5KS7IDQotdTgoCESsIcXUWo/CtUdvkjXOXTR2nbYZh/K6g0QOkDmxn3/2l3pdPG X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: 955ecc9a-c71b-4083-80a2-08db7d5f097a 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:13.9046 (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: 71zHGlxt2zWL9e4xWZZw2LDE/Q7CaYoS6DDoFgfP5etWL0ERV9tzuPlz5BTftkxGmSNs43wAJtoI8TGnSzZFNQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: PSAPR06MB3991 Precedence: bulk List-ID: X-Mailing-List: linux-i2c@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/i2c/busses/i2c-stm32f4.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/i2c/busses/i2c-stm32f4.c b/drivers/i2c/busses/i2c-stm32f4.c index 6ad06a5a22b4..ecc54792a66f 100644 --- a/drivers/i2c/busses/i2c-stm32f4.c +++ b/drivers/i2c/busses/i2c-stm32f4.c @@ -767,8 +767,7 @@ static int stm32f4_i2c_probe(struct platform_device *pdev) if (!i2c_dev) return -ENOMEM; - res = platform_get_resource(pdev, IORESOURCE_MEM, 0); - i2c_dev->base = devm_ioremap_resource(&pdev->dev, res); + i2c_dev->base = devm_platform_get_and_ioremap_resource(pdev, 0, &res); if (IS_ERR(i2c_dev->base)) return PTR_ERR(i2c_dev->base); From patchwork Wed Jul 5 13:51:53 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: 699921 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 3CDCEEB64DA for ; Wed, 5 Jul 2023 13:52:23 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232391AbjGENwV (ORCPT ); Wed, 5 Jul 2023 09:52:21 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52544 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232227AbjGENwU (ORCPT ); Wed, 5 Jul 2023 09:52:20 -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 207EA121; Wed, 5 Jul 2023 06:52:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=cIhvO8CWN5qkjZvcshynL7o7x4y8sFYuB07Ycm0pKOx/1XcndGDi3ZK4I6hwkIxAC47cIut9DqjThT1llVIcQ3y9XEOhel+Ul1lC5283EURWJ6A86cEz5wmBEQNFkj3UJrfyF5KlT297fkuKuLKQNg14XoGVM0gxrUv09/NIYyk0+wAWKqfyR2ODOkKPtCRpw5y09nZyYRJZtSbMEfxwaQp6f8/wwbOq11xGlm0RPd2cyTfrF3KQBcfDYWr5jc6Zp3UZH6/b9pu9fmG7QfeMuH0qO0iRgIs2a0Am4UNwOQEz2nli2tRbJNtKqptQzDvmLfuNo0r85FZP9lM02pTt5g== 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=tdb26EYaPAoprJFKtW/qFt1bUD6rf5cw+jKBZQC71QQ=; b=Yd/5EEP/IRJxBBCoiW+VanE6mgBDLB1qeSIvkX8z9FcDBYUNtDnZmwolT1/Y5R6CzISrkzPSUsku4joKP9SHTxQpXiQy18+Q4h9U5ntu9Vt7Xhfi63K/2GQYAFEH7OTVP3fNDsw/WyzlQihGJZGYOsNTrYtEFqtkyVlbytscg3ADeWs9ttKdpoTHsrI5tmGkwfGZr5I4DpYNmMe4ephmuS8/maSdCl4jZznckaU+GdUrwqSXIYgq5/3pyTv93dhb6aKHfcMmSbNj42ixRGZ3ovBsyUIE9KA0qXiBw+1TWprKr0HMAna8BgRNxR5dpO070zrg/GtSrTxG26xH1tIUSQ== 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=tdb26EYaPAoprJFKtW/qFt1bUD6rf5cw+jKBZQC71QQ=; b=ecL7YLPI+vIE1XO25HBZv84WOu8H6UtxfYRFWadHkiyVfy06WtUzmojoyd2bUcst6vE/NxbPwfuGg71KQdEyCpBZKpWi7ItwWpKb3FxheqEOT/tDlytUTu85FsBqDOasAliLfpYk4SKSE5iyv9c5RoQi1LSH/cQncq/YOh3sNct7Rh5nq0cfeIBv6EdlnAaQM6bZNNMROEnRhMy1Oua2Yd9FXj1bKAe3Z++r9IUeG30pZiD4WhwkkgzmEsYejBu+JMUGrJypY9/r0k8e8sPrM67a1CVPfZnHrEkl49rUQcooCKR2P3rx/QxC/MdyhfkavgkB79o3BbbA2ZFoObtUmw== 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:15 +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:15 +0000 From: Yangtao Li To: Andy Gross , Bjorn Andersson , Konrad Dybcio , Andi Shyti Cc: Yangtao Li , linux-arm-msm@vger.kernel.org, linux-i2c@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 06/11] i2c: qcom-geni: Convert to devm_platform_ioremap_resource() Date: Wed, 5 Jul 2023 21:51:53 +0800 Message-Id: <20230705135159.33327-6-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> 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: 6f142f5f-b2d0-4329-e37e-08db7d5f0a49 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: w2IeqqjDlO7QfFOBsqXubnhyQ391DzSWI6mAY80OxEyKbU8M7NX8drtj1sN054SHUKHjKBUmSe9gFm5lWCvNFrkRI38TsbSTkyrbsOIoele3Tf37LF2sAVVuhcP3ar7Cm2pRZFkp5Rrvf1g1mULHLIEC5XhLMkq0PXIeQ4fzpEEK+0+ih2ZLjZjnHBmCpwvoOz/TMD9lskU0PDBXDj3R2XikAloVgvXa2tCw9DBeyK4Hj/UiCEWdQ1TCeTG3gRmqN1kK9X8qvqRKYNJ/+e8aSFD5pnkHpDfMKuBaij8zQ5cCJ5BIRDgVIujFAjXFyasyddj2Db7JsKuA1442EVPC3PtETnUrQxQUW6EyahnaqLPIF8R2QMQIS0sQ//Zf2dXtnjR8hVx6EN+QlZTSTQCbr8XQ0lB/J/gjejRccZVlYKCcpuf6stXTbsmqyLfi/uzDtnIf4zcJ/S0l8ta8TSWaLnDhz/dqlezwVkoIYkc/GDEcUTkax9CvK61NbLHs5OGXFGJrn1UAwtfdLz+D0B+Zlhpz5NWEHalfK7+cu4TJGlOnjjLt2l63xrnjpuypnN/aRhvwPuWe84o7R2Z+KXjvm15HCro6X/fI96X5m73Y8ckaWpBOPafqCd38gTtJKXg1 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: 7q25s2ZuRZgNnQYYRyIpqq2vztAD8gsO1ChBm4sCfQ9UVOBBnOfdJktMl41uZ4rdKHpktZRyP/w8RkXng9GTJdXOBnyp2UhEOISmiSPYll++cfgl/TUjXFKmNs59u4pgjI4XJN7fs6FshR36AkiBdYhgYmGXc6EczLozRAKpTmq2DRjUS39iBU4Ta9255IhuZqrMEbYaDzvV+0YojNF0LUTq7PjAnTUsJMzq1XqiBD7ATDuaQMtKzZwfn0HQeJWSI7r4/F9YR+GG5/DaXodNKowW3XfkXvppRRYuNxAt66i4DQuNCFpOZh4pq2m73IDVJ+6DIOAeEaVAYCsBnhw9CDCD48CpKqbAQMnYNedJykqxd0g21lo90kA6uk9R6FIvcDAreiVcpBJJJdyqEQwyYD4Fmclv4u2UNzYiovDzm/yXLqYCWpqjvTf03zVpcapMSqHLeJC7J3bnQ9WQlXDl3hXpI2vfpxI8EbDTmrWW9SUx3U8E9jZh7RZYR1AhHd7rUxSHIlpXLROCKsoBBvDtWH0+higBBm0cw95opfWJPYIjN+rp/uWKTPgYOp/T/03Ws/WMPyuj6JpHREIzaR4/uWs169rnEuQ0MPqmzyt5avO7sgSDTR1x+5A9wAGiyck2pztZgzjv/wP7ns57/qCwyXEaxfp/fhaqMd0QzS5Y7W+f7pgfMLIIcWl2D7FOnU3cOx5MwzRYTVbX4rDmFQU5B23el4jNxXDo8HOe7kkZ/GNXYB9kI41z8B9eT9dZfqC0KELWjBypqQLjB+uY3F9k/D2ufK0d0/y+7660l1RuIfIJAY3O1MIZDY7s/09pNIOeQXUqn6J96o9oq6C7Tk4Tr2wsjAtO6a+Ujr8m/lP3PE0RPUK+Gk2t5TrSPMwxVtCkJZrJKn8Yug9CUX+WDgF1ELH70IocMryszeM+JeIArwp0Bmt7nHcSnEDhwiTsVAIkIYtXFPRONvMmLv8y+zzHmF9zUGNn2YwM4S+DxJzxx/8A+uDF4ZzCUGfmGZtQPc5UdTw59UPTHTBo8SgNuH39dv+enpjQhU8j9j26El3VKNRf6eZT5k23U+Q2oN0b/kvjhwg+wO3YONo43y9A7VHmkBevL+4BMYhGN2gCWbj3XswQ054QuqmhRSdUsmNVD9xbZmJqHKuai97Z9J/3RV728sSpfaBikLjCouh9OI3sBG4cMDriLk9vpNr1uw7ggN0i0JVM/Jtu7JyIzI2Q737T87qdpdCq76sP9QTrSY/meXyNv2uU/lEKBCv8arF1wbrUtTMhyueXxhvYa1uS9bKMosN2wOzHo1MNowUkldQCviDU4+ApSOt1x6Eea2tECG1Wg+bcCJRiyBOKq6RvVvA+mUSdp752wpaltAA4IgiqQkLkYiLykgsDZ6kG6478LoxBNcRMcS/GUYUtKnx15BzuYDZFoA4shFdQBIehQ2QdrEfSKi2XnStC8M/H3w3z3vMt4kEnII48xx5Ll54vxLhDQBGn7fnU/U6L9A+mMbdohv8vLJKjwJRUjgUQtY3OJMuPuG9Z8sPtFdEgIvVugk3asmu+eyzQZnEyxttzMZ/UbarxlDwMvJxmNo2njcMF9/kU X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: 6f142f5f-b2d0-4329-e37e-08db7d5f0a49 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:15.2618 (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: W9vXbDrDyRdeE0boSKFJombHiCylowMSavCFUvik53PbtGTUrelAerkwT8J+LN7jJWwWnquWG5XhZL4Auy+zRA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: PSAPR06MB3991 Precedence: bulk List-ID: X-Mailing-List: linux-i2c@vger.kernel.org Use devm_platform_ioremap_resource() to simplify code. Signed-off-by: Yangtao Li --- drivers/i2c/busses/i2c-qcom-geni.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/i2c/busses/i2c-qcom-geni.c b/drivers/i2c/busses/i2c-qcom-geni.c index b670a67c4fdd..229353e96e09 100644 --- a/drivers/i2c/busses/i2c-qcom-geni.c +++ b/drivers/i2c/busses/i2c-qcom-geni.c @@ -767,7 +767,6 @@ static int setup_gpi_dma(struct geni_i2c_dev *gi2c) static int geni_i2c_probe(struct platform_device *pdev) { struct geni_i2c_dev *gi2c; - struct resource *res; u32 proto, tx_depth, fifo_disable; int ret; struct device *dev = &pdev->dev; @@ -779,8 +778,7 @@ static int geni_i2c_probe(struct platform_device *pdev) gi2c->se.dev = dev; gi2c->se.wrapper = dev_get_drvdata(dev->parent); - res = platform_get_resource(pdev, IORESOURCE_MEM, 0); - gi2c->se.base = devm_ioremap_resource(dev, res); + gi2c->se.base = devm_platform_ioremap_resource(pdev, 0); if (IS_ERR(gi2c->se.base)) return PTR_ERR(gi2c->se.base); From patchwork Wed Jul 5 13:51:54 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: 699378 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 5651AC001DB for ; Wed, 5 Jul 2023 13:52:47 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232397AbjGENwq (ORCPT ); Wed, 5 Jul 2023 09:52:46 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52742 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232425AbjGENwf (ORCPT ); Wed, 5 Jul 2023 09:52:35 -0400 Received: from APC01-TYZ-obe.outbound.protection.outlook.com (mail-tyzapc01on2122.outbound.protection.outlook.com [40.107.117.122]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0C51F1BC7; Wed, 5 Jul 2023 06:52:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=AvQVJ2IhECtydh+NJytaPn5NNqtwEtiME08GovwMYnWhOW0nCdyGJXQbdyaGmVXm2S57mxNBPKZHIdzhkrnsXlWn+7uPXcjR10spqZZorcewaw1+HUh8sXRWDDO2ho8LpnCW820DPXQ+NEZRgKJeWdwGg7Q928sI9q0dBARemozs+CA7yTTZ/scGNEm4cXYgWg/C68lZ7kU2HCJa1k9dM9pNnjq1tDjMNLfRbIW7bKTuhtAxZiVHHfkfPtKMS3rnvSUlrGeHcPYy4qRDUiajRuIMDXxVQLtC5v+QhsC29rFlKkaONZnWWuO6b8ySQq6lp2Me55PjylF87hprpxRPvw== 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=WUqjCw8dJAGGMwXpKJMBJI/YD7X/PDd5YfI8Bg34FpE=; b=SA4D/sDoyYzW1LM8zjVBZAQEA4+nAGxP90mxzyUM/7FKgJQk7aVaMimWf6AUqBW40o8xNnkcXsEIfVdD891YGkTSeKRCIXWHdbDcMjPfLe6oqMvJBPyuNIfZN02NYdUdWkB0TfIgJZIphuXzf/X4mI2bdFibnd+AsQTE6V44WEnVXmMLsmMEvJExarFrC6BDZE+SUFprf15TejLj5ymU2NY0pV6b/kfl8bx/lxdw2Bey4EltugkGpp7HaybbQs/XrdoirOHKi8ZL4CkogHxrVzkK9FAiJTi03Bsth17+iLgb9Wg3Yc+l6xnA+ppcPbafNXSqOBpScBmFkbDoJYAuGA== 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=WUqjCw8dJAGGMwXpKJMBJI/YD7X/PDd5YfI8Bg34FpE=; b=RYHduFyY0P1HMcpAB70MUbmOFVjYngEPB3lXrkuPnEUghBgSUsSMPcHA2SCVGXBaoS06Fp8Ez7hAqeKsbUWdfYIixQaZbFWmB+mm9sNQnSKePyElfvHmCV14GCLUvQ/MSSBO0yCzUE4RSph4c5mvV76vUBeN6COSCTOLHn0GZsiOOLCvT7J3Bmjg3BVY69shNlA/ylv7EdF+NGwyOtJX4mYRNedkGnCGRhhoiBJWRmBtzt65D/xWsbROVDryolUcPSUveRqbYkhBz36Rl6a5g+hB4CCvptoBEcmG6WYqHZAa/T8nFP0cGp9784kW19S9RTeEXbHkSS5/NIQ0kW+QPQ== 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:16 +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:16 +0000 From: Yangtao Li To: Patrice Chotard , Andi Shyti Cc: Yangtao Li , linux-arm-kernel@lists.infradead.org, linux-i2c@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 07/11] i2c: st: Use devm_platform_get_and_ioremap_resource() Date: Wed, 5 Jul 2023 21:51:54 +0800 Message-Id: <20230705135159.33327-7-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> 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: 06993d8f-912b-4c2f-0dad-08db7d5f0aff X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: JXjlUcUcbIPqbPt3ZivAmqXz1E1pWXIwb+AOA2yGpQ2UX6i++aR0KVqo4dGSwl4Mk23NF7jZp3OkkcaEcsFZBJD8sZi3toqB9gSJL8rUtOFdJhcLuSvkG/d8ZRewiqoQW0vp6eSEMVgAuT+L9J++tA4nyHGOWEtArkeLW2zGONZAQCQc4hNVAUv/N9W94bVHSs21GdOM3rGTik3koycU0y2wQpolLb5K5SyUzAAecIX/QaqAv07Eu8fHoxyrO+SOyw43vInV5W+RwB7HXp4EbHcQwMGAC+2nx1Yx8Q+HL6+mIfseUsJAZ5lyWzwgFcRB+mWdsP+t7BBd0b94nZ+zEuTXrH1o4q5c0YB3GlpIrRS37CC3axqvxiQu/bLFNWY5nVEEIRyvjW7hRoJn0J28jXJRjGYnl0K3C9MHYAeDoGC7KNKhg5t0h/a2azLc+6s9PO9tvLJvB1tnvjQ7SL2oinypQ+Jm8UQUQ9u75su33caPP66o2Va8qbOh3Fq8orhjlg85MzPrPmF56oXLDiJpKVzGV/xACTRKTDGXJmFfXomEFPqrKxNLzH6xm9+LsivwBUk8X35PdWlljOAAvOB1VukAJn6ETl+4n0OZykWk396/N4WHJdFDYPzSvtSBczwn 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: PBJysH1sAbjVpdyUESBMVC3G1DBIu6CrfdCRXChMHAgY+LRR8H0ycatmOKBaryVqBn5KFrdcqhNMoSN0D7RKSP6FzdhWLqEu1HOk71P7OTtp0+K8Z04lYsLWjEAMrsH7Fzt28Rmm+Iv24OUjCdnrBTk9HGY0fsNxmBUH+uJiBDEnrLzOqzEQ3g24h+JbzSKZpEhWldCjryqMXjkCedp1/7kj2f+jXWj1GGaBpeTtgDBtc3gbMTkyDPJZ6SSvSz/TGAy+kFfiA72gR7Bq7FgNbARr7H1Y9Rdy8jwqDK/hFxzx14fuVLIxsiZdFAHzQUxIe6NS5tlTNFKdVC6eonwZwffahV6tmiGT4/Dfu/2yRc6ADQeZOLOOYFpTRsD7tEDrcrg5W701n3nlNkwcsX15AoESvm6j0fS9hpu8CoK+w9f+gcPKYZu3XEiIdQN7Sdip5gUwmICNWC9napWRQcg0TZJm4IgR59sGAjGuYANtDwvUOwQ6VERw+3A0mSrzBPNzn3nhEh/nBtno1V8LT6crKK6an0OxFuS+9Nv3VT1OWg4S9HK8QBTGmPStxKOXwUOe6atk2pB8uR4zJ6XUtEfXHZAPHJwPBv3+BKGIKJydOwQ+YBpeb0jFaJeLxzpeu0lrot46SfiCp7QqXWxVzM8PzrqN9AgPL4mE3Z+cuF/L08ymhkI+PT33q+wOm6yqJBfGd72c+kFBjFodu0VF7oczPBpLfmE0zpwaJFEUi9SSwNI9S7lTSY78Xpaahk3ivTk/eZBi8AZ/7JeiUKmcq8Sc11lpSfqhRmilppbVXzjDr+rFBozIfLzLQ9ETOGMrFtgmdKbaLFsdDQQcKh3k7szX7GmcCfQjkc780+TIu8cprDWzlVPGtlKKt2PInnwwMgjUJR7dvopollj39+qDYw/gk60vaIEzpyORXbVjnt+rEX+ISksKCEXoOcPeFWUm9iuqbqz3AkPQUdfMUaTPB6cNSqrLJNYSUCc9lQpR7zPZmOLJI+H9ajF9P+y1ixAottr7kJFOkIL10QLORy1FgDOZwt3oyEXvBL/+uc+FJIleFGb/QoMoR8Rk8WaLlxesRILxsU2kbpVgL19xuiHZfk77Cy7KyQiJQK0Hwxo9DEiV9ytfWzDQjEfT3elPFhzowFqorapSbPeUsMdJY837GLGbZu/eMLEh+X1smAB7oVuRPguggH/JbY2hUT2yfQJjGdGIkenCaKNNGAhAy9WMhVbEKilr0J6AGc5jOuBS7gODMHuLsMJzf6yILl6mft3CtoE2JifVJL9ZH2sTlx6ZEpgFgHPUSIMGcA6R4DX2Ifj2AuOnvhSrOMbk4m3nlsFxiRgvX1CMY+L7tTOJXrANgFztpvgkjgDBm5mL8DIKOPJ8IhFOSP484rsNvD3JmfiorAeC6ulkLHgI7SJRyb47727Me6Yp0PlIPWlfcWwe+qp3py03UzJT4+8t8pKwSsDuF7YbOKeAko8xROOdXg+xpfsQ2R1yRh4O0hCZMc420VOvgfjH/b1oSFvqf2AwmBQwydgAwqNBkkWlYC+XT/SozVxDSzGMxwl7OlxdN4+ByOt95BepSNNBReF70Pb30cqU0De+ X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: 06993d8f-912b-4c2f-0dad-08db7d5f0aff 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:16.4499 (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: nxew/VH08jIdE6Y+7Zvvm20kpxMfH7X8u7W9lT4ZYeyCHSTiWkW0ZDg58eo65cM9Ld3u/UtKxCu9f5j60somVg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: PSAPR06MB3991 Precedence: bulk List-ID: X-Mailing-List: linux-i2c@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/i2c/busses/i2c-st.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/i2c/busses/i2c-st.c b/drivers/i2c/busses/i2c-st.c index 25c3521cae0e..ce2333408904 100644 --- a/drivers/i2c/busses/i2c-st.c +++ b/drivers/i2c/busses/i2c-st.c @@ -812,8 +812,7 @@ static int st_i2c_probe(struct platform_device *pdev) if (!i2c_dev) return -ENOMEM; - res = platform_get_resource(pdev, IORESOURCE_MEM, 0); - i2c_dev->base = devm_ioremap_resource(&pdev->dev, res); + i2c_dev->base = devm_platform_get_and_ioremap_resource(pdev, 0, &res); if (IS_ERR(i2c_dev->base)) return PTR_ERR(i2c_dev->base); From patchwork Wed Jul 5 13:51: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: 699379 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 0D54DC001DB for ; Wed, 5 Jul 2023 13:52:36 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232413AbjGENwe (ORCPT ); Wed, 5 Jul 2023 09:52:34 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52844 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232416AbjGENwa (ORCPT ); Wed, 5 Jul 2023 09:52:30 -0400 Received: from APC01-TYZ-obe.outbound.protection.outlook.com (mail-tyzapc01on2122.outbound.protection.outlook.com [40.107.117.122]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8C36C173E; Wed, 5 Jul 2023 06:52:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=MZkNCGy8auo+XFQTi1vDXWmTzYMesK1Va+0fEdq+2Pnb+CblCqJhMZhfQcKGdofnL37NGQDAi3PNOnZs5Qmxgi3CZcTpfydscNdnHNFhlVLqL7ui8bu69TwogzDXffsUCmsXd7XIBD6edd/5XA682j+OHM/qEjfuqyrXJWpJdnzFDT2peQjRCoIL+kVCT3arTmRrio04LhiEfBg8OA/2pzD+NlNvugh5W/uMR1uyN+HrctYbYZssoitVENUft/C7wLKhqAWOHraSNEs36HQVA2B1AcZ4vsGN2Pw5EDs0XLtS2kKkvtWtbIG1qK4AUoH88sqLe2hE22ILKLtNUR7SlQ== 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=XNgMkAVszr2VHTFJZOTnggT/8att7Um9d/tkp8iyTeo=; b=QA+rnXJOPXWQLU7Yx16Zinxgj0iYrsSXazyYlbm2xPrFdkR9W9OcypnE6Gjd1Q2PFh3CY5gTgMW0pmTyTsMXT5JEMGY21SoQRVLYUP9Ngfq5zQbQWZlTxPIbAgLiQXbZUEjA8ItkM1YhhJhuhrDyFnTpEE2tTcBQVXpKZGgPNVwEpRVg1cRldD1wDoMUNakzH15Yfegph+3V3jH1rcy2ojyssupULZeiuYdAmd8zjfSq3DPha1phsu2lrHNDTE3dkYAi6xmGiRrbccC8IV0Wnd0TAdZ3Rra8hcbBRyMIyCCsRs3YNSvdES/cS4zz2lkQx08E8b9ZDuFBZQEAbQUgNQ== 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=XNgMkAVszr2VHTFJZOTnggT/8att7Um9d/tkp8iyTeo=; b=cIMruj38BB6eBY34hlpsYtTT8LIzWO24QE3uDiYHm976uwOEZP22FRwEWEGnOjBFXjQnhZCclPcs53yhwGN/Q9XqeydNUYxU8Uc8i2LwFFGxifDjm7upOiDM+j3E4f76ZvjlnlQr3g8XCXCBG59xNqkY0QbTUNDLz3cFiBRjYgmkB03c/adgbmFZEXB2+ZhfXOJ8gnZQAwVYfLKqYfd/7oqakHPjizJt4nWb/doV7gts6ojg5skdQldEZ445lzjzTjDJ3+nopwJWd0Ct3kCRaAF6Jbjzcz2Uv4xcq/r3VvoDxPa9cFC3bKoSDSBwPYQ94pZuhawYWDa7WlhxxnmkAA== 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:17 +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:17 +0000 From: Yangtao Li To: Wolfram Sang , Andi Shyti Cc: Yangtao Li , linux-renesas-soc@vger.kernel.org, linux-i2c@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 08/11] i2c: sh_mobile: Use devm_platform_get_and_ioremap_resource() Date: Wed, 5 Jul 2023 21:51:55 +0800 Message-Id: <20230705135159.33327-8-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> 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: be1328c1-184e-4c7a-37e7-08db7d5f0bb4 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: PCc69yQLv+FLOF8jIvsf/VTQi4V/ChXgZi/mbETUQ9qlF2MyUrWceScBLm0xBzrsUYEaRtHA28CbiPNEAoguDVUl3uDzuPWKpeWbPDqF+9VkyCfTqS4+TSJgCGxr4/mTQAZ/Zd5CQO72JpNyrGBepvNPd5vmNytfOLbw96k+yhmZoiHC0Rwsae2oAJAjs/Dc1eDYtHs98Tkef0I2Lmx4jpX5BHHJGkXCHWmEoKBpatki7p3Brql8X6cMZ/bnTZZBMmijwvppx4BiguR/jwSZWVQxU2A8OFGxARVXZTkAlfK/i6MsQJXMSrwfQFnZDwVWtqHkAkqXcFm0jNqmtliRpMyb3rBLfBclNVbrT4nIejbDqXO3UVWdlZVjwqglqgGF7+QQDKovowATjo7dsQP8we+hK62o1gYORlILQZC+43/TZS3pfqeyW81vTXzrsCyOX5dHT0eSwhF0CwNd6yEWRqbV8I/9l66z0749EPYIL7PeY8rsphE3JrKW0QA0yEBamTWGmPOElX19t3Dfc31Dj5fsw0Jg5/ES8fMzCfNBGdWs0AyfyXUaeP2iheKpT955tkTH+p6b/UJW45VoGYenoSvUe/KSpyvAIHsStTNlDN3kxpVmTYp/q7o6Eeyakc/X 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: dOWUuJPgM+wgI0NN2TY5j2awfYqRU9oXBA0rO6XrO+/6usjdVywT6kD5NGNGPaRuBr8WLdgWZpMpp99YC4pkCRDP9cYPnerT2F1iz1mi/pb+UyT6cT4vFM83N6wZ9w5u/bfmFjI5R8tM8EfhD1cXfyR4Qs0A9ZATN+y12zmPGqXV5OApZkizei8iBYybds7TaqiNvnMf5MxUEp6zvZ90ayesW+0tAkyIe1uy1SYLhi3K9zCMuBgna93XXx/rO7m5dX7z3SijvPV3eZ9fNVN//7RI9gdC2TG4EDMzEdBQ6bF4pszcI6UaHiHG7rQUjWIqrZ9k6z7pgUISNwspF7861I5JRcaylhPQ6ygaBFWosoyKKOV/vIU7SArbFL158JMiWdccfM+yBQyc/0cVJWvz9hLV/JOWnlxrrACPT2YEoScQBjMwfdvijK952AYgKIEG+KYFDhHBlyj1BYiYNbaV8F+9weYm/KR3l+UkfCxLJE/X2GYgRMX9dwTju4DjIB9fhlEmHHt0xsd7iTq234QhkMNRO1BDxj7Pnq3MpYXXYwUAX2Islw+rLZpkQS3mbyZl0DNLrTddc070DQDoTL65FxTmQIZrMOU0FPA95b57eSgZtk1cX3Myo6H7X/nlFD8+CQoduoDCLMG0yy80i1NdTW/tjF2+9GEdBKX2s9SuLA6W7MyMgPj4z4v14iLXnfEb4BtTUB7ZOSdgVkq3Id5hPA84e1hWEEHbf+mTaaf73rp6hYw3X0OYknf1qVtAIRiUwoZpXr9S1HXhNox5cJgQFF/8VRtpCNRbW90b+FRC9X9+d/VJwuRKulVkeGWe3m9esIbpCI1jPl4Y2hwd8ReXJuM58bCp9u05xt2EFEOEr9lJDe7LGxwNxLSYRWHLRfIn1yEhjO1lUFPY3U1QQBuWBemrSRbuPOJ+3kwFhGxkFiQtyoz7hfBuNbbJjPQvh8SJE70551dkfIVx+xaHV/0r7CVRgSLnzhMdDXa+7k92XyiufUMOM0K1PyEW2ErRfSeSNKdGqVa1bz77LZ3Gmwh6BxwItn12MvL+GcxbJ8HHW2nehBp0z6/nMnPZAp1N3ogq2S1mZ9WuKkw4gQLOajEmXOwmsv25hij6c89xl3JlKINi+rZjHOkr7X5h0pIOTsfFOnh3c2F+D2LKG8it0LO5nGpVyPBCDV1aYiWM5GI/XGKa7EQN2rii4UDrf6P11SZd095S5h23LpXrqFGvFNxwgTfxhC6tlgm93OfNv4CyH31MV+qkOnmzc3mlYT2Y/HOmqX9s2VNpWWFUYsTZ9+BWXrS83JoNMnjHvz6JmQU97lc1TSEV6EMWpabpfH2htOwc5/XqVgziNft5geODit3+49FMjnKtfckiYYjv7tWYgJgJgBNNeFNLKiFU6O4bIVIH2gz3kIBAsXg2ER5YyDT6ZrkUjYgJZx5AznuUNEUSG8gJKHrswFJYggE2jDkY1dKprjCDaevsARv/eLHmz+NjgBCY+00VrWJtdNY89LCtF7Fy7WSC3aTLfQHvG5Pc2z2STN3R5X1pG4cflQ+Rt4KoFQcrWGf5FkDw7W0hf6xfXItRhQrzzkaoYy4nj/HQ6Drv X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: be1328c1-184e-4c7a-37e7-08db7d5f0bb4 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:17.6430 (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: WGNNT2djHy/oA9CrpIMwuwCYKxfM0a66pM0UQ8jzmgOq533KYJZSlO7fbI9mPUcc1lNf6KYtlKEHsVw/HaMQHw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: PSAPR06MB3991 Precedence: bulk List-ID: X-Mailing-List: linux-i2c@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/i2c/busses/i2c-sh_mobile.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/i2c/busses/i2c-sh_mobile.c b/drivers/i2c/busses/i2c-sh_mobile.c index 21717b943a9e..e2da633b5e9d 100644 --- a/drivers/i2c/busses/i2c-sh_mobile.c +++ b/drivers/i2c/busses/i2c-sh_mobile.c @@ -893,12 +893,10 @@ static int sh_mobile_i2c_probe(struct platform_device *dev) pd->dev = &dev->dev; platform_set_drvdata(dev, pd); - res = platform_get_resource(dev, IORESOURCE_MEM, 0); - - pd->res = res; - pd->reg = devm_ioremap_resource(&dev->dev, res); + pd->reg = devm_platform_get_and_ioremap_resource(pdev, 0, &res); if (IS_ERR(pd->reg)) return PTR_ERR(pd->reg); + pd->res = res; ret = of_property_read_u32(dev->dev.of_node, "clock-frequency", &bus_speed); pd->bus_speed = (ret || !bus_speed) ? I2C_MAX_STANDARD_MODE_FREQ : bus_speed; From patchwork Wed Jul 5 13:51:56 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: 699920 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 87B47C001B0 for ; Wed, 5 Jul 2023 13:52:45 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232461AbjGENwo (ORCPT ); Wed, 5 Jul 2023 09:52:44 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52820 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232435AbjGENwd (ORCPT ); Wed, 5 Jul 2023 09:52:33 -0400 Received: from APC01-TYZ-obe.outbound.protection.outlook.com (mail-tyzapc01on2122.outbound.protection.outlook.com [40.107.117.122]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6FB6C19A6; Wed, 5 Jul 2023 06:52:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=IzGPHifEPhEDp66U5GhJtqT3heu/dSX4QfUaCZ0T5VdwpTigkzDnp8eepKHpOF/gVCNhOKZMdSs1w6i+W6Z1jQUjqywuSXc0uLWpIcAtmkcENWnurGxp0nFiQyjZlYdI0ApFGRhj98ELO3Z3VZ1ZEc8z4YuKqP48k4CVCb9mTMkBtniHQnVCtIilrsryw/IR2X7eJSK/03jNZ5LRb8m0xhqr3PvzCdZA4l8MyP+XfOseUpjTH0UcSmiQx14Oy+XqmnlaOAn5BJ9BdmjtSE+TOD0PelmkAwwhynE97aD5UxLlz0w9UapXb2cqbvNWCCi3w4CMo+GWlbRksXEfUIfK4Q== 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=zi6TzN2hL0vt3qrUYbV1lXQWxJA8TiWxiQ0uLCPdZRg=; b=UifFbtDbyDEQAsQchqEbm1QHI6RcrUkKDyxWur508VQWKk/ZYG1DnY545Ibmv052D+gTwH+obLn1a8Es6WBT/uJ4Mes0BUo54UQlmSPjTUsvZzr6h91teLPhGVSk2XQzowg7C6RD1iEuJAqRvzWYuaec29kqXpRETJv1zT86lZU29RkRmbqJ7cI6QnUSxmfPW0lLj17qDPcIV6jfy1kS0KTJRQRBNnwQtolAm2DjPoANZx6EzU2CyRe2k84wLloGzYNMS/vU3GRH+WAHYfcaS+iD7URdD71jUaE1G/OSriBNoxOo36v2FmBS0Dvcy/vMTK1H2tHw9ro6vPk8fLuZJg== 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=zi6TzN2hL0vt3qrUYbV1lXQWxJA8TiWxiQ0uLCPdZRg=; b=kjGUwEVJH23JEQJc1Wl0KsfWXx6+9mNa3vxujHdnojSQSvItP2mUc8fUuL2JHKimHAiqX/EXg6xPeGb1r0vsQDI76sxuP/Va+TEFXfBHqUdG881MRnoZiTFhzguvsKwUBWR6kwOnyxSXe9y343mMlKfO9jb+s6EUCDJGOLbO+pUHnMEwK6KdzRI4glpKB9/0Kg5gSH6USMdljRn/uaDuupNKAMXF9bIL/JyCmdjwX2C2dxP7WP1FdHC7pgqtktCiVmKDDJlo54KON4iNKU19FBEMy7GoqUH483iLjWY6awn6MZ/S/q5cR65MMxcXLh9mdI165zb18REF6oeFtxDhmg== 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:19 +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:19 +0000 From: Yangtao Li To: Krzysztof Kozlowski , Alim Akhtar , Andi Shyti Cc: Yangtao Li , linux-arm-kernel@lists.infradead.org, linux-samsung-soc@vger.kernel.org, linux-i2c@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 09/11] i2c: s3c2410: Use devm_platform_get_and_ioremap_resource() Date: Wed, 5 Jul 2023 21:51:56 +0800 Message-Id: <20230705135159.33327-9-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> 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: 5bda0aaf-8e40-41dc-5f41-08db7d5f0c88 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: HSw2htB2RHaqDULWqcb2VGHP+X5CcwmuhsodCWIWjREcgQIh7i/HbEsmDDGjkz6U1cG2JY5cDMR6D0sUcBy9FFTmpFpcaossYYQ/hPhvcCtybA/AxS413PzlJBVjQprfSbXmUlcdSsKNkS03RNNRszoAaFp2Mg0dtxhk28nipZrS70aGkecoVPlnBKaFDYcV/I0l3WZ9xn9HEn7PfAiQI4xWAczniRqm2euZNY6e/jL/nDKIMJLPtB2lVRxx5dfRfexBJ6Ksai8D0MoJz2BIEDP1LWIlU6m/DZrkYShq+XxNsUx0Tojyakb0jQQUeAhbKvD0bW7zb4NnLHrXjdjPScjcvCMGx/d+186ci7MbVy4kXx7RWrUZxeVBnchHOSDD7WS3LrtdLIBteFGyOFzJ5pCnStvUS1Kh4bg/gaF+QJuu2eAcHvHjdXK/vyiCmXseOvyzIO6JYsv1Tv7NUfCRr1zaGUUuQLYP8oB08nlyyiiF3FQvMYjlEpRIAsVmm4IhcD6gWDtZ9OSMdSvUYrhz5PiT0LaM/O4CvKRczuJ8AtOmROQPt/mj0T4ZiP8AU3CO8P0vA+bjJW9932Q07nvDcVQsXqxJyurf2qjrDs3DogErjmGIisLt/NJDXjIzDNBO 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: g5sQwXUIVmVXagbSEn0lRLbv6UH3paFIH8yB5XjVxa6m73sHX3+hcz+Ahj+PjWiu8rirXuMGWKSwKYUQ88yqcBzE9iHRJuV2NyiprVSCfduZoUYUllw3mzeolp3uP37EZW1E3f5FPeu8rqbKXfCoLXTbPjSt6Eth6KC7G1Pg8sjG2mM9rCcyMhAyD78fyOUxDIxaeqRs0c57sD81WS4u/l+EsaI9OySnF1m/on0P482ehNb1s71Vc59RoyEsmf+nDaTSTiFOcucS/4CP0KZ61Lt7BjCOuHOKjSXP1d3ObprOsFIjDH/hwSkSkJKsxKhLoi0AXt+L9dFkiASj46x1Y7al+eu3a5Zgp9k6u9Rtp7mbA4kcGlx3m7YTN6cnyZfrd/q/p1v9XX//NTFo0qvC5xUrtPsU8vv75ypbqah8xQjg4Y/FJD7x8P1A7A1siSBCZwOTJgVBILYXipR3zDXruX3aUu4TyzcRvPkLxI5dDEx3cplzN7+eAAs8qN5ngyC21dV8IZot0ZMdncm70D81+7B8WtjcpJGioNi0+WvcRxXbnjC6+7yg43EjvJB9ezigxUXffW48kD/zME07tFlBygfdZq0vaPDi9xQE1omSxJ5nB3IsB7eCQ2okBzk0lhnOdvha46pEc5SZVNl2uM3PTNWkj+lPZF0rKqbHnHxpaHEWnJiWWhZ/HPZeTIlY0sRodzFsOgPQRMkoHuPIwk6tDj7M9xjjv3c+T6Bbvqr+GafUaZFBuhHZWQ+EMmTXUUCUhSA6Hx+IWdIux9DowSBVKYfUtY36hcb7g3hBpM91xz0dC0+SFe3Tl0q8vg4J0K3FLqY0T+Ta2tPpDctVsD69Vh3R4LBNTvYAW+u1TBdcWpKbi5ebvjcyCi325ZP/rGpy4T5cBbrZRLrU5zVM/yq0/0cs/Tu6T3oG3pHr/cj/2zCwSrtnJsBDKJwKqAWzaRwVF9nbXvcS4TiTeK2NDgM2+1oyTy0oqhj60FjFzeX6bzgssPxyrCOK0mXA2xMEd8AJ81H//L0s97OCS3RSvyoWxdIWZx3bHfznzk7BGbBXGD5JIsCc8fLXESLMaTmZhjAtvfAF4od0o/Fb7T6J2/NlibdqXHUQPq9BSnbfR0Q1doT/KxZ+JL+7UdJTgGD82TYj6Cr0bxOOV+ac5u79DuehQKQXeN97OnSNJ+gLJjFP253yW0BflB67vmlWsKB651xcUgJfd7dp/T0XBU4Yooxc9UCrcp+bvOw3GQEjGpt70P2EM+KXAayIe445Ns//tNKePKjQgJQNmlhPOKPV5oGyoby8XEoTGUhJmUwj2ukPlaMCiEWQNcvyptLClur9fm4ZlEs/2nctPUnE0+/0EcTbH1tmR0jAyeaVYOtGwteJePqP3pIltHRw0DNrnrL2jz0y56uSwKa9+F2elmozpEOo/RDYgaHMwgtOZpdfZrDqPdcHM4HH3SuzhiBV0/gvI6KpMv/p7Yt06dlkjS5xLD5eApvqF06F/vC1WxDFe83vojQ/zJciLeT/gyPMQ61C3tsKZR4bfC6jGY7Hj6uG9z2GiB6Ua+N2JMmR0Lb9JJrE8t/u84F+hS1RIKC2xq/oct4W X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: 5bda0aaf-8e40-41dc-5f41-08db7d5f0c88 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:19.0489 (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: fSrWeIRx+t3hx/gOhdcp6QIvM71ItIFov2Ccuyti7bF1B19WdlB/MeZsMdfJ5JMV+sw9bDNL5Kbg2cbmygWloQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: PSAPR06MB3991 Precedence: bulk List-ID: X-Mailing-List: linux-i2c@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/i2c/busses/i2c-s3c2410.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/i2c/busses/i2c-s3c2410.c b/drivers/i2c/busses/i2c-s3c2410.c index 28f0e5c64f32..c14c3807e135 100644 --- a/drivers/i2c/busses/i2c-s3c2410.c +++ b/drivers/i2c/busses/i2c-s3c2410.c @@ -1034,9 +1034,7 @@ static int s3c24xx_i2c_probe(struct platform_device *pdev) dev_dbg(&pdev->dev, "clock source %p\n", i2c->clk); /* map the registers */ - res = platform_get_resource(pdev, IORESOURCE_MEM, 0); - i2c->regs = devm_ioremap_resource(&pdev->dev, res); - + i2c->regs = devm_platform_get_and_ioremap_resource(pdev, 0, &res); if (IS_ERR(i2c->regs)) return PTR_ERR(i2c->regs); From patchwork Wed Jul 5 13:51:57 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: 699919 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 35DE2EB64DD for ; Wed, 5 Jul 2023 13:53:14 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231610AbjGENxN (ORCPT ); Wed, 5 Jul 2023 09:53:13 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53324 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232514AbjGENxB (ORCPT ); Wed, 5 Jul 2023 09:53:01 -0400 Received: from APC01-TYZ-obe.outbound.protection.outlook.com (mail-tyzapc01on2122.outbound.protection.outlook.com [40.107.117.122]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4BB451FD4; Wed, 5 Jul 2023 06:52:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=ImDygVG6pUxjAbFhiQtodxKRsE4Th/aDC+a9QzrFhBkDyfyxlmIPw7alKBEpKhGuAKvAu7c4JwuHMfyc7GvwDDRmtHvUxVHWXlHkMBTp3Z0qebXMLSD7znn3ws6nrnVn0Hchxba4P2x4AVSKC1aaDh/OM41W58N5zPgurG0TyjHmBMNcKeOVAnFF4QCwnxlIE7YnnnO1N+lTHog4wZM8AEWi2zmz8HvfUoqiDU9Ci2PYI8Vspt0yJ0T/LO6i5wAxynK4kunQhuQTLyyiB+PfwUkKitnGwnljyNUvaQHy2zdiDUgTOKmmDxeQ8hlxmTalv1K7s1cKpq/jcvZTKsvMqA== 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=lHyrtNnG06ZSzKzW7gVBZQKPDpAKb3rsNn91Hd5iBY0=; b=Db5thvzKjYNgTaeNgXu2cB0MMEQKL413NwBIC8W8+WYHS56ihFypwaBfFjJUzdw9+QBYit/4JqIrf5IF8Cqe+2GQYpdkch38e757RO5Tfh+xdy1/1Z6dp0PLEJhpMHflB/2L7vnjFOG66B2p2R9Qw1B0tDlaDd6wc8uk6hYGDl87V2ifGbFF56gjVHmq+9KYHhdXfz/GjQtp0+BiVNx5duO2yid47ipSzwjw9YUwrO2XFcckPHNLxHac6IoA5FBG6Ex5wq2POqEiWBIAyGk718Vq9pb+Etr8glAFvDjrGMSOXEO3zoCP/5D8K9xfwQvqg5gxMC4kDsvMISHkIQ9RxA== 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=lHyrtNnG06ZSzKzW7gVBZQKPDpAKb3rsNn91Hd5iBY0=; b=qll/h5SzLiAF6ySmEP3Q3SXQEPe6HmYKgZM2xDJ2AQ+WsSaAW4SMaUIF5f7ZXefp4acMPKHIsbpWb0socCj0W53Q2g2D6kVquqLcAp2em7gj1Jez6+nS4ZSI8CjMcvkBmuZaRCoO7pmHtFXulDXgMSj/979tv4OQSgDo/9a5C1VVCtzpklFPEt7IJZdkc7Ki7qPcvz5eaJfvKNRc8vlR3ft9npBkn4ZWhZ/gcMHs7ZbengW+vK97KdpnkYuKYEUsUZ7IVKiUI5ADvIjCRfYFCW7FwlQ3+LM7oup1a0/a+VLc7WuWxx717KWqWjHg+yZzO7PHDEbDCQv0/h/tWU1fJQ== 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:20 +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:20 +0000 From: Yangtao Li To: Andi Shyti Cc: Yangtao Li , linux-i2c@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 10/11] i2c: pxa: Use devm_platform_get_and_ioremap_resource() Date: Wed, 5 Jul 2023 21:51:57 +0800 Message-Id: <20230705135159.33327-10-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> 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: 7c843d01-0c89-4ef9-1559-08db7d5f0d28 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: uqar5VTpD2KKpm2CQs2wgbpG+n34MsGgQsCUaya6DtYx7pE14OQZCpbXMKnSvlqtMNTLPtT73w8/NCCXsAtv8csq3/icOCh2ZzSOkLSZn2STBXldKneMD+hLhISYuZ2szOGVJUj2STliEhBsra0N7ee7AdAnExgulwlflVXJc1DILlRiNbXxwNzdR/XnT+hc8Zi1ot5j+HBIawGJHodYIjht7I1TJ8KJkpK4R3RSAS/q/GHftvQXtCwc6y6UoPUa/WKZIY/OzYjQu2XEBd7fB8Suay5aolSW85ZXa799p1jiPXT6G5PAklGF3Dqu7cz0JOeyAZPkv8UWPzVDyGZcomGTINENO+1o5iBpaEBE64x61254WXRyZSsB5vFNe/cnslzTHyMOHqYAm42/VN9UdBGB5nyag19/nZArLpVCW4BrV8qb2RDbemQlzH24hpIRfqRXrhTjESn8gTWxR72C2Q1I/zQGrY3nOyw8bbp5ENdRpcpCs0Gled3vHy8MGbgv5apfhAio3T8+UQ+oE9SMMYJhPApQ0Sbs/7AA/aC5Vgxm75fIivE/JdBaI/s49AEpjdkwWgY5423aUgd8SMl9pC48ZaK3JWe6Q21Rqw0Puw/22cmZW9VoQVkoWZyVvaLs 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)(6916009)(4326008)(66946007)(2616005)(186003)(86362001)(6486002)(52116002)(6666004)(36756003)(6512007)(26005)(6506007)(478600001)(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: RO6W+mmupUo6N4hlT8+C3znmtmfIIg5TU6czwA7Z4Qt4snXlgenhBsuAM0MUj93cRiRUuIrOOEBN3gkp95d/mwsAMx81/uK4aqwhEV+Nn3jJPesvKOnkQqFvGyfkO8gcn0Jtgbflt86H60WCj/IuCBrMCK6qCeNZrDdiZV3hYhJmFTbkOcpLn1N0bMp1/DK+RDXIiewyPXoEbHZqOZylT0L1IEhJC9pPQo9CShMFrGbJjMQyhGBGaJfqAbJzMVihFPMo0cQcYN3sa4sSF6M6+FK/euTT5jET89wrchdXiShMs+p9yKFciq6m+RWW+l+ANq8lIkFtv4WyHtvn/OessYc1cY7fyBf8GeIXlM8owxAc1tlbZOUYL5gI8johTZud3cmZ7srn0uW7MxCdqZF8MVbrYLNSOHWg+a/hWSCweiO9sBhfi3uGu9j1Gw1Ynkoki7RYkIySeT0EGIVPwF+grCFfbs1+aCyoRBW37HeBgj6HiVcuMQ2FQyKirdPBh6yBIN0XKDPCML331v/T76FBXi6pMW1JjvL6v5rusVH1sTFtSv5h5eJP5w2NTnN6D/hxnOkSxhz7fjN3mRnNqsdPmFDBDwSfPDxVtMGBe5ZQ5p0et11yVim+LkkS09UyD2mfpVDZ9pp6Ckbyw6yLnerGYA4XadaOiSVShHEBEM/XXgwydZh4KhevcOVwkX5GA45sUnrVn8Gphp+ePywR2f4IwZHiJ636bWn4NXHGhFR7gorwR3E+VLTR/mC98NWr8ZI8GLUYAtvl+wnrZC8zMg/7UeMPbkhbHQ/xlGoLXksxPXJX5GAibWJnXScvME7oNxm0afix+0Vy5psA5j/qLmP1yb5IzogFZgQlwYGMhHVK53wy6W/IzDpl3/oPnfgJMMZVb652s6fGN1nq8T98uPkk0+IXv3en0xqK5LfAHzuBHCltUzIdGZecde9V82gHmPOYkDJt8jLVNVW6QQY2DnJQNOurDgP5lyVFiOkAZ4dCrUKvQJcH9RFCQf2Jk56ZTjbao/whYrUSPnxdV4zEsvJHUZeM56CUhbuxibtHbkZxcWqUVdFUyk9FfCQyGAG1BsLRYnZUrZf2vPLIcF1h/Tm/WM+rzssXq9IrgNRhKFcm30aE5SBS96qkaHVwZOeU7wuNJuilAq+eVs6G63lNL39jKZDsqgFYh6gp+jk/3EQjBv4e7thAb4TrjXCz5lcLIjvU5UhzC7ZMjwnRQHESdA2Afq/CF4B5ZC/TNFdvzIV6Yx/0UIMeSqpEBB8F9zY2B6vwYevleWjW4/nhefEOer7p1X0Jgds1qR5I4ikAsYvP1pgMj9Ccga6QUey59/CV9ro52C2+sSydrd+gIxsA+9qFBTP1sc8X8hgy0vK1tvQ8HmZo8Yqy3I2ir3sHCwvoo83msqMN26jcXzpK0sTqLBf5y4JSgzbgK38NlCYhxp2AOAXRFCFuYa4uSs4z3O5CT2jNGzzI1hrOw7XpT71QqGhte55P34Fxhu//U0gf+QOXenSrFvjySea7bOd3S/gBillr+1hQ4IOqw5w+vzy121Q4d06WJ2JMn3IZrjyQ36dNO2HBfsAlPO+62HMyAbSfuaIR X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: 7c843d01-0c89-4ef9-1559-08db7d5f0d28 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:20.0738 (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: 7GFX5bXL7JQWHdJldeQe6UMWcyYBtxQEzSl00xGqB6kKRpKMb+NN10EZzEXFBaHErwxycpYleviAjRm2NVW29A== X-MS-Exchange-Transport-CrossTenantHeadersStamped: PSAPR06MB3991 Precedence: bulk List-ID: X-Mailing-List: linux-i2c@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/i2c/busses/i2c-pxa.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/i2c/busses/i2c-pxa.c b/drivers/i2c/busses/i2c-pxa.c index 937f7eebe906..73adcff3a54d 100644 --- a/drivers/i2c/busses/i2c-pxa.c +++ b/drivers/i2c/busses/i2c-pxa.c @@ -1362,7 +1362,7 @@ static int i2c_pxa_probe(struct platform_device *dev) struct i2c_pxa_platform_data *plat = dev_get_platdata(&dev->dev); enum pxa_i2c_types i2c_type; struct pxa_i2c *i2c; - struct resource *res = NULL; + struct resource *res; int ret, irq; i2c = devm_kzalloc(&dev->dev, sizeof(struct pxa_i2c), GFP_KERNEL); @@ -1379,8 +1379,7 @@ static int i2c_pxa_probe(struct platform_device *dev) i2c->adap.dev.of_node = dev->dev.of_node; #endif - res = platform_get_resource(dev, IORESOURCE_MEM, 0); - i2c->reg_base = devm_ioremap_resource(&dev->dev, res); + i2c->reg_base = devm_platform_get_and_ioremap_resource(pdev, 0, &res); if (IS_ERR(i2c->reg_base)) return PTR_ERR(i2c->reg_base); From patchwork Wed Jul 5 13:51:58 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: 699377 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 2CE9FEB64DA for ; Wed, 5 Jul 2023 13:53:35 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231539AbjGENxd (ORCPT ); Wed, 5 Jul 2023 09:53:33 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53920 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231937AbjGENxc (ORCPT ); Wed, 5 Jul 2023 09:53:32 -0400 Received: from APC01-TYZ-obe.outbound.protection.outlook.com (mail-tyzapc01on2122.outbound.protection.outlook.com [40.107.117.122]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2DA9BF7; Wed, 5 Jul 2023 06:53:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=X/9kNx3mlXFP2z7V+s//vBUH2zkFZjiYVjrBWwba/j8hxRpIM/Q6kA+ufBtkU6DJdgtudBujZ/Io1KjyNY6kSZ++tuF/qeULd9jK1W4KGI62ZU47pvbaOfJxZ4EGoeLFuE6zdI2H+PGu2LTBPTvoEGCIAECr96tpPQVl6lNFWc2Ug2rLlaSInWH6KwoglpZs2JAWHX/ybFN5bxT833QAseTVwNZDWmnC5Q26tJmXZH4FUIsKV0AFhMIAHK/yF/NvYhByOCI0dFjHYRSn8IBb0q0ev0E4YzP9vCoVZXlgKap53df36d/ERBut0g/z/IHcRoXoZtKZrnsqAMNSTRJHvQ== 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=V9V3E/S7EZrZHFawnqtiHHPJ3MITcasZo4yoCNxbo2Y=; b=cf63vqLtZV3KlXJIaL1A/reppQQqRMfOViEqXT2JCIikVCdslGt1YtrgT6NFC5aMXMr5cvDOg4wVibBxundxKqv9r9lV0OK/WaqK5zr7lNsuHh7YHns5eibogmk9VNJdE+jYMLz6Bex6s9unYB6z6Q45kBiEbpQfjfyPS0tGHYVfh2EeqqnHfY7txULOiToZLC+ugkD4VGeD0t9X8bqsext90uic3uEHlLatZII5nwWEeLGQEpdPbU/jjf7xaTr4UAGpsOSWC7RHm/eLWUu3rE6DU2C+prQxQfT6ZC7HlqMCK+7v+VlX7MugPQJxJRUB54VflhK2ya2SWQRHjcpe1A== 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=V9V3E/S7EZrZHFawnqtiHHPJ3MITcasZo4yoCNxbo2Y=; b=kywE9m0AFIKZ8cB+RlU47gvL4cNsKoXSIUZp5KPVAgyvilLqGHrakcn8a+IG0tH38ffuRnyWQclvl+V7WfgT3Wfjaa/0bLBNZhsisYM1roxniZoEBDp7VNjIzhWXqCCCGvFCS0GR6MmMqlchv3x8FWWDgkW1NwAZ/PuCHTEdxdigh79z86q36IjwCCHGPFBir00DvgFWc/5vQUGXWmD2sceSXtDTkzD6VQT1jq55ysF+UK0D7PgU5o8ienUlOrFZF42qhbWQo6BmoiNy+s3UCKSOCChBQh7wAeCjGc0BuKKOYWF7aALb1ZdrDkR7a/ej+5uEA/L10oI+BiiPMizH/g== 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:21 +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:21 +0000 From: Yangtao Li To: Vladimir Zapolskiy , Andi Shyti Cc: Yangtao Li , linux-arm-kernel@lists.infradead.org, linux-i2c@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 11/11] i2c: pnx: Use devm_platform_get_and_ioremap_resource() Date: Wed, 5 Jul 2023 21:51:58 +0800 Message-Id: <20230705135159.33327-11-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> 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: 2bba23f5-80a7-4aa1-3f88-08db7d5f0ddd X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: d7E/Y58kTsU82SytuNDM9TKvTtqee4nNY7cyz5dAaxNAGUhgn5je9nwgTHSsssVpH6TzzkoKamVGXhnvPx6ZCdks5Y+TzECkuqYACDyyrdOd6ZQc+Dc12FuO64CiRW7sRGp7NjBIBUIj1s6Nki68n7aCeZV24Y99u4voBgCGSOSGVH9rAzIurHczMs2kTAp8lVO9XNPMpCDDMokXGvIbv+HIVexTl58p7QfT/yhqEsLq7CjOinHFenNEJLzGabDIE7+MRMre7oONj3T6iyf9393CeRu9t1jqIULirbEConKEMnRXGiJMec2mb3umoNc04IJS9KcRgkWV5FrSqm5MT17Uz6GiyGSnXAKLDAEMV8Nj0gMHb5YmkIH7LnVyNfkWjeT/DdbzhIuip2yNTMRSf5KRIKDO7XyVeBTcsXMqwnJwLJa35cMD8s3MrWzsjEdpX21wlQjuxTlYpMbT3mBGbq8b6vvfDWip+nwQXq3J+jw4i7sW1E0uGAXgmDbQEF+Nlo9Hh472RAWIFECAMGKRnIQMIApboleQWREWQj/2s+AYqwW8S9pMVoiU8baQgGcW6P4LjMhZKMb5wiCfE4DH2NWQJOUMr7Di9f/sLEOS1JzzScQhsoYL14ZMjx0taJ6K 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: ANmr+GGKfJuZtPGhZApUYLYB1YK5rLVAHumcRYcDftu39H81oFyuDvfl477gwJyIpVeft9v6L21gjyifDVY7jZ1SwjgVE0RC1WiXAzwvinso9wBASSgmAR18/5hxAB15nmk/tXGqvcKSrMLhqckPEmpem7J3XwUqVFKrrw2ovj2JAW9xvOwYe/oorYOuQXUnXIbxOQwPBndpTRhEcFSJjiXngN6ZhGtsJpmM+jHjZGQ2ZR/i8yQT1XLj2kwbnf50+7PamXenzSuBZBX/T607xrVcsyVmN6FcmxPzz0MPSwukSdoEl+fa3/VlAdVqKWaR9Jvjb4Iiijbct5i3Q6ZAsPSRJOFSHHgGQaW0demZZd9nwYP12oy7f61bb2C7tb3vX1btNIUsBZy47MzCeZnm0ZRyfrCcTYga5q2uVh4h4+HekhBMQD2Bv070v3M3+4qKaCBuaRiRdS0cAQvkoahoswgyRypD5VEgierQzg084KK+nka18hQS8YY59SB/oh5syG/I0NrlQmn01ByPj5R6c1G1rU3Wt845QC2ND+TneI/PnqFACcULO4FtuGARp3EfEotXAPjHjr7mQIl+oLIjnOhcE6cYEyN5bbQRkpxkEDC3ffM4vnaQ9ofZUW80YPwgE9rG39Vcc0AAlrl/YudUfuZeYoqv4JmGMT4M/CylNCvYU5yznJKmbJpn3aRNyC4ZUfyE8PN+FOl6ahPKFrKGPqhXhBum8fIx+MUktGThsXp8FVavFHxCTxuGu4U7ZGM/KuDdEhHgSw3Qv51tI1bNkSsV97Yd67nCaUBKf8XaUfWTqxoV1TSwc4wstmEzDPNJCiSb2KEpV7wGF7YGsQleTPP/rL173oHLqkkrbZ2eg1ScsUPQCy3fwMR3Lrleaw/aEf6qPYvSHGDIvAsWkVdujPymQAprai9hNAIuQKnE224NZr9I5PKLtGRrRKFmTp0fjBFs6STRd9afS0nkQ73j+9xnbqyidy357SX1RHE5pCBJI8lnR+bf5O2w5j5noYaKtAGxkFcFpdhQ84w91RnGrTU3HIQTlkvSI5cP+4fi9HPPHOkQc+dUf0dMtetvWkWX2jQx+NhzwEiCbbNtdPcqEnpj5YmDfzXx5vOXx8AlIegprtryYb+mOaQg9kCljVb9tKoPLgbmfq8mXdl0b3rDFSIuxEDh38K+GY1RE2PhmFrqnlLXn9oI+aRaitE+assiUP9QiSt4dQDzFYNvoK2wfuFVWNP1oGhga5CyYa6Bi9tZQKHcRy5IstfK23kShzJnDReawGnsZp+fQZGD5AWi9FgNAMhoPavEVUqedJyJ9VqY1nLOcZwek+lAJv6nDuhfcI6cjKT7ZaDUr3fXmjslxahXftICLkpyHun3cnlPg17EGvAFXxCnt7qtk2E4pjJZYHCCzBrEAoW5HDtCc3LxUgfB34np9OrlZJqPxialiWz6rVZ7uLjIZVIWJc+Qj3X7NImyV8793gSrkbUU9QcwPr4UjXOQZC+GBhzOpriRpurs5nyqOjmX7CTA6NuaUSDEnP2dEQFhVT9cU3z+oJ84b7sYbKkfH7boAPH+/IGPPVk0RuSEzZzNqU0h0eFdVmfB X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: 2bba23f5-80a7-4aa1-3f88-08db7d5f0ddd 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:21.2581 (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: MfnDQLqK2Afkvlpkc1Py80Qa1cMeo8i9Ha23QHdoZaByx9JJ4oDDg4RzObigG+Des0t6rBGEYc5U4DLSOWwbTw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: PSAPR06MB3991 Precedence: bulk List-ID: X-Mailing-List: linux-i2c@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/i2c/busses/i2c-pnx.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/i2c/busses/i2c-pnx.c b/drivers/i2c/busses/i2c-pnx.c index 82400057f810..ecbbb60407c3 100644 --- a/drivers/i2c/busses/i2c-pnx.c +++ b/drivers/i2c/busses/i2c-pnx.c @@ -683,8 +683,7 @@ static int i2c_pnx_probe(struct platform_device *pdev) "%s", pdev->name); /* Register I/O resource */ - res = platform_get_resource(pdev, IORESOURCE_MEM, 0); - alg_data->ioaddr = devm_ioremap_resource(&pdev->dev, res); + alg_data->ioaddr = devm_platform_get_and_ioremap_resource(pdev, 0, &res); if (IS_ERR(alg_data->ioaddr)) return PTR_ERR(alg_data->ioaddr);