From patchwork Wed Jul 5 05:23:37 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: 699401 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 0CC4CEB64DD for ; Wed, 5 Jul 2023 05:24:05 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231189AbjGEFYE (ORCPT ); Wed, 5 Jul 2023 01:24:04 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49300 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229532AbjGEFYD (ORCPT ); Wed, 5 Jul 2023 01:24:03 -0400 Received: from APC01-TYZ-obe.outbound.protection.outlook.com (mail-tyzapc01on2110.outbound.protection.outlook.com [40.107.117.110]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A13FE1700; Tue, 4 Jul 2023 22:24:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=URJKIha+GVw4WIV++Oee7pivgRtuU7GwK6Gj1fftAH0IaNwQepXijPAo5T2XA1bISL/9IcG7kFlxBVzAkbS9XyzJ8eFZ2mKN8EBNxz4J7BFK0FqJgaNqFva7nM+d/1b3eY02ByKnv15MpcfNtVqcNuLyjdeOb2MsiMFBLJWi6BIHTQy2H1JmxVQ/mlhIC0/ou3/24BI0UEnKSkEsUCvTPWnzB40/Lo/5M46W704j4n1Ld+E4ZNn7vzrA+riCtDMXldMtVZH4kmIalB4Bd/UPCUyj7sgwsNEj9j5hOO1jJyRELdPF2g/6Dn565J4xM+wJ4itgKGvs7CLPbgk5mE84Jw== 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=6gsBsLSlyLAGNU+ieRv+h5DtghGL4ms/638mXxhszQU=; b=AvQ+zl0Jb4KdyC9vihCE8Zdz6SY9k/GNqUHAURfh5Ynwnj/WpzXAMi/o8m6Ypq1GvbVpX0xbrfGzZZ1T37Nn0M8VMlmaLHZEl1dcnuX9BACMhZp9Pe3ysctnsS/NyiDF3tmW3Iw1lDBFMHbW510enR+3XQWhCyKdt1rmCGsOmjSFjcr2g2X0RaO2zKHrxPpF057EjfxLoqLn6iZ52z8Wv6D7K3ysihOprSNeLFbmlVIcXzqrVrBqJif01CY3H8S/+mpWxx7Zvefwzd2rrzaMQtkOcXqwIZ8t4HLWM3G12c7GB8+IRDLjGy6QIvsOlWL/z3dB6C2PnEgk/ZW1RKPCMA== 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=6gsBsLSlyLAGNU+ieRv+h5DtghGL4ms/638mXxhszQU=; b=bAONTXQlHzi46dsVyUteTL1AuftsleW4DkUT+baZMIheD3NGqS1NzTarXWTbn5r00uiyQq3qiGm8IA83ADVu+BdIwM/GvCtwW1HVp+hvOOlmAae5IqnmFt0++eaNmCrs0dyNIqa4e0zFvHp0pgCLmr247a3n9nrmYrKWtW4U8tCBB3xcbujfZAqONXjDh6c8w6Bi8Jp6QhxQesjl/LX/qDigkH13MRcSuKnKoMaE0ZnFIcQDwAvJO6qXNdroOhVaj10ZSQJzvM1WZnIx+ffjsADzUCPpBtydEPVlfj86xmx/oruHeLTl/7rhVjQV1p4mhqcO+d5hVN4J0d/xV0AoiQ== 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 TYZPR06MB5123.apcprd06.prod.outlook.com (2603:1096:400:1c1::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6544.24; Wed, 5 Jul 2023 05:23:57 +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 05:23:57 +0000 From: Yangtao Li To: Dmitry Torokhov Cc: Yangtao Li , linux-input@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 01/10] Input: bcm-keypad - Convert to devm_platform_ioremap_resource() Date: Wed, 5 Jul 2023 13:23:37 +0800 Message-Id: <20230705052346.39337-1-frank.li@vivo.com> X-Mailer: git-send-email 2.39.0 X-ClientProxiedBy: SG2PR01CA0116.apcprd01.prod.exchangelabs.com (2603:1096:4:40::20) To SEZPR06MB5269.apcprd06.prod.outlook.com (2603:1096:101:78::6) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SEZPR06MB5269:EE_|TYZPR06MB5123:EE_ X-MS-Office365-Filtering-Correlation-Id: 94691827-443e-4271-0f0a-08db7d180810 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: BDrbCusCe7nquR/MhZb0ai67jJxuAuiWgNrgbYQnClxpxupRJJo9njtKX4lSQmB1HBuqezVLtm/PKuB2WmeYm22aCLJ95qOY5EW0TkZpYE3/2yL3V62it4C+JQI4O4IRR+F89VkW8+tUxsTQx1DEt3XWyqDd2U8KdYeM63rm1zFkxkW95mYNaHjxsWg1Ug0ghm8xvY9QptwVFisBYTZgRaluwVL8AU/Qr612YLZ+1eEr8PsrNNFgDVUOm5pAt8VfhM65JbodpVgm5z8KbtZDCGAivgTam2PPejEWNi3o+EvkG9jcVYKPrxlaNQN2yPO0mDD6EAgCdUEdwnHpXo1BV1cuPTsRAafq4Otg/4sNqY4Oiaa0Y7OVdiQGGZf0L5h3d5yAKap2xUHC8KZeJyaiTfjEwnfE2dXHq4Y010PC4QUkAh2sl+cV2NI8Xdk8eABlUjwWmwkjAjbJEr2Q2OPCSHx0Q43sDhat8b6zzYnf2FSBCT98csnpA87VBYOR2eVsfZH4nmmGrkDP9yGINXdvjnTo0tS9UUotu5Q0cUUtQi/FgYpYelWtwN/hp4v9wH+n4EMAB7cSaB7KE5dc3YozaawZcVVlecSD/dGBI7TP1qAW9kmAOhb/QSXf7pVAaIKH 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)(346002)(39850400004)(396003)(366004)(136003)(376002)(451199021)(41300700001)(38100700002)(6486002)(38350700002)(6666004)(83380400001)(1076003)(6506007)(2616005)(52116002)(186003)(26005)(6512007)(86362001)(478600001)(66476007)(316002)(2906002)(66556008)(4326008)(6916009)(66946007)(8936002)(8676002)(5660300002)(36756003); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: F099cZsxgEuhltfxLcss0JmIHCrkOfVzv0VAgWR2wrRNUpHI6SUejGX383Wymcadv4E4sTftYtK9TLWqi+nZ+8JwFEP48NskxhcPVehyG+F2WsWnSgQI0Gw/UxPZI77I6aXcjHbu1J6RqBC8kWg6EOMAIaANsarmy8RUcnL8tjobSEuDRC/r8EMc1MDZclIAW2zP/BDlzN8JSMZs6djLhlUzeeJxPoGZhYb7RRXYmRbJ53/p4FVw3LBwOCfohXe9A9BVT53YNp+hW2IVgAeq5d61Y3DXBcrP6gkN7QJxJejc6RZonPrImotxWCzdcfe5w2EpFzihnsbbPEN6z4KrLjLjOFil9Hf5zf909+Px5GsdjRwJwM12Uh8qJUHx8WNy/K0CpH8rthiepFok6Y7koFc4dK5kznt0lfWHsFTh1+iIt9AAorOP2zi9HCD8gf1y5Fd65AaUk7+DeCq7/bwyOlrh7POMpKMMFBdoKMwjPmcBUNe5w7zPPDrhzqTxqmcb0VUh3bFVdptBw27wv3CvMJATbR1jHLD5O0f0TTn1Ks/GqcjpHtkWq1LEQyx6kYrAtTW9M71usmGEPjr1KgEXMyy44GHS5aMHb+WKHHYTSwobE0j6SiKEz8VdFFkvFq4iejcG3NTb0bDqYo2kihHKIn3xJG+163XM3qBbJLY+ll4eLWskjuWFzdXQBtGCSgSTlsVMa3rvE+Z1qpe6QiG6xEk30kYF4OtfLZ0mfuYd7PgrjFWQts9Dgl0q7OKCkp2dDod5Et/VizJT0glzFX830U+MufSQyiQzwNBB+S096X2dloXLExihsbDNa6GIScRfDKr6lEg+UIf2vhLEizTKOxTJrAa/fAH0gNGd34HCu+P/tmfkFd4ePXw7Td55x/9iZuHxJGvTfTuJ4aTDKYcYtRfJ/UcYkvI2OvZ8qGGV15Xsd9fMuJl5vY4+mJqC6LDALJvT+RJTJh5c0OruPjX1NFJChVPtotHXfzRkk9jlUOQn66XUbsVOKNxDmyuc98gA/euLoZ4+vWiKPjB7ukrSWkSnfyNUomELn5bGyRg9A4yB/alrllJ8B2W7mK1XN5oRSlhZUWdYrevmZvUSPL3IHeVmiw3TGECKM1WwPnRbH/PwRZoGS+lDYDNQn9Ax4imS1ReWVvQ7qXVAY79ughKDoIhlDeYtToEE+DmjbTPN8V7WuPO7IDYkevuepHrk8XJj/SJc0jWR0BeAHsM1yzCOf91V9oLF9AQ8OO0ptXYT9Ng9F00iXEPhUW/kWQzzeMf4ps7NS7/44BEFimxIRIUlOekPIRYiONvzn4r2d8lNanoq33B8/T3JQ45tJexlAUFkhX9B8T7g49vu58mQtWArk9H6E2+Te6fo0Kaf2ZyT4Y6zuMVUMAUmrvFBNpsiMSsEZa0f44wmFdLz78lt69flxVXCUjaPtZI/6OI7wc/CLhgOtrgGb55FISWGTCQMA7yH7tzZVWX3EQ/QcXnkDyCf5oWU13De0XIYKOw3+jZRWkGkgJs/CPQ1GHy4kolX1WvIyLwGvmt+wuryYc9UDTo9PZh5hXwayzq2t2QtgnF7k3Kx9E/pb1pEHMYACULeG6Yc X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: 94691827-443e-4271-0f0a-08db7d180810 X-MS-Exchange-CrossTenant-AuthSource: SEZPR06MB5269.apcprd06.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 05 Jul 2023 05:23:57.4063 (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: 0dAM2FBhkLiEdnveg3wYO2gi8rBD6j3uBkG2RYj3xbpAtAqJc2S/42ijrW988gXqFULn1xhnQ+Fvij19laetSg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: TYZPR06MB5123 Precedence: bulk List-ID: X-Mailing-List: linux-input@vger.kernel.org Use devm_platform_ioremap_resource() to simplify code. Signed-off-by: Yangtao Li --- drivers/input/keyboard/bcm-keypad.c | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/drivers/input/keyboard/bcm-keypad.c b/drivers/input/keyboard/bcm-keypad.c index 56a919ec23b5..92e1fbb092b8 100644 --- a/drivers/input/keyboard/bcm-keypad.c +++ b/drivers/input/keyboard/bcm-keypad.c @@ -307,7 +307,6 @@ static int bcm_kp_probe(struct platform_device *pdev) { struct bcm_kp *kp; struct input_dev *input_dev; - struct resource *res; int error; kp = devm_kzalloc(&pdev->dev, sizeof(*kp), GFP_KERNEL); @@ -353,14 +352,7 @@ static int bcm_kp_probe(struct platform_device *pdev) return error; } - /* Get the KEYPAD base address */ - res = platform_get_resource(pdev, IORESOURCE_MEM, 0); - if (!res) { - dev_err(&pdev->dev, "Missing keypad base address resource\n"); - return -ENODEV; - } - - kp->base = devm_ioremap_resource(&pdev->dev, res); + kp->base = devm_platform_ioremap_resource(pdev, 0); if (IS_ERR(kp->base)) return PTR_ERR(kp->base); From patchwork Wed Jul 5 05:23:38 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: 699929 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 F074EC001DB for ; Wed, 5 Jul 2023 05:24:05 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231250AbjGEFYE (ORCPT ); Wed, 5 Jul 2023 01:24:04 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49306 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231130AbjGEFYD (ORCPT ); Wed, 5 Jul 2023 01:24:03 -0400 Received: from APC01-TYZ-obe.outbound.protection.outlook.com (mail-tyzapc01on2110.outbound.protection.outlook.com [40.107.117.110]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E710710E3; Tue, 4 Jul 2023 22:24:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=DyK8V4cHfZynFjTtzkpttyUswvuU5fhKAxcs0swuPaj33PW6G/Yn7VwPIuQaCzD1A8Ruv/Hy2sDubeeyUwayAdWuTVvUT0M6SbDZb/PJS/R7AGTfB3x99/bB4kRkWl1FbZgKZk0syh4XEe5X1yd/O0bkp+VjltVvdhGlUjuczSyjlyqnqIUMWU5nsgIsgtuxdJydumy9pmBcRFzrKq3Fs+4xbPrxz6CT9k3xG1ZPK/mHcuCPxtRipMfsyUVy6ZWQ1YvYWjyNHXPkc0/SK2rFH9fo30nEKkbj6dbA5yXAQtT8OJ9i0dPYkciGZ+ZkaMYqbCeqCS3ZNLoeHisIPslbBQ== 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=XPpuSsCI7Q2eXUj008fHD1fYS04V73KqpGD2e0H4Qqs=; b=fcPZ7s5tE3Ru0DkJPbhf/Yeg0D6vS5hrTzHK8m9Nl5RFY2UHbUs1dnlx0c2p94x18h9OVYkYRuKPhAI2OHPGc7KuX0vcQay27qDnPZMsREs/GOS2GCNJexpeL1yb+jwnnVYnJCG8LdbHlBFfuv2PhE3JMxgr9uPlY/V5RC/nMoGHYWI25FfoSVTwUdVuAdeMH4gqDHc6nCgpuX9R5q/B6cdlRn4q3q/TL/tlawnMQN3kzercXKeMTXYvzf8+6+/z74TMfWH25/az74HoARinLoHlCXXgjzhzhPO3mvDFOXh1icem8eFA9G8YmKf5MlErPstnjXKkvffQmT7U1p9K4w== 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=XPpuSsCI7Q2eXUj008fHD1fYS04V73KqpGD2e0H4Qqs=; b=UahRgxWALBqsDdVv3ynlQCdQ7xlkKsCuy4DKoB1TiNsIkgitcloCj3wk8MQEtl+6J5/peZ1SEp29iKbZoBqk8nxumBtcPDq5ui2o1G4pr8JxF2dGOUIxminuCN1iYr7QSIu+3MBu/l9w8ajo7ZwcFl5I7t2v/GNMbXd51FE5sJxeYdvcznrwxR9dPEp6xc1Z/+fwKPVpq5LjMthSZgK8cJdfq5rBHhrDc7dV6BYOE5lRt6VMAwO4C87TKFTr18MRkxJfXEhDJagtk+B8mfM7YhVu1uR2x5RqbDqFbRhEvxUrxXVYfhjp1Fp5gtCTft3bWds32NOLXdoDJJDmNcd54g== 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 TYZPR06MB5123.apcprd06.prod.outlook.com (2603:1096:400:1c1::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6544.24; Wed, 5 Jul 2023 05:23:59 +0000 Received: from SEZPR06MB5269.apcprd06.prod.outlook.com ([fe80::fa0e:6c06:7474:285c]) by SEZPR06MB5269.apcprd06.prod.outlook.com ([fe80::fa0e:6c06:7474:285c%5]) with mapi id 15.20.6565.016; Wed, 5 Jul 2023 05:23:59 +0000 From: Yangtao Li To: Dmitry Torokhov , Vladimir Zapolskiy Cc: Yangtao Li , linux-input@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH 02/10] Input: lpc32xx-keys - Convert to devm_platform_ioremap_resource() Date: Wed, 5 Jul 2023 13:23:38 +0800 Message-Id: <20230705052346.39337-2-frank.li@vivo.com> X-Mailer: git-send-email 2.39.0 In-Reply-To: <20230705052346.39337-1-frank.li@vivo.com> References: <20230705052346.39337-1-frank.li@vivo.com> X-ClientProxiedBy: SG2PR01CA0116.apcprd01.prod.exchangelabs.com (2603:1096:4:40::20) To SEZPR06MB5269.apcprd06.prod.outlook.com (2603:1096:101:78::6) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SEZPR06MB5269:EE_|TYZPR06MB5123:EE_ X-MS-Office365-Filtering-Correlation-Id: 9a89cc7e-d82a-4943-5111-08db7d180967 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: FhUARDHSo5lXlV43SXPdOozoc0U1jSk8DU6mQa55FZokiMwuD1DidvbXyQz/PS7FINg/0GjX2iMuvkrhzhakNPKXC8nAN+qrTwW1WSRLBUNaTtdWumoR+Sh2lzNplmwIe0WrcUvnTX/WB3sPWXqXI5g8fR7avl0HFdnffVYWIkTKL4HkFO2Hp6LiKR8Czj7bjhCilnClSo+wFJIJz5NXY/kpQon1ATshDZSew+9k7u6KZPM8HTR7VBv+qbtwZYf3IO6A6XOj6xj8ZntibJr/sNN89du7vwljU3oP89oWJjUuRQEPk7FXAzyn1O39Mp366qK0ZJJI8SlwR9GdwV7h6PvvyHt3G3pChLsPHlyyyF+KWl/wywIMjHFq1Yr1LZTS25irxeQufQoQc9xNhiWrCsMJR8tTTTbNbMfcKbbFqdTYxLbWVboWfoTBJUytSTe4cZ05RQejtQIxJJV3p511i11c5j88wCkURqs/XxSS08dsI8TtjakpvFhUWs8kARODEK+7LBw8I1C6zRStq/su5M7UIlhn69ZZsfOwMCtFFNtqIU7/1ZLeJcLkxYjwACqXiDqercLI0wM9gVpBTo8y2XMvvT6hjXoA1g7diFz5nHSBrkXQZqUQGs4z7CWT7yL1 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)(346002)(39850400004)(396003)(366004)(136003)(376002)(451199021)(41300700001)(38100700002)(6486002)(38350700002)(6666004)(83380400001)(1076003)(6506007)(2616005)(52116002)(186003)(26005)(6512007)(110136005)(86362001)(478600001)(66476007)(316002)(2906002)(66556008)(4326008)(66946007)(8936002)(8676002)(5660300002)(36756003); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: bZ/fqZbsZfjmjUn47Kl0J6UExQhZqvKfLxXmPGmJIl+6UFKihkL3ZEikCBCOTHFJO740PR2fmxQEzmpEE14M2ZP9LO/et0uqEEKjHmrU7VTO6rAOvqd8PJZJvJOSbrO4FJgi6hJl0iSTQjexQJIx1bkwaCQhLB28rfTghk10XEoDvccaGF15Adb1wXCDVcpcPHS94uoj2ZfI6lb7gz0HeBBAtYimOcODbUJyXUAZDqj1tjog3yq3Yhj9sEtbSQ72/FglyiqYHSkOrl885LGMPKDOK3O9MRiEL5nHsQGNTgWed8vqOZYXIJZLzq91SM4ljCu5KHuQoSQv1Xfz1j8qlkaeCm6NPPyWdm+/MxPT7Ura5j3pydaf+4ihkqmrlHXisFQKKKzJU1yEO+FjY1E9/Sq5CF5H/qyyD3UF2qp/UEEkhsrXCy2YdA8wG1dPpqq3T4Ils3mVfBaR1ZIGFG3MetZI/19CNhCx1yULXWpSTi2NwYSsiSap8DbrENWVu406PyuSW9A4QIsKxGH8cxXak6pDoPugI2B+WkhfRfBrwXvqLgHpekklxLSfmqZ+ADq6Owakmo+n0Clw6POu2A2TLctZ7GlbYsedhT1hCiv+XfWCsWbUwuQeEBgHH7RK32UJZEknfFxV8ZVPX2XU8As0NRuansjgSi0b2/1MUyyaWhy9CgXfoi3s4SjoXBODuhKYt3sSQh7Z+2fVuh/9c3SjW8AWmrEfypoQakzCrd8LH9dsFHnDahDKM/unGPhectcw0TSZMTNAgO3WSeSqrZjauK4uFXcWJVgvFzh7/kKrNIGLnmBI4eY769fUhVIsZ79dbLGfhpxbF4IJdTKLNsAjLh2UTmLbEXb/c6AZCQWMFJRFgSZI+408Yz68ZGzu6lW1N4MNx5QlXV+U4qay8iV1/4xLEsmydvKOTqy6VUtnzePhIGBvi+Jr2VnEAVK3mkzp5fIiRKe/d/VKF6qm+9Vshv5mADSB2z4S8BdKjdIgPpgPc+DwSJ2DSePkRO2qDRrVli0xxtH3YiZkSmQDeDYEthOWGy1UoZB/tkNPZgMYYquunpyZTk9X1kWgGF4Pau7wfRiMKxiB0xmHM69zggMeOH89LOH8MKFwDJC2dAK97sERWDnlAssmy3ByrBMhsdpxBJWqoco4Y4JlW9XfV6G7ME0Tm8LUTgZXCmIpHTkZxVgR3ivVbUPref3QSOI9zNqX1QAqs/LmTBUzjGNv7unX5a6H5QBM7w+cqAC9woM5cuYMyZXx/5TcpOWFr8GoLdfG2L+LZhVR/j3POqAYLCuV8YU9+Zesn+LUy9KVcgGvkB+g81AawUKUGuPsyWTTi20qGggwNS1CHoowcehpDowKbtyiktcPdRqlTNvvxRzH0vx1B7NORmpImLRjvUhtSVIQv/bk8TOrZHiHLXLhRu+8jcd4hrqpTyaQAhQExx7jqdmG1ZaftPS9MfzHfNBOaF/3dFMGvsvESMmJ7yb8ODt6KyGpT+HrMhQdC+kUtSomCKWvwTji3WWLNH2cPWeMs9Wmw5j4cv7O1BMCKt1F1E0vYsEBqsrnOUl9jTS0yKkKMwNYvx9ckpAR7UxHIw8yy79N X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: 9a89cc7e-d82a-4943-5111-08db7d180967 X-MS-Exchange-CrossTenant-AuthSource: SEZPR06MB5269.apcprd06.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 05 Jul 2023 05:23:59.6414 (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: KZ/LGX7n8xXyzJQWDT6KJYwmjdhY0ed4qdsraTkTRIi0k90Xzx2i+8SJJd86IFFElEXKD8giu3gLssGNBoqnmA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: TYZPR06MB5123 Precedence: bulk List-ID: X-Mailing-List: linux-input@vger.kernel.org Use devm_platform_ioremap_resource() to simplify code. Signed-off-by: Yangtao Li --- drivers/input/keyboard/lpc32xx-keys.c | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/drivers/input/keyboard/lpc32xx-keys.c b/drivers/input/keyboard/lpc32xx-keys.c index 911e1181cd6f..322a87807159 100644 --- a/drivers/input/keyboard/lpc32xx-keys.c +++ b/drivers/input/keyboard/lpc32xx-keys.c @@ -160,17 +160,10 @@ static int lpc32xx_kscan_probe(struct platform_device *pdev) { struct lpc32xx_kscan_drv *kscandat; struct input_dev *input; - struct resource *res; size_t keymap_size; int error; int irq; - res = platform_get_resource(pdev, IORESOURCE_MEM, 0); - if (!res) { - dev_err(&pdev->dev, "failed to get platform I/O memory\n"); - return -EINVAL; - } - irq = platform_get_irq(pdev, 0); if (irq < 0) return -EINVAL; @@ -221,7 +214,7 @@ static int lpc32xx_kscan_probe(struct platform_device *pdev) input_set_drvdata(kscandat->input, kscandat); - kscandat->kscan_base = devm_ioremap_resource(&pdev->dev, res); + kscandat->kscan_base = devm_platform_ioremap_resource(pdev, 0); if (IS_ERR(kscandat->kscan_base)) return PTR_ERR(kscandat->kscan_base); From patchwork Wed Jul 5 05:23:39 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?b?5p2O5oms6Z+s?= X-Patchwork-Id: 699400 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 53E17C001DD for ; Wed, 5 Jul 2023 05:24:08 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231280AbjGEFYG (ORCPT ); Wed, 5 Jul 2023 01:24:06 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49312 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229532AbjGEFYF (ORCPT ); Wed, 5 Jul 2023 01:24:05 -0400 Received: from APC01-TYZ-obe.outbound.protection.outlook.com (mail-tyzapc01on2110.outbound.protection.outlook.com [40.107.117.110]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E9A1E1700; Tue, 4 Jul 2023 22:24:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=XWigmFrhqwh7cjkmBuFcyk+6Bzrq0duxfTkP9OCenLx+a+s5sT++jPBbgvYncGgHq74zAoKMQ1OU7Zc2bgapjUJrw49YZQJdr3XNPE11m1KaAGOF8bzAF6gtNJnBj/f6WssZa/dRsVQLpMpr6JnhUdMU1iUmZY/U3j/FO2GYNjY/CZ31ymhCSIhsdZ3tfB0C+xJeMr1NIjUPA5EjIwOyRtqSA+/nelBd+vX0zGWYI2SjZn23PU+KYUMS9du1Sh/BIYeuUvRAFpvK1fO0cdAQkbYZtgPEkA+d3p9hExQbdhp6DkTqCxjfGJEoKWuHb5OFtz8QknyQ519auRnUKfJ9yQ== 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=Lk2AKkndr4xVIgjkxE6GygsSeSc8HTsTo+fP9eBki/g=; b=byR0GNwKh+getHC4S5f9Qzuvri1vGJumyakxZ8wlTyatfK5mtRaXHmJOhAUfIdtveAVxbM2xtOt6kR8HXKlK2njcNAkn9XFc0ZvLBXHyUK/J/bVLx8kRqF2FvC0eYMxTTm+j8eTx0GatuPkVPO59mNrhZ/Bte3Li/n1cLkastrC+1Ki8rFg78MeQl14Jr9An691T0CppSRg3K1NFfC4za4dDAXpj1LPDJ10MM2m7bFLgOadN+FKPQliMAgDl886DhSxoB8j9uNrDY2ujkBFGBD6umr6qiSIykIsMf/mmgw/pE2J9xVJ0kEl0DUB9vnpC51CO64GOrMGckzO/EsY+1Q== 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=Lk2AKkndr4xVIgjkxE6GygsSeSc8HTsTo+fP9eBki/g=; b=gBlKIeitfRknyjythltKFO83dKRCJ335q0UzWp86PHshjjJ8vDcFBozFUx+3gfIHROcjF+ELIE3z+798k/2KUROJ/E6eC70swFnNyh10baBudjyZLiXWmkzwlVbKR1Jl49JEhgGLjcjCNF1y0/IuwXPT2F10LwhEnfToG8/W1I4soAAcPzvXlGPcVoP6jeF677f1rtlLY4/J1rOuvPSz/Ef2tzKjOuR2RReTS4Yn/SC+5lTmeeRQIi9EDaYBQWhaIOEIRhCuycis39yw8kmtU6KjcWOAU4Q2wanjP8OMBt/XnqujYIB5SKKmSi0LNPudPGP1/yWtwg2c1ay2pxWFBw== 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 TYZPR06MB5123.apcprd06.prod.outlook.com (2603:1096:400:1c1::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6544.24; Wed, 5 Jul 2023 05:24:01 +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 05:24:01 +0000 From: Yangtao Li To: Dmitry Torokhov Cc: Yangtao Li , linux-input@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 03/10] Input: nspire-keypad - Use devm_platform_get_and_ioremap_resource() Date: Wed, 5 Jul 2023 13:23:39 +0800 Message-Id: <20230705052346.39337-3-frank.li@vivo.com> X-Mailer: git-send-email 2.39.0 In-Reply-To: <20230705052346.39337-1-frank.li@vivo.com> References: <20230705052346.39337-1-frank.li@vivo.com> X-ClientProxiedBy: SG2PR01CA0116.apcprd01.prod.exchangelabs.com (2603:1096:4:40::20) To SEZPR06MB5269.apcprd06.prod.outlook.com (2603:1096:101:78::6) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SEZPR06MB5269:EE_|TYZPR06MB5123:EE_ X-MS-Office365-Filtering-Correlation-Id: 2e62a5ea-f3f9-48e0-5d69-08db7d180a85 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: cTdiyCi8IhgV6dRrj7SfQzEjIIj2sucdOhMHrPcU/BhtzIUJOnuD5/wnI9f4cJO+JT0wly/MrMWJGpbxU2pcPdaDjwxtSS0LPR3YsRWIp5ajzfKkBN2OM64wrWLeaVIneA2Q5KnQtTKcJlRb7VhDz8OEIhb2A0RBYIqiVbp6qng9GRjskbwnvv+ws6M22iSYW5izXMn/LnKLBtqj4Z3xvy40qOd4CCnCX2hUSo4hCmL+fkFp8sPhUWssxNWWTiKmD0vsK+tQLU0MfAq7mdK8pq00hvj405RvPwRYD2+ULyKoL9HbAxUYwNMDuDOQjpWoVcacKyfqr+mIqYOwL1lO11tCd3TYuNjJwM7zn3nFIS6Wag7AmKZjLvyxtfAhHfR6bOp1Wpt8nbyp33LJg50X2n8o2fSv5uMiyYU4sJrcE5CAkB2SA2EBmZzs7DRhq0b8yrap3DSWOp8ruWRcgJUeIoiGp7ZYQVFOXYH1Qn7RofwO37+mmyFk95oZzt4vZWE7f5aLXX1KDk6XZYpe78iHor5mv7SYDsmW44uWzCysUNXkPkBy2LPds7uiUrwjUHr+Hjwoe3AeeWK2BtoEZ7v9wNMEUbPmxLxB8uHFmc7nX4NoHnCMANw8xAMtdJuW2Fbl 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)(346002)(39850400004)(396003)(366004)(136003)(376002)(451199021)(41300700001)(4744005)(38100700002)(6486002)(38350700002)(6666004)(83380400001)(1076003)(6506007)(2616005)(52116002)(186003)(26005)(6512007)(86362001)(478600001)(66476007)(316002)(2906002)(66556008)(4326008)(6916009)(66946007)(8936002)(8676002)(5660300002)(36756003); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: xdC4ohUtaH6Ilm/0t+A7BF2oAXBpJtn0ABsLHORi3lZdMPqz+MwajHDRTefLTmKJB5AlzL1fmrPmP8r0IMxfm6J2NVl2xhzEC0ZyVK0m1kfJKeoNjbnMU2joffTR9ZA0uQ881dAbqlGFAZzoZezldVAS/dL+mgVh8gUGBt8C0EP/Fx8EfS7ZQlidc60uLLfqnsp5RBlUDa1juFXMcZUG1l0vfX9mxxuHJZ+8vp7teGcb0F2TgfrrT1pjHlvEMHUdn4GEq90MasBfv/ySAJXpTa+b0MtEZKJ0iMSXIVRhAybPpQ7+zs4MwfHKap+hzDQxle8lKL/hpu/OxZ0Bc1m6aiCNzEX5AbhUXjv1s5h2a50wbohNeTih704FLjV9C5lIYnibpZkCbYXh/4rfzUYHByhQrNO0lkWYIZOR9UyLO8oV0JO8HnYh+Drop9hyB5TKpaici/2PSUGZFhdV5Npgv3BqKoNVtkWoiMQoBWV/BxmMrk8TbQ/DS8aKTXqCMXpZvTVEG/TnyCxSHKvlP/RobHG99Wi2tZBHJ2DMiC1bfcxlGYhj7NzcejJXtV0v6QvZ34/TPST2CUWfmmtY+Fu1K4TYIL3h6w1k2vQ2NFY3ojGGm6sExAf2CiXKxPmsgOcCk/35m3FEKcRI4hvWAAyrdUfI2yhvfxusDUMJ1rjeIzDpY/QESX1LsMGbvBsYPsoHKtbsJDKA50xuIt+Vzw1L1by49PVeTQvR87D5r3B3y2XA/DEh6ZhxlXNksBrv/bASKYZOyM5Na92G/WOJBCv5wIbTrESkbavIbFAQMzQSR4FE9Mzw2hvUH2yxmseRus9hRUARxxka1JY4Ewllft4XRtOHksddaBZCwi6nSVfNQApijkVMfUJhgmy9gqHMIsDkjmyf1VN23f8xsgggwackJ+iliXhaB+IXpuTww4Zaym6bBI36fJHlUSles0DiHoSKoi6x4/xqttFm4/lvqaJh4aqnC1A/7Y6XrXFIJDMYcEmOrtLXiCpFvtHcxN6F+2PfUp87aS+/bVCPFi5nyUEGsaCjxggzMHTI2IKEltlkqFN2/EQsvdS94hJaIRfXMpy3Yspt26vtSKFvC7Wn+63HXMqVkBNBARX/9CeiTQOkoo8dvqhLqwOJFg6EO+s5ae2yIJBr/gH+Qyi5Ou1q+rjwUaBrPgX8ClRfzxDmsRe6hyZijagbQY6oWXo08XfWvIIn0hNbHDAB+t7Dm/2F9h1mcGoN6s+R8cIPJxq99PcF0lClXDGlmVuiFH9fh0ZdcZ3cDOUkAsMdKWRF/R0WrBTbprSrR3ippXYXVyWZHkf3SHxIVt/WGYpm/X4kquFXrMdr1ZK3xYe7pawOoxETLc1l8INgKcnQvWWxYmEU2HqmkT+E6eBBX/Hz6GStszymT3eUv56VU6+dAvxi0RuW+tqd6XPD2cphadwi4Ldsfoy6zfVhimmxBcPeiywtJMT63c3m1cUjDYLyjIM4ubguFGeBze/vmxQ9XMzWQGKTPtoDlO7uXvLv9B0EzWTWM+W7KygHAQl8mIAr9WJTpuQ0HWST2evwIjJXmqZfHdKLPIPdHEn1V1k3kSCgjeGx0zzhrltz X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: 2e62a5ea-f3f9-48e0-5d69-08db7d180a85 X-MS-Exchange-CrossTenant-AuthSource: SEZPR06MB5269.apcprd06.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 05 Jul 2023 05:24:01.4782 (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: JXtqjr+IdRWQxNp7TIQdLyoiqtJov8PRwx6IgGS7fuR3EdbvPxu767R8TIxdm8cRvf8QXwEFTX+GcpXGws8BvQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: TYZPR06MB5123 Precedence: bulk List-ID: X-Mailing-List: linux-input@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/input/keyboard/nspire-keypad.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/input/keyboard/nspire-keypad.c b/drivers/input/keyboard/nspire-keypad.c index e9fa1423f136..096c18d7bca1 100644 --- a/drivers/input/keyboard/nspire-keypad.c +++ b/drivers/input/keyboard/nspire-keypad.c @@ -186,8 +186,7 @@ static int nspire_keypad_probe(struct platform_device *pdev) return PTR_ERR(keypad->clk); } - res = platform_get_resource(pdev, IORESOURCE_MEM, 0); - keypad->reg_base = devm_ioremap_resource(&pdev->dev, res); + keypad->reg_base = devm_platform_get_and_ioremap_resource(pdev, 0, &res); if (IS_ERR(keypad->reg_base)) return PTR_ERR(keypad->reg_base); From patchwork Wed Jul 5 05:23:40 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: 699928 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 59560C001DB for ; Wed, 5 Jul 2023 05:24:14 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231334AbjGEFYN (ORCPT ); Wed, 5 Jul 2023 01:24:13 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49318 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231272AbjGEFYG (ORCPT ); Wed, 5 Jul 2023 01:24:06 -0400 Received: from APC01-TYZ-obe.outbound.protection.outlook.com (mail-tyzapc01on2110.outbound.protection.outlook.com [40.107.117.110]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8DC8810E3; Tue, 4 Jul 2023 22:24:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=FVI3A56bdEOspNeGzZp6qGRRyuu+RBko+KZOAXypINtRyQY3OFx/a51X8HOg0hwE1uph1ctiGkyKPqppbxrYx2ajto1p1/LBC+R6RH9qi2IV46pZCYazDF+DmR3cPe8AF0w877X5NTFfIVhV6fCM2xlUnlTe0rclVW0TH7mpPiPR7ozEcQ7xqebvrr9haaKCNMoJw2dF4vm4xYm1pu1A1H6c93SS8twGHMhEHYFUL4JFdhSztAdt5zgd7gyzndMvVo8mugy52Pk/lq8WXjmqCz7svlZfHZbYfSJOAka+VXFe2jimpGqJdjtmXujfWwxev5zYpaPF+qhMd8nshMoZgw== 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=CqIvxRCY7UWU70MClQClduwmQVt92UZpYY6fX1yYh7w=; b=nO18jm001wGTlhnrA+juN6SHa/Ouu4zL3JIx9/E33j+DJk3i7tSZJy6aKRTy/uErOEOVRRgylRdK2Mr7rZNg/A/byJp9T/jKMpla1w8+W7XxE2KetamhmINLvP6owusjmq4+qPhaoyv7Lwwm9BflMb7ZAArbBj8mV+/bfyv/vkDIrJ6/xoERq2VUW1c5eWy4Oqy5KqYj7x5Y1e4uL+Wuo4UIRx6UJeDEQZ29Z0z4NVsVRQlsm1sytlvzvENN6kK+nRu70e2Drnq8fJVmAF4X5CFMtUgQr6tavIhMdGNuU+HoKL2kM0WpYfJPLY5p82SA4dHtVHDvPXKW2IvwVXi/Sg== 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=CqIvxRCY7UWU70MClQClduwmQVt92UZpYY6fX1yYh7w=; b=C0RVi1KQM6x47Fu3hTJoIPlfDDakNOO/E4PojGhKsF77vMe3vxao3QSMVKWuYIEWrFSCVoS3YWwQ3fHAXVX1BVFvNIjkcPGSSsukpMKTDQbzb3VLnyfLG5jyB/+/FfcN0ncdeI5a2bPbRt8GnF3EsIdv0nVpTLw+EmX+e/OvB9vfntdIn/oI3vd9dTybeanXjGUQNXgHar52ZqxSI//uxrbYaXd+z1lj0mleiBXDnjPYNJbrsxMrdfo58ckPp1k2NaWpEQB3Bqn/T/znxnBgmRKzWqnt0wsD6UdHk4oyJPO+94w0xPh+1YWOao3DCdcVqirc5EXQwud0/dI0UvIO2A== 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 TYZPR06MB5123.apcprd06.prod.outlook.com (2603:1096:400:1c1::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6544.24; Wed, 5 Jul 2023 05:24:03 +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 05:24:03 +0000 From: Yangtao Li To: Dmitry Torokhov Cc: Yangtao Li , linux-input@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 04/10] Input: omap4-keyad - Convert to devm_platform_ioremap_resource() Date: Wed, 5 Jul 2023 13:23:40 +0800 Message-Id: <20230705052346.39337-4-frank.li@vivo.com> X-Mailer: git-send-email 2.39.0 In-Reply-To: <20230705052346.39337-1-frank.li@vivo.com> References: <20230705052346.39337-1-frank.li@vivo.com> X-ClientProxiedBy: SG2PR01CA0116.apcprd01.prod.exchangelabs.com (2603:1096:4:40::20) To SEZPR06MB5269.apcprd06.prod.outlook.com (2603:1096:101:78::6) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SEZPR06MB5269:EE_|TYZPR06MB5123:EE_ X-MS-Office365-Filtering-Correlation-Id: 3a302b17-c60d-4147-c926-08db7d180bc4 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: wgNrhXh5gq5yw4BmENOEdsB2DER9my0YjC4gZE/yNFkrhhKgDGLt0IsIsdYIjn6QbNCJ4tf7l8IkhQFn5SSpPnqrwC3tLxluBj459xyfShZ1a+3tizhg7RuvlFwWt2MEOboZczQNZOGdEdfP6Og60T7hrM+2UjnAFXEPOdP+5j05Qp/en9BG/HnYrBzogjxn2zf/MzAuf0MBKpmJP6AtB1E7kypbhs583dNInuspwORAwxA+yy0bjApa93b+i+t1qm051uNMEhvJ/lLvAxbx/0bvVTueWRY9Gw9loVf1cLC+dChMDufgBpLsPIB57DarjxYqrJl5BcIhfM6T6V8TpPFKWE4WL7KaQ6yKkjNs8pfODu/VsdhmgnJLnCtYngTnyiuUzOut/XnyUzxfK59cDUWxKsfWsSXma48pk7UM3ZC/0IPDj6iyCSU7MJBmldD+f+7ksIjBbRD6iJyW/fpjf1LGEMkMx1rAxfcq+1q8Vu1H130xtuXxqfQ/hP5fJUm5kl28yc/G9l7my97uEjCjIF3AWIe06/EVEVTLvl8yDvUEpX9KyazJpVl5Z9UOgYyIdsy8beb4aZQjLcxRXCXskj0XL55gdn3WqUyrAg69UvPth0aNwTYRabZ/9ixqgCcb 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)(346002)(39850400004)(396003)(366004)(136003)(376002)(451199021)(41300700001)(38100700002)(6486002)(38350700002)(6666004)(83380400001)(1076003)(6506007)(2616005)(52116002)(186003)(26005)(6512007)(86362001)(478600001)(66476007)(316002)(2906002)(66556008)(4326008)(6916009)(66946007)(8936002)(8676002)(5660300002)(36756003); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: r7ubGH41LHe+Q8dsDJslC4vhTjvDGtYu7mWGx1B71HyDUdUyqi8N9pZDuvh85KsgWEnWniYTZ55Paz4kcEsxdtxVzL6B/tjhzABPDXhwNqbQPyvSBw6H7skIV4E61PwwrBlOiv8kQiNvJviO6ppDodjfJdELLdAkK5UauCzhnXcknL9duy0v1RaUIK2w8FHQxhFAP+EZ6jFp/KT7xqNqSP7zbYjB3Blgk/tekkhR5Wi7aLVqqIpb/weUTuo3OqCnw2elDMhWn8nNnblM5IPlxxZDw2PemJIDFTLLfLU/VRO1HyZS4beqpdmtcSvmhtzk4pYnXQ+lQ4/uXFO1GEIPioz+iTaOa/3xonFBxUgF7I3D+P8cfRpRPFAXA6/xqsqvXgKzvSAC4aOFgdKpN/fhUrUhLHtCDpvr9Vi/daKIQdhKizUUnGU5zTDSqq4wnRQzaQzkSpSC4YCSZgvR/3tAz9nBGRNcMCox0pt4P8KrffTzyqEwpOOvblEiNEH2YWBtmVPj87LuLlfhTMa3P/zwWXCrSbVc08KBOLa5IEZSEJFE0UbAlDi6OFAzt7cYH+V5JaFpoPvpHztPN5F2pPxky5YwjKK1yumstobFyxzrMIA3uqVvT68BTD62lOD7GO7QXqsonjKzbqvY8ERSPcT2OkziQVFSyXBDNatE2H/9RYuAUMxFBd2FupLdkXO5Mn8CeQLoDuqYnUupYZuoHnkLaFBiPR5Y1FpoANus3M/6+Doq08X4vk+8ZbHmRGX86oiFgCusb+3/ZgrC3k8sj7p2LEDJhfVNDpu+vt9YSyPVNT8qC3ow/wYpPbM4nbX1gewKBHbUdnQ3pZgke5clEwZZ1qbUk445XgOQAQeGF1DudzXDuoA8YhVvVqCowu+vxRCGdXiA0EgFdxZ6BQOb2dAcLvpSmMG5qGksHPdqTBemynbURMGrt/ShuJofFFlMqCJUerVIp/qvc0nLIFPpEap1tcO3Y9lDki3JhzxvpcSoI63NqogPju1ppkHV0mQql0lmNg5voykG9zEK23m16VxFqmBwYFkENW8eNluCc16TksokypvllH5Fsn8eqqm1178qNPmwlWNsfQifrGkBJjUYBRd5aJ4TpooV0zWk16jqkEKIzCF+tOZ08aYQ9oEVq0p+mSt9RVk1tRJTBuWhsK8ZfDoSePLFkVJrzEIrmR1nrx/gOAKf9umugmi5DZkr/7ilG35IN5vygnmMcijVoa/i7BpBWB2UceXFYjOVkYl3Yi7KsqIgSetQW/albXWyuoZcRPV+9Sh29qy2H1kRVNlWc5CrUhbyOucbsvZEAYfykd9AWgwbEAl+A2Ti6oZgb/9prOqG16Izh4bhHR4BxmvrxUzh8rvveNBRVatvGjnunIPPCVa88gAapDhJfeaK0Qt2XEGnp5rNFn3eb/FrdYo2WwHEIGMYs9dz+oeayy2FfOu+6UavmSBba1ki9XGE+/CqeQ2Qhf9dlUG56pij1HPmdRefp4GpIsv9IpAPTbhMIAMQf9qyrog0tSMao/OU9xDyxvPpNAZHogn8b8Q8g7szzFBR6q4Cl+xKtYjBsejQa4XRh8sfTU6rx9VdOZRzS/kQ X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: 3a302b17-c60d-4147-c926-08db7d180bc4 X-MS-Exchange-CrossTenant-AuthSource: SEZPR06MB5269.apcprd06.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 05 Jul 2023 05:24:03.5431 (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: DHrkNbAsIx8iDeEwmzxgoJA5FyGM1mkm8H0yAgg6jKZfW0R6vCn2LgkzQduUTyf12yvDy9K8p8McfiyAhZ5ujQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: TYZPR06MB5123 Precedence: bulk List-ID: X-Mailing-List: linux-input@vger.kernel.org Use devm_platform_ioremap_resource() to simplify code. Signed-off-by: Yangtao Li --- drivers/input/keyboard/omap4-keypad.c | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/drivers/input/keyboard/omap4-keypad.c b/drivers/input/keyboard/omap4-keypad.c index 9f085d5679db..773e55eed88b 100644 --- a/drivers/input/keyboard/omap4-keypad.c +++ b/drivers/input/keyboard/omap4-keypad.c @@ -341,17 +341,10 @@ static int omap4_keypad_probe(struct platform_device *pdev) struct device *dev = &pdev->dev; struct omap4_keypad *keypad_data; struct input_dev *input_dev; - struct resource *res; unsigned int max_keys; int irq; int error; - res = platform_get_resource(pdev, IORESOURCE_MEM, 0); - if (!res) { - dev_err(&pdev->dev, "no base address specified\n"); - return -EINVAL; - } - irq = platform_get_irq(pdev, 0); if (irq < 0) return irq; @@ -370,7 +363,7 @@ static int omap4_keypad_probe(struct platform_device *pdev) if (error) return error; - keypad_data->base = devm_ioremap_resource(dev, res); + keypad_data->base = devm_platform_ioremap_resource(pdev, 0); if (IS_ERR(keypad_data->base)) return PTR_ERR(keypad_data->base); From patchwork Wed Jul 5 05:23:41 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: 699399 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 67D31C001DD for ; Wed, 5 Jul 2023 05:24:16 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231296AbjGEFYO (ORCPT ); Wed, 5 Jul 2023 01:24:14 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49332 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231281AbjGEFYH (ORCPT ); Wed, 5 Jul 2023 01:24:07 -0400 Received: from APC01-TYZ-obe.outbound.protection.outlook.com (mail-tyzapc01on2110.outbound.protection.outlook.com [40.107.117.110]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7F75D1700; Tue, 4 Jul 2023 22:24:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=OMCL5+zVbIbpUkG9z5yRyVajCPWZOpCXraRX/rnG+fHO/C/68GkprpXuoahApE7uTWSk76lVBMPzHy0Kgper589Wh6m8R0LXviVpTpgAv9qRwAottaatn9shwItH0QUGlwy+pEIgpvLdKTBhScyqArS/mETohBzzn+7jQ+JpqGsFEuVxqGDRlwmFP9jVKyWLjhsj7k1TTREFDO/Qn66lMuLGwzagdsCx6HIkchrEM+U4P97lFSSUahj+hncsYdyw2KqZILBBJy3MBpA3r5tXzJgfOIPCBVKu3o6dTmckz/zaZyGIG2IUSlBXCubFTh3bH8iy86KD/Alo8rCJwOzX7Q== 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=elem+0WDlBD3WyqlAui0kZiD8s+krn1DbKQivdHJZE8=; b=Tfhv9L9A7RK9W7V6bM1kKjcztKSHWPG+yf16u+vS8zfaAC5aabHyBriEZhGl1h4CuXu0k0DYNOEXP2OrwmVB8FeLO/qgphOKHfNE7ZnJ9LfgkHcJjNA80h+TDXsukwziXRv9ddOCUgIpZ1iHYGn8LUEl+w6W/LVUpg2kzup1tcOLI+E3XrIqyWPs9+64zCvqfANkIubXdMqNshZsvTGHXV8f5zYLvofZSWxvqcf6zmNp7HvOeVpJ/4akFHb+r6YsKc2Uiddv+H1UhtvyPVEjeOEqoVrvT51MBtw18q2CcPQIX6khDm/tWegU/7wLQmpVY3/BNIqWyZxvb6jjnuQPhA== 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=elem+0WDlBD3WyqlAui0kZiD8s+krn1DbKQivdHJZE8=; b=O8/5PcI46P6/IEoKEP14Nbsp2kzDlTnpvXaHXzHxJkMGbOQ0h6zbfRno98aHo1mC18YRNtagBEL0QxmKpj7CZJ7USdL7R0exmMhBzOPblVSjk/bJBIvrgGHROEzBE0UyfDbxqzdtR3ek8arm5Y0X3f2bXnZa9VKYfdsqkBs8Hb1xLPEU8QY1ircRGWMhKno5fBHndzuPUyWs1Kb+tE/F4qyfP6NVcRnimADdaOoNeZqZLWZTOaTj/sN1QA1ea/vY0Qa1w6ic5j7ZKOKWGOv8FPShSoTux8R6UbSxpphzxnI109bJxztk8krAas3uYtVPsMXw9VsIuGBlXO8US3eoaA== 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 TYZPR06MB5123.apcprd06.prod.outlook.com (2603:1096:400:1c1::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6544.24; Wed, 5 Jul 2023 05:24:05 +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 05:24:05 +0000 From: Yangtao Li To: Dmitry Torokhov Cc: Yangtao Li , linux-input@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 05/10] Input: opencores-kbd - Convert to devm_platform_ioremap_resource() Date: Wed, 5 Jul 2023 13:23:41 +0800 Message-Id: <20230705052346.39337-5-frank.li@vivo.com> X-Mailer: git-send-email 2.39.0 In-Reply-To: <20230705052346.39337-1-frank.li@vivo.com> References: <20230705052346.39337-1-frank.li@vivo.com> X-ClientProxiedBy: SG2PR01CA0116.apcprd01.prod.exchangelabs.com (2603:1096:4:40::20) To SEZPR06MB5269.apcprd06.prod.outlook.com (2603:1096:101:78::6) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SEZPR06MB5269:EE_|TYZPR06MB5123:EE_ X-MS-Office365-Filtering-Correlation-Id: f97ab19f-1090-4817-d868-08db7d180cc3 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: VBvSoGX4Q/iUKkYtFQb4cxQTNeUScQStDtL98oAnCkV9Du1mCsV1ucCo6TXb7jAzbKUZ6va7BoataQ+/neTdxH7e6Vr7gABK/tRL6nPi+caftaMSsKd4xmp/q0DJEtYEPOuq8qFdsbtYS86B07OM/h9WBTL910UeQ92+YQetcmujmfgiTjBT0t5Qa+M5Q73jm55wfEFKs0LvAnQxtXF2mamVJDvAyncUcazpu9lDuZVY3fRBKgqXVpzdmgXKRziYG3Lp3y5gYBGo3F/7ajKgGW4HGUjNc/cGuzee5gzW9BPIHFGuhCbpFgBd6XTKIRmeawyJT6EqAsX/c2aQkd/KvfHY1xHejU40iFkKxXTq3VyrbCsHYvM1CRt1yDUD4G+TBbCstELzRPmfflkqIrKaDgM6XdTA4LIgYh5YNVd1xfLVPfo9qgZZnd7UFyY25B4p+1He44SwgJbKtZIFuY5wQXtzdfoLEcIgy/49MkHxftMwEk991XI99hbNQPqUZIxotqS2KmR8JcFr2RmssAKXUipCAEBFGbMmGLwqkjiMrCft/4u4FICCm//ostfekiOUWxf+Jt+672XOh9+/t/rQJPFHf8KcdzHimpsf+ht9nJoXVIeT6/Qag2YNEOXmiMIN 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)(346002)(39850400004)(396003)(366004)(136003)(376002)(451199021)(41300700001)(38100700002)(6486002)(38350700002)(6666004)(83380400001)(1076003)(6506007)(2616005)(52116002)(186003)(26005)(6512007)(86362001)(478600001)(66476007)(316002)(2906002)(66556008)(4326008)(6916009)(66946007)(8936002)(8676002)(5660300002)(36756003); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: HZ4CKHvVB3KCalucto0rwFGNDWqE91ZULzrhphCt3wRfRPoydddbjrmpAzoxA+XdlJHFpC/h+r/UnytgBrQVoFSNE3Q6SiNFulgSUGID/4LH16JS0GCaerdChtMbTLVQ1nuRHEUSH1bzqrkXNDhWWuaXpib9aX70LW6HJ89xIPYW9u6pJ+Wf3KPNor9jJNLvcztDA3+4rh8EJYLOnWCbD0P70zQJXPaLNm1a0DzoePwxl9jOiTH7gWJzL4MNgtsNa/mV/i4dXrQw2fMx2YWrwBcFnG5B9xp5yrKEyRauVtxIGvYNavM37YbNlTgko4HC8yHBYkmQaikcmDP6kr1wjraVvqSPP7SXsBMuBcQfb13BBnwV14rQ+7h/fk6IlLDmUrtVC39LRXEbIdblnHJiuee8EeN3ZZ/5rxWD/2yx1K8Cq+iXdbXnRVA36wsJMwAKNJKiITUsaoO+W9QHneDiW7xa8aLTOOrOxkBYNoSBmPbxdPhQsEKcr255d5eBD2dj1e2AVAlViLVLGPyDuSFfxfrTIHEzh1gvTbADonUcCTyIA2XD4nh0Euu86KQiA2pL65kpLVJTPzr4pLYttj0dBIFeedehFGf3JygvFG7eaB0MRdcOW9c2PqdLW82tiJTlR55HjkeWRoUQ9R3sw+qkvNGFUdNT0mUsnNV8XiHLuF2egEG9auYew3894a4lkrhclRlSFi0vmUJYlmmMlMmnWFAZU/hIOha9zYq9OaR8vqgJu3w9wJ/u4R7PVQ+Fj4Ay03qJE+kwyDMtwtweo+cXXKUgvY91z2OQcNXi9HZIgCqXxz2tBWR/z+HdRJr6vJhunFXI9nvXWITLA5oMUq6u9kO/i4y5YUKA3cmBrbkUBsu3giqqhlLaT6+hHWavI1ddxCxLBV6sIdBYGT4fXChkHVs6FtyahpmWElOADQkk3DyA6DpwkGB4UsEmLWl4hDAODbJVjPbYGBKuuKxxgDLv8zOUjX0K0sak01t6Ouu7fgGZ7dtoMIrSas+EdIW1FNdLS3Ljiw7oqLJxk7apYlgTcVG7k7lrJrWZKdHL1QNGgmMXtitN2/s2ehhQZ4YA6O/687VIhPbrXOl/u2vvXRMQTHY1FX840AbVDjeldjYi0dkTRJyX1gz0QEYeWrkeSsw/gwSu3WtDabI6xjffKW5l6RzH/pYTNNbkEZdscA8Jpe496mHYdQef6P/tdR3KE8YaVZJxgM9OqBVY4pzxuZpwhIDivb0Gskw2itjcXljmyZvHs3ZdEaCQLGAwbvLrpk/fl5F9/j+rbaHKVQHjkAO4wRigZyw1MtOU3+qxyQE3T37nfQMTbGxPol0iA9Ko90iTRlFcqsygafs8CfUBThLnt61yDHLC2J7MKv2wE6yj02ODfW9VE0xZUq2IlbpIlUanfkpH52KsaAi2EnuRMTXF/WCyL7HxrldzYd3UFqHbdMHKLy/U0+KJpkCPWnm5dfxvfJKJeIk53VdOOpWcm//+JLZQH7Q3qYsUAIXWSmGToiDBYeeCHj/ikchOjsCW69G3WHpw3cyGhkHXxIXP+S0KKmnZCd41c1f7kYBjThBKQX6fLl/bqyRfCIRiW14kb2MM X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: f97ab19f-1090-4817-d868-08db7d180cc3 X-MS-Exchange-CrossTenant-AuthSource: SEZPR06MB5269.apcprd06.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 05 Jul 2023 05:24:05.2688 (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: 14tK6fPEOg/seuVaYMOZFyar/e8uymiRlcMSkPBA21ZMErQrKbc/Pc5MP8uUBnYtZZS8XltQCrJborHbL2oWYg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: TYZPR06MB5123 Precedence: bulk List-ID: X-Mailing-List: linux-input@vger.kernel.org Use devm_platform_ioremap_resource() to simplify code. Signed-off-by: Yangtao Li --- drivers/input/keyboard/opencores-kbd.c | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/drivers/input/keyboard/opencores-kbd.c b/drivers/input/keyboard/opencores-kbd.c index b0ea387414c1..7ffe1a70c856 100644 --- a/drivers/input/keyboard/opencores-kbd.c +++ b/drivers/input/keyboard/opencores-kbd.c @@ -39,15 +39,8 @@ static int opencores_kbd_probe(struct platform_device *pdev) { struct input_dev *input; struct opencores_kbd *opencores_kbd; - struct resource *res; int irq, i, error; - res = platform_get_resource(pdev, IORESOURCE_MEM, 0); - if (!res) { - dev_err(&pdev->dev, "missing board memory resource\n"); - return -EINVAL; - } - irq = platform_get_irq(pdev, 0); if (irq < 0) return -EINVAL; @@ -65,7 +58,7 @@ static int opencores_kbd_probe(struct platform_device *pdev) opencores_kbd->input = input; - opencores_kbd->addr = devm_ioremap_resource(&pdev->dev, res); + opencores_kbd->addr = devm_platform_ioremap_resource(pdev, 0); if (IS_ERR(opencores_kbd->addr)) return PTR_ERR(opencores_kbd->addr); From patchwork Wed Jul 5 05:23:42 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: 699927 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 0FB5BEB64DD for ; Wed, 5 Jul 2023 05:24:25 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231331AbjGEFYX (ORCPT ); Wed, 5 Jul 2023 01:24:23 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49418 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231315AbjGEFYN (ORCPT ); Wed, 5 Jul 2023 01:24:13 -0400 Received: from APC01-TYZ-obe.outbound.protection.outlook.com (mail-tyzapc01on2103.outbound.protection.outlook.com [40.107.117.103]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 77C631709; Tue, 4 Jul 2023 22:24:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=llxMZon0WOgmTwTHH3aN0klZT8Aio8WXB5MXgQ7mriDbcv97bEIbrpf6Am2DQ/95YjAFxLxsszXEnsfuGNEa/S2MzsUbvM6PsUY+DHUuaVTzZYjVVv47Nlzn/drjoWTqAqel0b2meLp7mhwFpmPXXj/FVq3Yqn64UAli/yw5aDsN3Bz2SuCzfVcuU/J694kgrYVEu7KTYi+0pZ73Erijk3hHyRawnU7gdb88gIR3x6+O3xV+lyL0E93SLGnEH9QMIl9MFW5rCoHm4z8P84/ugQy9JUguRbm8hIOdw4c1FQOHQbiqfb7qnoqYpBRkmdt496e5TA9QIqF4+xFHtpZQXA== 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=QvLMOax5iZpOte/zpQRvsfnlAHHKBS+sP9SMT8riXMk=; b=RZ2zwLT2JtXUnroU/Bn6ojzQmScU3u5ojuU82AYr7pm+V511pT5HPfhTwc8M1v634J/xhvBYZFyf2fvDW+BoB+sXDhzz8jz5BR3BukkNcgQLPfbQnTVa3HwPf6DzyPaqI1V/CYGNkLqqR5BtZQ/8DsY0xJ2gxHYYQ7YFHNxlxt9sh3LcGfNCtookuSieNKBZYXnlf8mi0pH3NiUPYzX0xUWRFDZAbECLQtA9ZYQ3qdycVIPyVU7QmSPOw1NVf+gRbjTiAfYkiee4pRUv5e7vYbqZoT8n1YWjtGiQ14YXFm+HQTv9ixWtEQGfdhnnm7ocIYCd5grlVIPvS19Qb0zU2A== 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=QvLMOax5iZpOte/zpQRvsfnlAHHKBS+sP9SMT8riXMk=; b=Tz8EoWAsm/pgynZ8gQtFrL5On+NNstuYF7iLUrm51oo+kz5uk+WUX7tAeehp/UKfVcU2x9a7T5C632BM24rNdaYr8Wz6jZ8pXk/K6czHaj3j1+biTQUfgyo36NEeDUErVDv2JLYoLhGYTongMvCyXoDe050Cl05r9/oiLW25lseLsmSvxGCIR9BMWal8vn+38aDXplR1+vZQpVSaBR6KGttC3M3WnQLst8yJZd6aj6+AqBLd3sA5AAGTPUc9hywLuaBMiYtOAvwIxnbvKm4RtAlZ+4bcTU5pVuKV/jRLe9tbDw4Xda3j4HoKrdYNcYfilfbP1tDkBJIt2gQpkNusIQ== 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 TYZPR06MB5123.apcprd06.prod.outlook.com (2603:1096:400:1c1::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6544.24; Wed, 5 Jul 2023 05:24:07 +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 05:24:07 +0000 From: Yangtao Li To: Dmitry Torokhov Cc: Yangtao Li , linux-input@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 06/10] Input: pxa27x_keypad - Convert to devm_platform_ioremap_resource() Date: Wed, 5 Jul 2023 13:23:42 +0800 Message-Id: <20230705052346.39337-6-frank.li@vivo.com> X-Mailer: git-send-email 2.39.0 In-Reply-To: <20230705052346.39337-1-frank.li@vivo.com> References: <20230705052346.39337-1-frank.li@vivo.com> X-ClientProxiedBy: SG2PR01CA0116.apcprd01.prod.exchangelabs.com (2603:1096:4:40::20) To SEZPR06MB5269.apcprd06.prod.outlook.com (2603:1096:101:78::6) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SEZPR06MB5269:EE_|TYZPR06MB5123:EE_ X-MS-Office365-Filtering-Correlation-Id: 7e505770-d7a7-4932-8276-08db7d180ddf X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: y5wWDygu04Org2PN8a44Iv0fr4i80AS5BZDUIFmRYYxdFfdUbKwD0kh0afsUzDXYfVgfBhTzzLYLEgN5fysW0RnP1aqAVVVX4h8C+KgRQvJlYX44faXN1bJEWWudF2AIKHMl8IPHRrkjIxh4ogomYpiA7PytFY5VRy+9ChU+CqFDWRpWB3PVEAco+5oTZqntceWI/7GxAt3jAWoTc6EjTCUnTjha0B5w7No4K71bHI+KVX2Y0itMh11sV6AfdARt9Xqte21vsl6sp8xdTnrAaWk1lWtAHvDmlyrlNiaIxvdBDybJ00+0ZIF0Z44LnCt7VdApSTsn+NmzC/TGNPKZGWIlAoEO3IIKwiPi/O8Uu6hbBndG0as1FY8A3W1EET3/fmC9rYaMjGD74alyt5THSBQLmPMBowGKoN291TVOuQ3MyYci+HCIT4CZSRighz4qWX8q1gve0dpyUJIrDyA6yXuCK5HqpiLCP/kK7vELSMq+MXmj5wAur8bsbgN57reiC6LU3zSdEY2iuI6AtGgYf6/VaDd5NKBgEIdjElC8JcKIHBsuJLZylDFWR+HrlNMXP8xc389cyDww594cZdAAiXnphKCfju+qNbBvkeaWcJYf026jwVOLjpRMY2whfS4C 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)(346002)(39850400004)(396003)(366004)(136003)(376002)(451199021)(41300700001)(38100700002)(6486002)(38350700002)(6666004)(83380400001)(1076003)(6506007)(2616005)(52116002)(186003)(26005)(6512007)(86362001)(478600001)(66476007)(316002)(2906002)(66556008)(4326008)(6916009)(66946007)(8936002)(8676002)(5660300002)(36756003); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: NOBCaci6e4dEZGbpqxgF8wX8fc45OKAjNXF+Es99BHwFIAJ1g/T4NKXBruSnd6Yr5MP7a78Yqc/EZI/ifCSru4kwAUVV7y00uJaLgIurGedQT7456tbIgdN9fK/VOCMStXjen976VZBmhMW0yR4sqwcKIL3W6jvPR0AOY1HRzFu1u+/dbOhGtADyNxVUBfxeUgNIJ6GLKGBU6i9thmhj2etiDGiN3h/X6V+iychn5K5AM2ROMFu8N25PRMNK6Ag0iJ+QeaqZLGbaaIuEQ5mtgOO4vPT4rxDBq/070Ls37qHDA9fCkU6Tqly30B546pRO/uQLmCwjZR/aF5TFqlcMz7YMAv/4GUeQDZiklD/e2oHec7IX6yPwTQM6K3qq9eOAAfA2xG0lDII/OAX8FKWnAB6IRBQMZy31cocdSehSZdavNkNbe2PDqtO1JTGL7uyWgr/r3DRrFRX1LKporjjx9mL4xkboGztd0pERjWnei990xD2M+5TwCCOUZ4755FVcdne48a4poHYuJOOVF+61uTr48mwDXGIfhnFi2WSvUdznopDw4KlVd3lNMvFF/XxDiDPWF3ZjvflStKjnbpGf7SjZh0/Pn1TkqEtVgVT7iPE/y3nY7YiU7KFXqbtYohiQyO2nH21Q3zYokN5hiF3d8WpSiXR4cdJYCvyoz41FxUEldsmHL17AgipCc2afV7nw4mBGny8MvpewIhjdwV4q2VvmwLhIuAA+N8wmbGkqiTjnBUDPeYpeRC2ZvF99xPYDiK1M3Uu+iUvQCxmWeyonuS/vLrw/StruSxr7b2Nl3xgn54DiiTRcLb7b5zErskhhdOdTl/Ht4UNfSKaD4PVU34AA+cHLloQ0StKf5e9E3HoN3+uOrrk0MQVTkq4FXg7O5vHPWNg2K1BjWuYZF7ExVhAsAPdo+4qKR0rixgCddNU0E1xdM4kksrhzjAf5DUx3aBpAY8ibsd6LT4FXb49FlUU79IvOxNqu7dB7y2QW/rcQgIkSjIZS879gphsYpuM2r9+g6K9KPPJtUG1lVBpWzZLUQ+yxzim5/WN45wHUB/5BVXDRlBy1jIWHKsgNttpSI5srOcUFS0iw/DpUiEBFfaLklI1kv6ND/Y6U3vhLOVMMoNBip2qNL5pRJk3jzWwvYXfYyNu+q8RgW7hAANldaHYjcTh96UFfxgZZqG29EoKSN2PLFzRDQFyOAKfgu3aaOFGLGqFEPM9ADcmEsX0JTzu7wB7ThwbC/8caI9SXkWLT16Mt8c7jxfPQ7yzTB/hglpHRu9fR2Xlb8mu/hcgnsLre0ToyWmNKBmDLr77HiVY/2LEEcTxXdg19ITGLLGlSUNFhEFiE8jysvPf2KPDbUvpnJWJyb6kBGDSheQWhx3e9aFOT+AwaC2BfuYdPY1DFNr6hoTFPjXSQrTEWwkm+vfeq6nbfWIVpqKC4Ab+hBY3kSHod5yzTBLPQSFsdtxheN1L6NBhgwGIx9vLJrHSzoIhLUiHJs+DT+aNnTS3RZJEh7qhuCCUVUkzM/uV7n5WRHotd3Abh2DI0F1YeCLfK7FIBKUHH9OuKShiKaNDg0ljeC3cNDQPXirhnPLieWGpo X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: 7e505770-d7a7-4932-8276-08db7d180ddf X-MS-Exchange-CrossTenant-AuthSource: SEZPR06MB5269.apcprd06.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 05 Jul 2023 05:24:06.9713 (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: 8IMBQzgX6OrOfU6Jje/wygEZ9JCrMOnFjgB/9FTSVhvA+Xk0PO+EcL+5uuyb5raN82094CPzj3SdLsypN7Yrsg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: TYZPR06MB5123 Precedence: bulk List-ID: X-Mailing-List: linux-input@vger.kernel.org Use devm_platform_ioremap_resource() to simplify code. Signed-off-by: Yangtao Li --- drivers/input/keyboard/pxa27x_keypad.c | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/drivers/input/keyboard/pxa27x_keypad.c b/drivers/input/keyboard/pxa27x_keypad.c index 871f858d0ba7..3724363d140e 100644 --- a/drivers/input/keyboard/pxa27x_keypad.c +++ b/drivers/input/keyboard/pxa27x_keypad.c @@ -717,7 +717,6 @@ static int pxa27x_keypad_probe(struct platform_device *pdev) struct device_node *np = pdev->dev.of_node; struct pxa27x_keypad *keypad; struct input_dev *input_dev; - struct resource *res; int irq, error; /* Driver need build keycode from device tree or pdata */ @@ -728,12 +727,6 @@ static int pxa27x_keypad_probe(struct platform_device *pdev) if (irq < 0) return -ENXIO; - res = platform_get_resource(pdev, IORESOURCE_MEM, 0); - if (res == NULL) { - dev_err(&pdev->dev, "failed to get I/O memory\n"); - return -ENXIO; - } - keypad = devm_kzalloc(&pdev->dev, sizeof(*keypad), GFP_KERNEL); if (!keypad) @@ -747,7 +740,7 @@ static int pxa27x_keypad_probe(struct platform_device *pdev) keypad->input_dev = input_dev; keypad->irq = irq; - keypad->mmio_base = devm_ioremap_resource(&pdev->dev, res); + keypad->mmio_base = devm_platform_ioremap_resource(pdev, 0); if (IS_ERR(keypad->mmio_base)) return PTR_ERR(keypad->mmio_base); From patchwork Wed Jul 5 05:23:43 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: 699398 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 B05E4C001DB for ; Wed, 5 Jul 2023 05:24:29 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230374AbjGEFY2 (ORCPT ); Wed, 5 Jul 2023 01:24:28 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49708 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231407AbjGEFYY (ORCPT ); Wed, 5 Jul 2023 01:24:24 -0400 Received: from APC01-PSA-obe.outbound.protection.outlook.com (mail-psaapc01on2110.outbound.protection.outlook.com [40.107.255.110]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E24C41724; Tue, 4 Jul 2023 22:24:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=kK6bAuhWSEosyeSHCBsZRo14mlDSExGUt12tagnNZQL6RxANaVf8OF7E4nVwH42uCu+L8jwzFUYt5LLaHxbrUGWy+jvtCdPxJq8fe9vJffGgWxmqOiTjdPKy78JmD1rmihpJMwlnXKG+nrTszpKpRfgMDCCsNnEVWi4l9lxJRSdHI+ZOmwsBzJUhvBjuOQGZ+qiDQRlOMmwncjpqARiSWTCbfK7q+gSbM9DBKicBZme1ddqEBbnOj+neevU/9iGd6ScFDo72PT5/qcIhftScf2thRwgUQh+QnPUW+p1N3BEPbb4uhu79gZi7eUkxEjRm+3WQMeaPmsSaeL2ImkU/cQ== 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=EdwLLZt7SJTc4Q0ItmBJyePFqZew52vfgBGo5KTcf/8=; b=cpt6fH8KnBXDL9q1VOEIRXYGY8rGUHKcuag6khirm4unl6ql+klw6GxAlxodPNNHJan+gLz6Vpssj1g+MGQoIRS/qMTDRv7FbFOjLHcg0NQQvDklhpENxeXo9fMpY87lkiVhYq8JK+L7JTczLb7bB1Kob63wWU9EppGZOvuaVz5PMv3XUCGoFEH3pDUakXtNByJPbGAH9HjRbVcBenOIhLy0DJCHgMJkAMw6J6//uRVJrazpaaJ62wkYnslLcGD13cA8HgrANh3YYAYaCsezFbeM0qoguMI1UY/lUJlBreR2BYeBj5Ucy65CPnrq5IYpxP+FLzkHZcVx6QdhB0WASg== 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=EdwLLZt7SJTc4Q0ItmBJyePFqZew52vfgBGo5KTcf/8=; b=C9OXWZFjoP5CwJhTMSdpVfn3RRxlVO0oIU/5Z64P/kyYr1L0eL+1GbMXXtP8OtfGNxjKVL0EwG/uQ8+XadUv5MGWWiXnW363iy8OxaCILv0W69/StmibfMwKJ1d4hSdeNtz74PF/L6LRe7J171MTXW65jVCGfVNr+dBDPaBRNxHIODpHruUOv9LRZYDBKDr3G765XYdZNmK8cncB2yMyg3OMyRLjB/pL62QXDlK1h32QkuN0bayzciHZl/eUZuro+cmB3bUzCNl0iZoH6ZX59/25dWb4l4NmVFPfCBJZNrrUeDZA+3GfmRhIhfbG5yvWgOPsIHN4tpVstUwvqHvD5A== 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 TYZPR06MB5123.apcprd06.prod.outlook.com (2603:1096:400:1c1::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6544.24; Wed, 5 Jul 2023 05:24: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 05:24:09 +0000 From: Yangtao Li To: Hans de Goede , Dmitry Torokhov , Chen-Yu Tsai , Jernej Skrabec , Samuel Holland Cc: Yangtao Li , linux-input@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-sunxi@lists.linux.dev, linux-kernel@vger.kernel.org Subject: [PATCH 07/10] Input: sun4i-lradc-keys - Convert to devm_platform_ioremap_resource() Date: Wed, 5 Jul 2023 13:23:43 +0800 Message-Id: <20230705052346.39337-7-frank.li@vivo.com> X-Mailer: git-send-email 2.39.0 In-Reply-To: <20230705052346.39337-1-frank.li@vivo.com> References: <20230705052346.39337-1-frank.li@vivo.com> X-ClientProxiedBy: SG2PR01CA0116.apcprd01.prod.exchangelabs.com (2603:1096:4:40::20) To SEZPR06MB5269.apcprd06.prod.outlook.com (2603:1096:101:78::6) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SEZPR06MB5269:EE_|TYZPR06MB5123:EE_ X-MS-Office365-Filtering-Correlation-Id: d2df92b8-b569-4e3a-8612-08db7d180f5a X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: rAcSLF+omlZe7KJGilfsVvFvxnyIgWhLE4d5kaIgbyd77nFp/71gpunaAFMp3+5iIHK3NMBQ1KVrsqH1CUuiYecjBu1AlN0+RTHYf7ThLPvjPIOBY8WXv5PA979nl4CHaowEKMByb1Cn5xaJc2I6c6j4dOJIZwVF5xTpb1w6+RbrRH1YC5HNjO/Gipg52fPCCMB3bnYJZ06b4yRmeHwJNba5jgKvUUc9VPKchrD7f1cMVs+pgUqdp1IWKHDpwIGg5J/P1xDisU62C7x0o6nfq4106gmnGwIMAaSMFsfksQ1nYRZ8sB5RGU8Wl1eE4RF5b7WJtHRrXDHgEZoOvSt3rMW085TurfeSxvxO5ij4ZuzAn7tq2K7SUvMdCQdQCCgmtrZ8A+tTBUNl0KpR6K7moeuzq7C3zcrVFrbjcC1nzM1pHU8YNny3ajceQTdh4cXgZ1WBHUAnwjMsm1FkFlg1fnJ78Qh/zowlCsoxrdJBlaGY+/fAFbPo/ablDeg6LuBa5fbnKr4+5G0imBi1Aaw2qIB7TtW5S0tpV97YJbFfR8Y9CxxoKgWKoX2VMOsSf+yUrAaXs0NkqsMnWxXhAO997t+DbNJucuRL3rnjBayS3T7gtrO41I61qd0lOlnTvh0EhYhXE8q1pSlWyIZpg2v57Q== 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)(346002)(39850400004)(396003)(366004)(136003)(376002)(451199021)(41300700001)(4744005)(38100700002)(6486002)(38350700002)(6666004)(83380400001)(1076003)(6506007)(2616005)(52116002)(186003)(26005)(6512007)(110136005)(86362001)(478600001)(66476007)(316002)(2906002)(66556008)(4326008)(66946007)(8936002)(8676002)(5660300002)(36756003)(32563001); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: RunqXYPZR5/crDAZkY6DPDk3EE5kA/q5gdBSAuOB+/VFu18kU85sPCfl9IasOolh5n2iJXkN/SBIi1mVac4QDWkyA8un1SkfaksOqLUXEoRj1F7aFugnXvT6vOI8mVSRe0d77uvFC3Yd+RfbMiYlQo+SeRpHNnhHaVeeDdbqh4ztQGHFGF7/Ok6nugY2u/xdK5oFYIa5l7uO9mBoWZrBGqCy7/siQZ9XXR3ldfbtdeH1pVktq05ofG6nVj1MCvMtlQpCcFePKWhFrQX/5BmFfhu8V4hQHBraZomSJN/oakyaLIw49d/mWj1AVd/OsI/f67qZzCQZM2owDoh+Z4g78YoSTresgNIGU3L7IQjWa8BaDn1LtQsyMl7NMI3UqViNwotVsYjgk5NiR/SMncov9pmgGDIVNPfbHeNIwBstyzHW6jMlVcgO3vsUOZT/2oQPmwHlx9GFvqZtfk58lVp360o6rohinIxuxdWaHSTC/k/ArjOig678PfQzp/1RUMvRhj16wrIdAgXlhX3BqJbbHOaISzU5PwK+ivWZofCMxuL45RqqDdLJeP3Nw0RR+R1tJCUFF9zrOI2DGsyRhD74oLItUeTE+UQmV2dXECNx7B0aiJuipf0nJRyhVsDv5ohal+I2Ci/Mxu9upjHj9y6MKVgZozmCI6JJzddNV3LEWzDj3j8teybg7d/d8kflvf3GjRB8O4uim5aPE3COjjUIFteAXEtFjtd9OLD/BNwwga6pPQquDh4aPe4he+brbB2fcZvJ6AEnGLOid2YJJCkiWV2hJYk1KcffKavgOuvxyaq/XO8TdHWu1DU5xCgcGHCnlVu2GAYE09SJdde7/lXF+ACsYdhzrDjgYQK7CIG6mBSdK57zulfYWYCysfoRc0CIQ5XuvuvEV0NiBZF20aX70iOs29cq6MsApAmxfmvhSjtluUch+2GpGdm/Nh5qoIjM50CGxvlpu4hWCXiRt/me6xNjeO94sPmcEOubONQpibXOZM5KDZppuPqWvRCrTCfqPSD/M5hcyTSpQuLKIrZrzGkuZ26W4gvjhoG2mtl3UZc7UtoZkHttPJWXPoGqTSoZu+tBfxCq9BQ89PMTjn+3sY9U6C4QNMSF0icJ7Hl9vO3SMsYrAuxBageE0cdymRehlIuVfURs870pVS4zmdKZ4mLIOtk4TnjhBHZ3JihzJfch5EB/SK7w0C4sicbYvpdXYR/+23Bbz5DHxLz6BLdNtcfqI53asv0WDgqAP3Ch8s5RnWRB0aeXKODXmObNzUXft9tjUrzILwdDRwad/inqyCf2XJuD5TDcMLGKQz5l7Z0xHdYe7cRC/h4aVSlsKe7F+PtV7HtT7geTHaRdU0GrhwxYe/vCPAadJNMtq2HQlz4butJyfQuMyqprTH/JRZHuoyaRIf3OWnbUwqgLM1o5JMnPE5UfK92Jore8EotS8S4/VpF4B+cpkTlEu6ztSHcRmjJK0pTxZRxn3MC3JjDb9uwpliq6unMUZi1HwmKXatZ3uE/Ujdvy+CyaVzjqikLTL97XYuBCs4QILm0q+y+SjpubvU4Skx4PbIDvCxHtJkkoKluGktRoPpSgthhT5QqY X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: d2df92b8-b569-4e3a-8612-08db7d180f5a X-MS-Exchange-CrossTenant-AuthSource: SEZPR06MB5269.apcprd06.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 05 Jul 2023 05:24:09.5470 (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: Fk0aW+H54De+4sUyi5t19IAuV6WY5LkqPh8h6P+PyXrCTKDbjVUgYEwfSgFPhAZughMHH3A1HFZzWPS84A4Zcg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: TYZPR06MB5123 Precedence: bulk List-ID: X-Mailing-List: linux-input@vger.kernel.org Use devm_platform_ioremap_resource() to simplify code. Signed-off-by: Yangtao Li Acked-by: Jernej Skrabec --- drivers/input/keyboard/sun4i-lradc-keys.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/input/keyboard/sun4i-lradc-keys.c b/drivers/input/keyboard/sun4i-lradc-keys.c index 15c15c0958b0..95d927cc8b7e 100644 --- a/drivers/input/keyboard/sun4i-lradc-keys.c +++ b/drivers/input/keyboard/sun4i-lradc-keys.c @@ -307,8 +307,7 @@ static int sun4i_lradc_probe(struct platform_device *pdev) input_set_drvdata(lradc->input, lradc); - lradc->base = devm_ioremap_resource(dev, - platform_get_resource(pdev, IORESOURCE_MEM, 0)); + lradc->base = devm_platform_ioremap_resource(pdev, 0); if (IS_ERR(lradc->base)) return PTR_ERR(lradc->base); From patchwork Wed Jul 5 05:23:44 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: 699926 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 2DD0AEB64DD for ; Wed, 5 Jul 2023 05:24:52 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231345AbjGEFYu (ORCPT ); Wed, 5 Jul 2023 01:24:50 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49836 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231404AbjGEFYb (ORCPT ); Wed, 5 Jul 2023 01:24:31 -0400 Received: from APC01-PSA-obe.outbound.protection.outlook.com (mail-psaapc01on2110.outbound.protection.outlook.com [40.107.255.110]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C60AF1730; Tue, 4 Jul 2023 22:24:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=nv2MpoLgdLOLZQ1MrpqxiECuGeYKy5T3xSS5FXAOl+jAGtqBcYAHgJ5P5dTuuNjrBGrlLnUym/1bcn1BnZ3W8Vbffj/sPwadO8V95dXsNyJMa0DrnF7wIfdb9ejZ52nWjwzRKpvjTML1UhOzYZ674v/c7yloHfZ15OmROjI/vnvSxXQk182sv3Z4bmRVXQruzOrQgnHW8VV2GZCAqCdFATUe2hqp+UAl8nAU6vVPKPordwDYsjNAOwUnaocded12qH4GrrGX57rutRImaLO1kbDap2KRzDPKyCIT7ooMWYx15X5NDslmhbyyDZN8yCH8A/DM1C9ls95mJluzAA2RbQ== 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=/LeQ+2gP8IdHdI0fPj2WLgHFCAUgSZ1j9TJQHRLSFcM=; b=m8+EP5P/1JAe5EmqMB3L64qixa+DoLf7OdoPiFqTCMxq1f1qa8BtI+ejzyUE9kWFZ0oJfuGU4wV/ABU//5qC814An650vhbomyS+5azap0oUTybR1RMV3xD7ccJHrj6NSRUumMRGVDJ3cctChTj3ZKq50KF16JEEou0VFIPqC2gevQK1XGqRRZPu5DhG5fGxZlqwxxc54p4cZjwL512jsWjD7CEe2TT0x6pA1Vn/6WdVVDIfE6ZddXcfjpybaUQ8qt5jOKGPdevXmiNB4bk6LIjpmVt7Z/uujTkR93WoK9XeM3hSiz64GJMhx4IYPxIADzjqacIGPNYzhIT/SPXUcw== 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=/LeQ+2gP8IdHdI0fPj2WLgHFCAUgSZ1j9TJQHRLSFcM=; b=gilquPOv+sEtLjR/PqQTK33vmNoPY+JnYf1fguTvQmpozul0qnfs3prnOwOETFf+yts3TMEX2TKdg5GwwLO+/GHZZW77fr7BVPnsEU16X+6e08jmRsST63jEjAe97tS5hDGDbYkE33G79Vi0UwIGOPufwIkZF8krCqd3EV40jMhdT8O/lynX6mrqdxTD/dxI5sHTMJqaXePiUugcEcRMS+OLif+LcmOyH9NGWUvjfLXmFQXc+WWDpdPzi/51ht37CcTigTroRm4q8xLw1YXlSCjA/2CxAME8olUJcp2ry0D03cwx7lyfM6wrh/yDrt9YaPrmR//dBBXL6qOLsPyxnQ== 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 TYZPR06MB5123.apcprd06.prod.outlook.com (2603:1096:400:1c1::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6544.24; Wed, 5 Jul 2023 05:24: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 05:24:11 +0000 From: Yangtao Li To: Dmitry Torokhov Cc: Yangtao Li , linux-input@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 08/10] Input: nomadik-ske-keypad - Convert to use devm_* api Date: Wed, 5 Jul 2023 13:23:44 +0800 Message-Id: <20230705052346.39337-8-frank.li@vivo.com> X-Mailer: git-send-email 2.39.0 In-Reply-To: <20230705052346.39337-1-frank.li@vivo.com> References: <20230705052346.39337-1-frank.li@vivo.com> X-ClientProxiedBy: SG2PR01CA0116.apcprd01.prod.exchangelabs.com (2603:1096:4:40::20) To SEZPR06MB5269.apcprd06.prod.outlook.com (2603:1096:101:78::6) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SEZPR06MB5269:EE_|TYZPR06MB5123:EE_ X-MS-Office365-Filtering-Correlation-Id: cbb546fe-d2a1-48a8-aa3f-08db7d18104d X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: xKoA+eNGLFhGFQhbTG8JJ5bKDPx/NdzbjCIJhBMvqV7xtTTY2Ir9HbdyHKhvKii3Mgj0cwJSIV8o7P230FGXeLH5Fo6l0GSeusi96/HPIECreajQDB7ssuwWHfxSeZAA2fSLnrCZGLByT6WqIvW5IWqctgJYcWULUSnDH0UOtTbse6Ocsj6uNb6BPtb+QIG2dLFuEIpZ4cwIUIxA8e47q5vCcKYaBVu0X9K8NXIuH2F84gMIey8Wn9/zekBDIHQafb8Ai7xmNTJwXQzlkQo2wpZcEGwRshcbyPsActTtoDws8win8OhWRDeu6qnO9QdjpnfoNgKDsIWFDjjODKpXqKNmfJ9IuaET0vY85egmSblYNYiu49wYeuRmXa+rdZJsGUnnfXjAHfUc0EZ6k/k0EWv1cWg6+JluS1bU6FvsqsxYA0gdRlJSBAKpblynKKGhtlT7xgMQpcSzP4UHiCerrVormftkfPj2LIJXEcEj5W7m5CB0qxh6mE2tHc/TjM8XZr8R77eCXZdYz2M/x52A29UQ2TszyWLdw2+eo4ek1HdJWtzrkeEDdwT3MFrNkBvKI2fmenrehltBlMLyoMqAV83U6NnbcMaSlStWpuT8agD8Op3pfjfS0CUkzZcokoV6 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)(346002)(39850400004)(396003)(366004)(136003)(376002)(451199021)(41300700001)(38100700002)(6486002)(38350700002)(6666004)(83380400001)(1076003)(6506007)(2616005)(52116002)(186003)(26005)(6512007)(86362001)(478600001)(66476007)(316002)(2906002)(66556008)(4326008)(6916009)(66946007)(8936002)(8676002)(5660300002)(36756003); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: 1dpPscsL4nLGO8DDTbSkEoA8mtQiJ8f+qGz3S8veGbw6y/q6BsDQl2CTVqEaIAZEt9BBe6zZNaiOxxniMHqEm99kvi7uJKNCYeCv/NELHUxsxS6pGJ9sPB/nOHdmWHvk2ZfSFK/vbz1G0tqcrkfDsYSQ1MvJOczzbnQWXJZJ7Iq9gMv6fD6yodquv3ZRbNA6vSWHUMJgrMDwtWMXEMP5pRSLu1EDyAGpzbyFKDqqpj5JKUOlc0b/jm2NsJfK5QFjGB/kUQwTE92xyTqC93AuU6VF+UDG7WBA9MATZUDUd9usCYFNdjUll501f0JAQxakyFXrYZTNJdanW7achEQYPIZGCx+7mMlLgdsOKGsqQXsIpViDMbYqvlnyKW0K1t2/vUetLZ9Icegp9PZAP4pHNtaN8s1ObcLIuiCJ76mhultN0JsVb53bVtDa95g/64SGv64fflUl1opMx1yw+B58bRVX/A4idihVvqAsVKt1b/T/ymV5psGla2Lxwya/MuFr61+uDXvsMANTlhxCwddV7yYkis1Y3A+VSl16iGoNJMFeo6+rhTRvRAa0rhL9NrBirYMNGO5WOO9O5l0oFprl3LBEGXZlcXfmveoGc1vY40wsTiN5ki0xI/TntNTb3nPx1AfOMvxpMukfsG+DFsdUnkZDjHGPRQmeV4TPpMf2ng3WeNnsYLwugqHbDWy+1Wn83tF8p0XLAubXirlUtlDxJzLIC8UG9E85Row1u4HIUovMm0xeYiBvlFrujE6bNxc8NSSHB56qwDdR5IOXl473T1bhF6kkhwokA3Jg4B3KyHaUGfM+86MXc8q28jb6CHdZ1aiPWf8xn9QvYipbVVUOt1DXFmJDRyw/0zlRoqe4SBI/vZZc5MzHCN8qONrAP1VCFbK31VLK0WFL3gXFaKPLpjy3u/YtHeqTazU1pTGxKzRqZCFNO4wriBFNJJwxy3Vz6PYWFB3zC2e3gM4pBbbiCFYlRBk0x4/a0A0z9STBSEXiBWUBf63yqpL1tI+BhAXfB2azkz1UCVv1XewUeDNV3WFDVmzGISABc8vSYQh5GZQp8NUx2+gZ++7ythiMgb1OVM/B+uLmw4dqkLAJWCvGCWN40NVpBxtYltruWCE7zFXQJ+1Gtl2EX5q6VL+AtQ2gdCId3OfcGD08QG4NbPuKcZQQBxj2eNnsdl8lKQBR2yKILlnykALKcwRAtdxRj9kTln0HkDGOkrQemnuFqtd/ObfB3RIL+/Pj0I5LmZfOs7tknjUBDDTdtPVxdYOPRVzoZL3Niz/rL0Ni6mHPn03yMOuW7Bu0jCEeqSk360D8WqtcADndsrtCXi+Uirg8Goyr5bI0oB+DN/QgcAFWLf/xn0gCEw0KN2wvrDll02o84wgf6D8kSa+94jPBMnmvnhZneco3HType/ueiD5Jfc2VF2ZPIcBiPSxZJbb1/HzzT/W69sOU+WEnjLYjJhyZPSmCrqZ504+5AzIiPtUgNIu2B60q1ixbvetcfU8LEcXC6tAtsXGf7TMTY3krw8YaMv+4gDphucQIHLNxpLudey7UV1tVuMCcbRqedEEy1IFLHo/IQ4vLKGJiIno+h1MaVmev X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: cbb546fe-d2a1-48a8-aa3f-08db7d18104d X-MS-Exchange-CrossTenant-AuthSource: SEZPR06MB5269.apcprd06.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 05 Jul 2023 05:24:11.0586 (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: LsKTLn6l27NvYCuJBKqnjheXQQIx6psvijuAhE1dG2XI4WX+YE5um2bmd8WZFyZ9ghCMxx3DddjLHtoYiOwefQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: TYZPR06MB5123 Precedence: bulk List-ID: X-Mailing-List: linux-input@vger.kernel.org Use devm_* api to simplify code, this makes it unnecessary to explicitly release resources. Signed-off-by: Yangtao Li --- drivers/input/keyboard/nomadik-ske-keypad.c | 76 +++++---------------- 1 file changed, 18 insertions(+), 58 deletions(-) diff --git a/drivers/input/keyboard/nomadik-ske-keypad.c b/drivers/input/keyboard/nomadik-ske-keypad.c index 970f2a671c2e..93318324e9e0 100644 --- a/drivers/input/keyboard/nomadik-ske-keypad.c +++ b/drivers/input/keyboard/nomadik-ske-keypad.c @@ -225,9 +225,9 @@ static int __init ske_keypad_probe(struct platform_device *pdev) { const struct ske_keypad_platform_data *plat = dev_get_platdata(&pdev->dev); + struct device *dev = &pdev->dev; struct ske_keypad *keypad; struct input_dev *input; - struct resource *res; int irq; int error; @@ -238,20 +238,14 @@ static int __init ske_keypad_probe(struct platform_device *pdev) irq = platform_get_irq(pdev, 0); if (irq < 0) - return -EINVAL; - - res = platform_get_resource(pdev, IORESOURCE_MEM, 0); - if (!res) { - dev_err(&pdev->dev, "missing platform resources\n"); - return -EINVAL; - } + return irq; - keypad = kzalloc(sizeof(struct ske_keypad), GFP_KERNEL); - input = input_allocate_device(); + keypad = devm_kzalloc(dev, sizeof(struct ske_keypad), + GFP_KERNEL); + input = devm_input_allocate_device(dev); if (!keypad || !input) { dev_err(&pdev->dev, "failed to allocate keypad memory\n"); - error = -ENOMEM; - goto err_free_mem; + return -ENOMEM; } keypad->irq = irq; @@ -259,31 +253,20 @@ static int __init ske_keypad_probe(struct platform_device *pdev) keypad->input = input; spin_lock_init(&keypad->ske_keypad_lock); - if (!request_mem_region(res->start, resource_size(res), pdev->name)) { - dev_err(&pdev->dev, "failed to request I/O memory\n"); - error = -EBUSY; - goto err_free_mem; - } - - keypad->reg_base = ioremap(res->start, resource_size(res)); - if (!keypad->reg_base) { - dev_err(&pdev->dev, "failed to remap I/O memory\n"); - error = -ENXIO; - goto err_free_mem_region; - } + keypad->reg_base = devm_platform_ioremap_resource(pdev, 0); + if (IS_ERR(keypad->reg_base)) + return PTR_ERR(keypad->reg_base); - keypad->pclk = clk_get(&pdev->dev, "apb_pclk"); + keypad->pclk = devm_clk_get(dev, "apb_pclk"); if (IS_ERR(keypad->pclk)) { dev_err(&pdev->dev, "failed to get pclk\n"); - error = PTR_ERR(keypad->pclk); - goto err_iounmap; + return PTR_ERR(keypad->pclk); } - keypad->clk = clk_get(&pdev->dev, NULL); + keypad->clk = devm_clk_get(dev, NULL); if (IS_ERR(keypad->clk)) { dev_err(&pdev->dev, "failed to get clk\n"); - error = PTR_ERR(keypad->clk); - goto err_pclk; + return PTR_ERR(keypad->clk); } input->id.bustype = BUS_HOST; @@ -295,7 +278,7 @@ static int __init ske_keypad_probe(struct platform_device *pdev) keypad->keymap, input); if (error) { dev_err(&pdev->dev, "Failed to build keymap\n"); - goto err_clk; + return error; } input_set_capability(input, EV_MSC, MSC_SCAN); @@ -305,7 +288,7 @@ static int __init ske_keypad_probe(struct platform_device *pdev) error = clk_prepare_enable(keypad->pclk); if (error) { dev_err(&pdev->dev, "Failed to prepare/enable pclk\n"); - goto err_clk; + return error; } error = clk_prepare_enable(keypad->clk); @@ -314,7 +297,6 @@ static int __init ske_keypad_probe(struct platform_device *pdev) goto err_pclk_disable; } - /* go through board initialization helpers */ if (keypad->board->init) keypad->board->init(); @@ -325,8 +307,8 @@ static int __init ske_keypad_probe(struct platform_device *pdev) goto err_clk_disable; } - error = request_threaded_irq(keypad->irq, NULL, ske_keypad_irq, - IRQF_ONESHOT, "ske-keypad", keypad); + error = devm_request_threaded_irq(dev, keypad->irq, NULL, ske_keypad_irq, + IRQF_ONESHOT, "ske-keypad", keypad); if (error) { dev_err(&pdev->dev, "allocate irq %d failed\n", keypad->irq); goto err_clk_disable; @@ -336,7 +318,7 @@ static int __init ske_keypad_probe(struct platform_device *pdev) if (error) { dev_err(&pdev->dev, "unable to register input device: %d\n", error); - goto err_free_irq; + goto err_clk_disable; } if (plat->wakeup_enable) @@ -346,34 +328,16 @@ static int __init ske_keypad_probe(struct platform_device *pdev) return 0; -err_free_irq: - free_irq(keypad->irq, keypad); err_clk_disable: clk_disable_unprepare(keypad->clk); err_pclk_disable: clk_disable_unprepare(keypad->pclk); -err_clk: - clk_put(keypad->clk); -err_pclk: - clk_put(keypad->pclk); -err_iounmap: - iounmap(keypad->reg_base); -err_free_mem_region: - release_mem_region(res->start, resource_size(res)); -err_free_mem: - input_free_device(input); - kfree(keypad); return error; } static int ske_keypad_remove(struct platform_device *pdev) { struct ske_keypad *keypad = platform_get_drvdata(pdev); - struct resource *res = platform_get_resource(pdev, IORESOURCE_MEM, 0); - - free_irq(keypad->irq, keypad); - - input_unregister_device(keypad->input); clk_disable_unprepare(keypad->clk); clk_put(keypad->clk); @@ -381,10 +345,6 @@ static int ske_keypad_remove(struct platform_device *pdev) if (keypad->board->exit) keypad->board->exit(); - iounmap(keypad->reg_base); - release_mem_region(res->start, resource_size(res)); - kfree(keypad); - return 0; } From patchwork Wed Jul 5 05:23:45 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: 699397 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 565BDEB64DD for ; Wed, 5 Jul 2023 05:24:55 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229793AbjGEFYy (ORCPT ); Wed, 5 Jul 2023 01:24:54 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49968 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231478AbjGEFYj (ORCPT ); Wed, 5 Jul 2023 01:24:39 -0400 Received: from APC01-SG2-obe.outbound.protection.outlook.com (mail-sgaapc01on2127.outbound.protection.outlook.com [40.107.215.127]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E0A8D19AA; Tue, 4 Jul 2023 22:24:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=LAKPNzvMthhuSahyzvHCSeJJvq0xK6NdRZ2enW6dtGVTor3C6QOClEEZmVqWeiDaBKFo/OGTdcvfvWA/5wBi3VGQ8I07uBvA0orQcXawkd7+JlamBNEJzh7IJqS5Y4kTH2BhwLDmQRJ4TuysLOaA+x8JwtL2x7cT6QlZRSM6h59QiH8TF8P8AEuzevai+pK+EMoKYnGZ7duiqsQjw5LWHkPIQz4N2hugsF7Ay6ZfzP7/gfvXENp2TIRQLVvXEF5Jao2b8+GL3f2oAImI2Xpt5vutlSS8/WX6WYDg3JQDOwbo53CftTmpq1WN2RnuFnF79jlnmhAO4a5yiiMSRnsxAw== 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=ZFL76hn98dkt6v0e+RSeiY/wMPeWmcC9jIertAZ77bU=; b=JJTRKrd9TI4AQoQdUDUJrdtMPlAvSLgZH0H72Sp8zOGrCfyDgrnP9w505dhSASR8GYNXqELNiaOlq5PquShoo9dHjOZf9fKPiGUCHhqCYrECsUxHRgbGFzxgvbkAnFd+kcx3m/gBEDU62qzABBqJrtgRf2+3sIZfpCEJXVdJwbclsByb+x5mvpWpfn0PeSnJfuVYZLs9NGfwPEg3uy3JFkssIrzm6o8/Ma37CxfGpYjZq6hjDf8MRZG2vMCSIVuiZKRNtIziHxBbmuZJfL8YcgcthR+cpvnZSUqkvh61WH6m6ULlevTOr8t1jRj5vZEgnX6nTGB/WyZm7KZTMif8Yg== 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=ZFL76hn98dkt6v0e+RSeiY/wMPeWmcC9jIertAZ77bU=; b=a1gBeTotJRqWPN4bwQMFUptFjEhlcu6F1UV5iO38iTkRDlNZUuEF+4SO3wx8R8H8wO4qTiLfebMHnMGiddIWJBRiX5FDBkvhs0bRiDbE/fk4tubagM4XLa4iLLBloe7mMVM4vQgD6HFDkdSx4nz6j5EWgD5rCTrTUIgAdJHoN8GtSTss+/sxO3H0xGugOCkwisL/72Pc/LehfFt8PBzNA9NDUlfeAMmCMEGbc60b+PI9JQW5j3RRKKnfgZOy6mEgmsiex7ElM9qYdjrWiT9BxmoilivDgjvImRcJvmgIxkaTWaOwsp2l1AIL9OvkDHzKj64WtA3mOLjtxyV+fMoUIQ== 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 PSAPR06MB4069.apcprd06.prod.outlook.com (2603:1096:301:37::6) 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 05:24:13 +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 05:24:13 +0000 From: Yangtao Li To: Dmitry Torokhov , Vladimir Zapolskiy , Kevin Wells , Durgesh Pattamatta Cc: Yangtao Li , Dmitry Torokhov , linux-input@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH 09/10] Input: lpc32xx_ts - stop_tsc when driver remove Date: Wed, 5 Jul 2023 13:23:45 +0800 Message-Id: <20230705052346.39337-9-frank.li@vivo.com> X-Mailer: git-send-email 2.39.0 In-Reply-To: <20230705052346.39337-1-frank.li@vivo.com> References: <20230705052346.39337-1-frank.li@vivo.com> X-ClientProxiedBy: SG2PR01CA0116.apcprd01.prod.exchangelabs.com (2603:1096:4:40::20) To SEZPR06MB5269.apcprd06.prod.outlook.com (2603:1096:101:78::6) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SEZPR06MB5269:EE_|PSAPR06MB4069:EE_ X-MS-Office365-Filtering-Correlation-Id: a28b9efc-6846-48c5-b3b2-08db7d18118a X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: gTjlDvBpP3Y+rULRkot0Q9z+3LezZVQexdi8pns/urPY9g2o1Me4fIA1uBvS/vCTdPPUAu0HwbbMljvkWVktWA8q3h1CKpVtp20LslPtMxcJquRXn76YJEACjN8Q1PA9nJLQqIX/5MG0fAjt1OQJzEBzMCHX6TwaJCNI+9XKjV4c+/WCPig+956lWz31EDRpuAzURvAPw4m9zNjVc+I37bE94yQc53No3d+aERfRZLoLsaXXJaMnAW30DDdaoq3bvZ71W8/khMRW546DdT2gf8gudCpVv84UDUXew3nb3tS4RNERpMM4lguhjHnpxBdo/eCgUb0ladEMgW0PGSR5cYtPUJ7wBsc0xysY/NbWX5rbf5914jo/eCYc5+ZsUlfYFC5YnBxMjKIJGV7Bt2OtwdwmJnLHhEU2S3s6OwE4LXsdrURJSnUFlXf9Wl2ZQMzbxuGEOCdB/rGypr35XrhiB9rryhqzzB5xt8aJR5hdtFXF/h77a2D++S/VruqDUuLo101A3fRctt/hnCrfht5iGf9b0Oh/GlfiPl19jWclIghXcwr3Ja2gJCsh5TZ81caXRyitrnwlfNk4n6vPStiU0SBgNx6tNrMefHhn0TtfYWRdnlP92tc+SYLn6FsNiUKQ 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)(39850400004)(396003)(136003)(376002)(346002)(366004)(451199021)(41300700001)(8936002)(8676002)(110136005)(36756003)(6486002)(54906003)(4744005)(316002)(5660300002)(2906002)(66476007)(4326008)(66556008)(52116002)(6666004)(478600001)(6512007)(38100700002)(38350700002)(186003)(86362001)(66946007)(2616005)(83380400001)(6506007)(1076003)(26005); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: j9OBB+iTORszanCCcAbAGgv0hLsKmDgNqZ+gXO2H3ZtEgdHoc9haUBopY4GOFdLTkMgFpDAzrS4po3jxmxNpB/p76ZCTRYjh9WRXdhth/L04E3Lg4huq1opr4LnvNRQ+HDA1FnUAulkOnd2s3nzi1joVi5xBnOWea0bEO3Xf0feSFiLzbkfNMxUHY2i5huFdYU8UsdqoOKM7u7TFqT4hSak9hw4Dy7Qc3GKNlBfLxbjAvm0NMu/7MwUFSfnGeOfOtfvKq9G5z2JeYFkBwcVxOZ0QwAOykDIMYS0PEA2Er8w7M+2VMe0BSZZUND+nx0Jm+JOi+4eHs0FafmUgImOiBKgGrux9a3AXoiR7Rri7AOVRkNynt+3f0CMVUTyqaTUVejYNdEUGEkhn9vjzj5wyAGioNNDrTDzK06FJhjZfozgUmvqOLmVMLCrTgq0dAajwWXW8nme939zf36A6e7Sle/eNifwbwuFExoGqYmndORi2D7vTeiA8+labh+N9EFQrk3gcVejh99Q1eQkxQZsxQT4wDo9vW/7rKDFaoep1EY9TkMk93nMA/jQs+lAxcQ82HqNnt3L93PlGF0pfZPdBQMZrXHv0ruFMajJWUN6wPmmENz7MuNfkfo50cmqBaXyr+nEh/jOhUsx2/Xr7sKAy87lnCl+dB9pI7aCsGvqLVV5mbqi3nN0Rjz/PwAdNLEJcWLbQK/29mPAxyntntZNtYHc0ifHB6NVsffh9MdQS/TPvhFlj2gC86/aXJMZC1i0HMBIzrg6QXI6fi4WWCgfYdmkKE0YihqWbfHuV6FFL2qEMpRUFlDVLbNosjeiaLr/1SG7wsl+qASUyRJK/PEOakAuxVc0iHFiE/l9oc9SsAEC3AJ5dnxt9PZoHtDNER+UnkB6wkQZNuHMCHNbBOfX36Td34BFJQyWEGVv9MZCnsn/Iac4KCO5GChYe9hJ+sA/8InlkVPqp5CVfh0cxdFQhjNdv00lx2kjZ56gSyIqY20ks9NHSrVXA35+jKV1xSCq/XMXSpZdOTNWsHF1uL/3EZ8AjnS6sOBrAS2gX2jVZc3syVRQmx1Wpz+sv6UHh/gvrFQxX0JKm8UaB//4I0SOUbilgWCqqIEJrAVz7pYIYC2uIaC9pwS0KCp1wxtXelmmTTeoENSNyjj6seR2SSE2u2ZIz4vJy2UlJwoqkqR1yaeWDJlaLgdKc8Jps2DbsrRsUTFsmgVwa7RY93HLbv4oqVmSiAYzPNZFof7JZ47J9P1d+tpdWYvvXW95AnhGs002APMEgHBXwedssulRF3uyeSj406IFKzX/L3AmeI2cyiQCbXN6UGlSkTtCsj79jHqYmlit3sbRaXLDyL54bmFvsJ12qAytoOu+8xNr0TLS+MQ+hcGbjsEEY6Si/+F62JyryJVVH8Z/cKAyA7xPdXTPelGlS/7KrkBGZT7w9PVbimvmGtGRjYyDcH+Jv/snWKSukaUE43uI6sU+e6fANhQ0y04d9Gl8CEKLAv0DiwyL+PogmcLH56WOOpSbNKFBQirw2AvZ9vQWNgPaTKrVwZ3OMaMzyvXOq7g9ty54X4crmGv5sSCB4ZALpNrawYIpduACS X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: a28b9efc-6846-48c5-b3b2-08db7d18118a X-MS-Exchange-CrossTenant-AuthSource: SEZPR06MB5269.apcprd06.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 05 Jul 2023 05:24:13.2056 (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: GNTrSr4KgtYB2VOJxg+SEauntF0gBhIhg9isHKG7gRTpn1GteKzap5N3dvtAwQSoC1uhu4UDwkoICtQy5Wxxhg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: PSAPR06MB4069 Precedence: bulk List-ID: X-Mailing-List: linux-input@vger.kernel.org When the driver is removed, we need to close the device. Fixes: 3045a5f5202a ("Input: add LPC32xx touchscreen controller driver") Signed-off-by: Yangtao Li --- drivers/input/touchscreen/lpc32xx_ts.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/input/touchscreen/lpc32xx_ts.c b/drivers/input/touchscreen/lpc32xx_ts.c index 15b5cb763526..ffdd748a9992 100644 --- a/drivers/input/touchscreen/lpc32xx_ts.c +++ b/drivers/input/touchscreen/lpc32xx_ts.c @@ -305,6 +305,8 @@ static int lpc32xx_ts_remove(struct platform_device *pdev) struct lpc32xx_tsc *tsc = platform_get_drvdata(pdev); struct resource *res; + lpc32xx_stop_tsc(tsc); + free_irq(tsc->irq, tsc); input_unregister_device(tsc->dev); From patchwork Wed Jul 5 05:23:46 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: 699925 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 25D07EB64DD for ; Wed, 5 Jul 2023 05:25:19 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229449AbjGEFZS (ORCPT ); Wed, 5 Jul 2023 01:25:18 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49840 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229871AbjGEFZO (ORCPT ); Wed, 5 Jul 2023 01:25:14 -0400 Received: from APC01-SG2-obe.outbound.protection.outlook.com (mail-sgaapc01on2127.outbound.protection.outlook.com [40.107.215.127]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5A4191BE9; Tue, 4 Jul 2023 22:24:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=DXyF+G8knFoXG6iKThUvocFrbOIll35uPdVVyBqYevkclpw1+cJbQA0tluXxYM2+O8wjJPRM1R/INPEG0gZQR4RtcteiZO+GDnwK4FJXlHJ88qxuGNou7DWuH86Qsc8ajvAGWejl3BSVKdxAJBtmKJ59W3JM1EDQLBfseSus03ibuAu1YQHAxmNqyEPXUudAS0TSGL+AA0ulaq0psga0KctrqeKE4WdiJXui5l7Uv/js+UdwNl8Za0sQAU0RzmD5TN9lz/9av60YOGdp23/fxbpVHKn8+8oaLJZ1K7zzW08fe1uayCLVeRM9HCjiwJBnkCD+mwyFDY/Gb553aWxOOA== 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=1CxYlipi5yIx32FK1How3ukb3KrSmIrX38LmE45Mwhw=; b=YB0G+onFVliuZQVE/oF9uOU9FoR1+6V3apWiTOW3h0QvNf4Zv/LPZMgJOP6ORdEgxSTCB0cjmCwtQ1edNNXTycXeCDgdyyjOAsWR/RbLaSHe8hycV76ttBqmYg0EyDxXbNYWe2zjT1p0VD0AhG/US+4C/UHld0ZiNGIFDHBRW8KiKoUHKxWSOcYPVhI/KNq4JWnePiMBs2N5qSFSteE59GEJfpQC1yy1oPA8niNSYhr4fpxrXXekpXwwB/L94X1CVQ5NxNzSF7btyYUdJWms+0tVe1UTpFdMy5BSQM5cfAQn5QFDtSIYmRkbtZStgaw/IbMJghsgQwT+tv9RD0usJw== 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=1CxYlipi5yIx32FK1How3ukb3KrSmIrX38LmE45Mwhw=; b=BKYHWHZ2ju6GlkSKVianvoCMKvhh7zvPFjkv2jYNb/BoRMjxx+TuKnZzhHo0RXKX+b+G+ce61aEs8lsB47sRq17eSRaN4U9UJdgwETEoye1ZhtXebo+CEOyVWNiuaKEXTeSl95MB3MGHj9ucj4o+Bf18V2EbfmCrkPj4lxSbbK891eGJHJa/itOlC2NbHcTTr227QVsIAUxLc6Ozi1LgVKPmmCDlq3RLbIpTPO2ckKkQaTj6OcGHqO67fWs5dFYJOjtvX3aw/UM+RfcuJNo7Ec/6JAWxNulrJRYgU+pm8SWor2sS57UDphbtdTH1j1zghgU756u1Kq6m3uOWY4bjKQ== 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 PSAPR06MB4069.apcprd06.prod.outlook.com (2603:1096:301:37::6) 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 05:24: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 05:24:15 +0000 From: Yangtao Li To: Dmitry Torokhov , Vladimir Zapolskiy Cc: Yangtao Li , linux-input@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH 10/10] Input: lpc32xx_ts - Convert to use devm_* api Date: Wed, 5 Jul 2023 13:23:46 +0800 Message-Id: <20230705052346.39337-10-frank.li@vivo.com> X-Mailer: git-send-email 2.39.0 In-Reply-To: <20230705052346.39337-1-frank.li@vivo.com> References: <20230705052346.39337-1-frank.li@vivo.com> X-ClientProxiedBy: SG2PR01CA0116.apcprd01.prod.exchangelabs.com (2603:1096:4:40::20) To SEZPR06MB5269.apcprd06.prod.outlook.com (2603:1096:101:78::6) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SEZPR06MB5269:EE_|PSAPR06MB4069:EE_ X-MS-Office365-Filtering-Correlation-Id: 8226bfc6-1c0f-482a-5dc1-08db7d1812a6 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: SgYVzOzmI0oD8qk/jgCnyDms3wdaO2xhVpINKSlghL83P6cVTdOQf4hfz8J8bQz+k0nOd8OusVTbSBhAbaHq9yA1sFFdAwdN4cfyucgxXX5g0ZKUdzdABKJYF25NkPn1rkLduIKqWt7GywtXD2tpJIpooQcBSq5X4luye2sPWryoW5ciYXJptydywmdD6byfgSYQoRb9iGWtsHSWRSs0CdxvEkK5hliki5uXZLs4mafMFJWIPU5s7E4BB0T27tWtNfz8CjMTByTCOMFuAyPB9wQBI5KBEfMpdnI96VJPk8U/OLqoRKxYzsE74sm0wD7078eecpFV2Xyrz8BMh9x7OOoMNp9fh5Ty65rQmzWkNr8rMWU7pD0t+o1mhmev7VyMD4IT2LNV4fRO5yOnBJVjIU++nq0D4/VSj1NTIEJ2xor1KVVjJLH5NXTfnqBIe3ooRYsugaop+FbwSYA5iwhceQHu1PlbeZweIgu7OaGivl0TLqfmmOM3xOutnpNMyUJ6aiq92r3nvETPKDhjqFsexMMQ9GqlhkrWvQYKEOh3lxEFVAHn5npCyBnpxu+4zixU+bCbHuEWVPtvBYymi3ZPqmEQiq1Q58N3cT6FeSe2ILwI74ezev6THY1rSlKdK2XL 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)(39850400004)(396003)(136003)(376002)(346002)(366004)(451199021)(41300700001)(8936002)(8676002)(110136005)(36756003)(6486002)(316002)(5660300002)(2906002)(66476007)(4326008)(66556008)(52116002)(6666004)(478600001)(6512007)(38100700002)(38350700002)(186003)(86362001)(66946007)(2616005)(83380400001)(6506007)(1076003)(26005); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: 32ixnQGnDY2JkgLPTznB+WU0PI/sLloebq5jQdVasTiWktGtt0Ii2qv4o2F8jgAKESDobfS70q40+nZI4NBH1x4RUot4W09sJveC9QWwLJP/+q7s540zMlWkE018GBIVurzIIycQ7rnTtghnD2R+h40IQEm7xzNTYxrKOKGJ2RN18Zt1k885mjsEt7Ua05c+4N0mCXMy/M8YIaOwsDAl3dPGqIb1/e0e2prlgasze5bUc4Eiji/gdUbRTUY31crohVfpVuQ6nNVoOmGA/TpFS0MGj5jA3OTLqkKedMDEsBa4S6JhmXFdbVTrsa/rH0ghpAmvc2oYE6T42Cm7+wEkteZ5ez3zd5gf70TbYdGnevUu6Gbkj9vFf9bnljF5wt3SQMaFn0yfidczQR3qR7PhCww3rYnPKv3qmYvAkcxizgolgZCsYKL3lvlEkMJF0EVGXVLfYb0OW5cCbGaBuYsIeyFZfv2N3DRjVdxTg78pX5mEdSlMKEEh+d1qrRZzMTddSTYoqN3rbsWiqiyNvfGV8VdB59RZZ0cLX8V6jzK7ehysMGNwVHfmLAJcsbbOCbbn0DlurgI/VFufSKqxHVFtsF5O0H+hlvZB9ss4jquJTgKJgbN/BMioJBj09g1spFg8czFZxpwDGlLJZvl8J8F5wYQ/cxMwBMCCu4QwFwqdDU8x0om1lW1VM9cXuv7H7vlf25lGYktiu7NTrhSwTuRcFXXZo2wxr06os7zOfbedrHFRyAnZW2ufuWEtuAD/kiMSu58KPCceytRPiyUBTXAvY6hXGatA6ggRmZFH0BWywRhv6Fz4bPclSziDtAEpsQ8TFiUFhUWB5Ba7qII5elFFlTcpJKCx6tZquMltd+ubTV1g9ND+9mLFzqfrnCbeNI5AI/gGStWFNcYA27uRreGLgCSxD76fQEOvMbR5Gs/7P3ByOTDTgH5PnSjeuRGzirtTq+OOdoQTvjfw4hm1XOH7MQxu93RrbfLLV9JLbqWzqyLQUB/MOrpxdSaKtebJp5YqSDTR4E7ZQyKjA/5s/dCI2fSXj02dHLMIex/8Rd7EzsU89qqu95oQXCjCdmjtbmRDsa5d79uF2dGmOrrhIm4VJPnsvnsPKjq2D8d9FhFRra7H2eRe2zpGDt7h040tT6qznk+JBQIWWPvtn+TzHjxFuCZkQOjdx3IIOLMNOPiyc9ldq620R3+9YOgx6DTzGoahXWHWR445Mx5YAiHI1FnFBjPLDttknNt5t/Y4h3XFCmPjSC4wii/jxQ0dMpbFrJhOq7uBn66T1dEaB/NmiHAHuK4aOJzKtJ0t1nuBf/Uf3aGy6mqbjjHcMnL4Wio5WcbFHFHMxvbEqjULqGijZd0qWuu0NIKmg5NyFQsf3oBBH+c8tmPJBdTh87bx/t3Ffw9r3RukqSYCuQYWXPEIegq77O7GgItTAAXiE9uaFREviCmcA3i+XX5X9eWNLfvIe8xSC6gLMABShiq42n9oXXMxL9Jf0v6Wcu0alh2cPjalDqsbopoLUHVmu5hQ+rpERm6RO4L7+QMBLQieREXv3ITyMu59s5aT3JEY2TE7PV6VOICfdbQQHENAxV9QrIJcWXKD X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: 8226bfc6-1c0f-482a-5dc1-08db7d1812a6 X-MS-Exchange-CrossTenant-AuthSource: SEZPR06MB5269.apcprd06.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 05 Jul 2023 05:24:15.0213 (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: UHUydFxrhfKhfAltxvIWmlqn2pBt2SK/UJs4Q9Qv2fDKrBb47QPVoIVL2qtfmTBs9gVM0fsoeAmLSX+1ZlBgMw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: PSAPR06MB4069 Precedence: bulk List-ID: X-Mailing-List: linux-input@vger.kernel.org Use devm_* api to simplify code, this makes it unnecessary to explicitly release resources. Signed-off-by: Yangtao Li --- drivers/input/touchscreen/lpc32xx_ts.c | 75 +++++--------------------- 1 file changed, 14 insertions(+), 61 deletions(-) diff --git a/drivers/input/touchscreen/lpc32xx_ts.c b/drivers/input/touchscreen/lpc32xx_ts.c index ffdd748a9992..d30ce1380f72 100644 --- a/drivers/input/touchscreen/lpc32xx_ts.c +++ b/drivers/input/touchscreen/lpc32xx_ts.c @@ -198,54 +198,34 @@ static void lpc32xx_ts_close(struct input_dev *dev) static int lpc32xx_ts_probe(struct platform_device *pdev) { + struct device *dev = &pdev->dev; struct lpc32xx_tsc *tsc; struct input_dev *input; - struct resource *res; - resource_size_t size; int irq; int error; - res = platform_get_resource(pdev, IORESOURCE_MEM, 0); - if (!res) { - dev_err(&pdev->dev, "Can't get memory resource\n"); - return -ENOENT; - } - irq = platform_get_irq(pdev, 0); if (irq < 0) return irq; - tsc = kzalloc(sizeof(*tsc), GFP_KERNEL); - input = input_allocate_device(); + tsc = devm_kzalloc(dev, sizeof(*tsc), GFP_KERNEL); + input = devm_input_allocate_device(dev); if (!tsc || !input) { dev_err(&pdev->dev, "failed allocating memory\n"); - error = -ENOMEM; - goto err_free_mem; + return -ENOMEM; } tsc->dev = input; tsc->irq = irq; - size = resource_size(res); - - if (!request_mem_region(res->start, size, pdev->name)) { - dev_err(&pdev->dev, "TSC registers are not free\n"); - error = -EBUSY; - goto err_free_mem; - } - - tsc->tsc_base = ioremap(res->start, size); - if (!tsc->tsc_base) { - dev_err(&pdev->dev, "Can't map memory\n"); - error = -ENOMEM; - goto err_release_mem; - } + tsc->tsc_base = devm_platform_ioremap_resource(pdev, 0); + if (IS_ERR(tsc->tsc_base)) + return PTR_ERR(tsc->tsc_base); - tsc->clk = clk_get(&pdev->dev, NULL); + tsc->clk = devm_clk_get(dev, NULL); if (IS_ERR(tsc->clk)) { dev_err(&pdev->dev, "failed getting clock\n"); - error = PTR_ERR(tsc->clk); - goto err_unmap; + return PTR_ERR(tsc->clk); } input->name = MOD_NAME; @@ -267,58 +247,31 @@ static int lpc32xx_ts_probe(struct platform_device *pdev) input_set_drvdata(input, tsc); - error = request_irq(tsc->irq, lpc32xx_ts_interrupt, - 0, pdev->name, tsc); + error = devm_request_irq(dev, tsc->irq, lpc32xx_ts_interrupt, + 0, pdev->name, tsc); if (error) { dev_err(&pdev->dev, "failed requesting interrupt\n"); - goto err_put_clock; + return error; } error = input_register_device(input); if (error) { dev_err(&pdev->dev, "failed registering input device\n"); - goto err_free_irq; + return error; } platform_set_drvdata(pdev, tsc); - device_init_wakeup(&pdev->dev, 1); + device_init_wakeup(&pdev->dev, true); return 0; - -err_free_irq: - free_irq(tsc->irq, tsc); -err_put_clock: - clk_put(tsc->clk); -err_unmap: - iounmap(tsc->tsc_base); -err_release_mem: - release_mem_region(res->start, size); -err_free_mem: - input_free_device(input); - kfree(tsc); - - return error; } static int lpc32xx_ts_remove(struct platform_device *pdev) { struct lpc32xx_tsc *tsc = platform_get_drvdata(pdev); - struct resource *res; lpc32xx_stop_tsc(tsc); - free_irq(tsc->irq, tsc); - - input_unregister_device(tsc->dev); - - clk_put(tsc->clk); - - iounmap(tsc->tsc_base); - res = platform_get_resource(pdev, IORESOURCE_MEM, 0); - release_mem_region(res->start, resource_size(res)); - - kfree(tsc); - return 0; }