Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp28564562rwd; Tue, 4 Jul 2023 22:34:14 -0700 (PDT) X-Google-Smtp-Source: APBJJlG/1ti7x1hEKzJEivHqK4c3ypli7gfVU+qEP10hBpS9F9slsQeLjAJJtU/Rr2mIRTAxOmTG X-Received: by 2002:a05:6a00:2282:b0:668:7325:e184 with SMTP id f2-20020a056a00228200b006687325e184mr20438992pfe.16.1688535254013; Tue, 04 Jul 2023 22:34:14 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1688535253; cv=pass; d=google.com; s=arc-20160816; b=T0kP6VtbRIZehxYb49fp9GplLa+i7KH1G/Jkd/LkVK61J1oF/7tpQIXu0wOhsjp1KE EBKPYxx+KXJbobn4lcF+TFEtW/QTBaIOwktZqpARoPG6jB5BdVpzzrjWHOvePReyb/Z8 eufAyy1SlTqQqARBQytn56mx4TDAX7dXKmHpWjI08CgKkSwCbv6StqfGv+RynU4cawIp 9ewnUYfAg5weUGz/6jgCPjFd7WU7jrOD8h9utB7mwTzOcaSN67ZPKAojSGU+YB71LWgL agtYe80LkQe2fQg+OPljJnvZwKhP6ssJWaOEh5RaY+tqAujd4PqSr1bxqy/Cklmbo7vp vBLg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:content-transfer-encoding :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=QvLMOax5iZpOte/zpQRvsfnlAHHKBS+sP9SMT8riXMk=; fh=f4W47Q/0JIN2nHF61H2txayz9RPwbN+VGFj9xDyLUfA=; b=IJo17ZJsiWTwV0RlKilOFjk01AYKnGCWRPcDFF8zf6C2bxV8GJ5fsDDdffOQFAXeTs QVb4FNs4rCKxEwqhqeIQ6oPO7rJiN8Wu2G1DKfamuef7EUDZf7ErXj4HBZnsUsOUy75w eQ7hxv91xpha4BR7lz8pNIbVE+jZ+go2of1LtRANMX5zpGJZZ0Y5M1iTq9Wm/uv/202H bVK/58hael/sTarFsq9Oq/KrE+GbffkclOJITQ/z1g7S4xXFy1408MzOEsaS4IN3InWH FfseKlj6RB5VbLLKsdMjLJWH9ihrhPmnOrk1QvNwjmnFzVAmDxvg2bkpgD06jcvQSaWG w9xg== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@vivo.com header.s=selector2 header.b=Tz8EoWAs; arc=pass (i=1 spf=pass spfdomain=vivo.com dkim=pass dkdomain=vivo.com dmarc=pass fromdomain=vivo.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=vivo.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id ay9-20020a056a00300900b00682ad3475e2si2263448pfb.207.2023.07.04.22.34.01; Tue, 04 Jul 2023 22:34:13 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@vivo.com header.s=selector2 header.b=Tz8EoWAs; arc=pass (i=1 spf=pass spfdomain=vivo.com dkim=pass dkdomain=vivo.com dmarc=pass fromdomain=vivo.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=vivo.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231421AbjGEFYY (ORCPT + 99 others); Wed, 5 Jul 2023 01:24:24 -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> Content-Transfer-Encoding: 8bit Content-Type: text/plain 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: =?us-ascii?Q?NOBCaci6e4dEZGbpqxgF8wX8fc45OKAjNXF+Es99BHwFIAJ1g/T4NKXBruSn?= =?us-ascii?Q?d6Yr5MP7a78Yqc/EZI/ifCSru4kwAUVV7y00uJaLgIurGedQT7456tbIgdN9?= =?us-ascii?Q?fK/VOCMStXjen976VZBmhMW0yR4sqwcKIL3W6jvPR0AOY1HRzFu1u+/dbOhG?= =?us-ascii?Q?tADyNxVUBfxeUgNIJ6GLKGBU6i9thmhj2etiDGiN3h/X6V+iychn5K5AM2RO?= =?us-ascii?Q?MFu8N25PRMNK6Ag0iJ+QeaqZLGbaaIuEQ5mtgOO4vPT4rxDBq/070Ls37qHD?= =?us-ascii?Q?A9fCkU6Tqly30B546pRO/uQLmCwjZR/aF5TFqlcMz7YMAv/4GUeQDZiklD/e?= =?us-ascii?Q?2oHec7IX6yPwTQM6K3qq9eOAAfA2xG0lDII/OAX8FKWnAB6IRBQMZy31cocd?= =?us-ascii?Q?SehSZdavNkNbe2PDqtO1JTGL7uyWgr/r3DRrFRX1LKporjjx9mL4xkboGztd?= =?us-ascii?Q?0pERjWnei990xD2M+5TwCCOUZ4755FVcdne48a4poHYuJOOVF+61u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BfuYdPY1DFNr6hoTFPjXSQrTEWwkm+vfeq6nbfWIVp?= =?us-ascii?Q?qKC4Ab+hBY3kSHod5yzTBLPQSFsdtxheN1L6NBhgwGIx9vLJrHSzoIhLUiHJ?= =?us-ascii?Q?s+DT+aNnTS3RZJEh7qhuCCUVUkzM/uV7n5WRHotd3Abh2DI0F1YeCLfK7FIB?= =?us-ascii?Q?KUHH9OuKShiKaNDg0ljeC3cNDQPXirhnPLieWGpo?= 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 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,SPF_PASS,T_SCC_BODY_TEXT_LINE, URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@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); -- 2.39.0