Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp28574686rwd; Tue, 4 Jul 2023 22:46:23 -0700 (PDT) X-Google-Smtp-Source: APBJJlH+R98v4nbT7qYYu3+vACj3AzuvSKPfAF20jwQQi6QjxVxwL56Y9FjmsM2VYk/lVc2SqmfK X-Received: by 2002:a17:90a:684f:b0:263:f5a5:fb98 with SMTP id e15-20020a17090a684f00b00263f5a5fb98mr240144pjm.28.1688535983690; Tue, 04 Jul 2023 22:46:23 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1688535983; cv=pass; d=google.com; s=arc-20160816; b=kuiQwxFSyyKG3oFsXHLFxWyzLQNJDaLSmd4TIN/p710erdTnfDXoNE8dk1Foz+2Vz7 KKF4lOrYMtmmB6PS3mEV+u0a7YerIvtt2lFcS2HR5Z1E/x/y10LJbRqam8JrMJqKAotf QUo38UGNu7psx9uUNBs0Fst/rMYo8G8iRj9cBGE5XIWyyBuVrkqae+bSiO0RBPR2tPTR KpQEuxwa4iet2OLA7NFT+Uihu6E1j0nOJJ5pl21poKKTU14+ob7kpcyMBNpxMn6Ik7Iz QsHAacZ59d+lYe81e6k2/yeoKI4vTkQooqdRfWjj+7AvkuInFiqKaaKX1Hse0PgKVkFA ii4g== 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=CqIvxRCY7UWU70MClQClduwmQVt92UZpYY6fX1yYh7w=; fh=JUedBQP3ikZOTfEcLZ/CwQjRcEaMwBzK/5fSDUEaspM=; b=S6TuIsCrT49Am8vxLJhHngc8Td26aIE1IXGZi5qPWSrNArQlCZWrdwYSewymP/hFij 0F61wImdy8HdSfvpHCxGhj1brLqALIomeGmTmbQIC4bWe4Az1eD0IYDrnyLal0UNDl9C d0QLEymPWYnc2SEQRQc3oE8Z+LKFm91neN+QSkNDbgybr05zPW5lI0vkp0Aq157moG8r eu9TtPdTGtFJxiThbg9F8mDI3aEhhWYY0sEPqBhPxqtnSRKHjayq2TaV6ozj6NWd+9jF u7ssJL0q975fSnStPWVUIDKJ6tLk+gdqIa2dLvVzLqdJRY9oosSk8TxuMc0x7/R1ulIR f9Ew== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@vivo.com header.s=selector2 header.b=C0RVi1KQ; 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 nu4-20020a17090b1b0400b0025669d0176asi1046203pjb.134.2023.07.04.22.46.08; Tue, 04 Jul 2023 22:46:23 -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=C0RVi1KQ; 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 S231130AbjGEFYO (ORCPT + 99 others); Wed, 5 Jul 2023 01:24:14 -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> 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: 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: =?us-ascii?Q?r7ubGH41LHe+Q8dsDJslC4vhTjvDGtYu7mWGx1B71HyDUdUyqi8N9pZDuvh8?= =?us-ascii?Q?5KsgWEnWniYTZ55Paz4kcEsxdtxVzL6B/tjhzABPDXhwNqbQPyvSBw6H7skI?= =?us-ascii?Q?V4E61PwwrBlOiv8kQiNvJviO6ppDodjfJdELLdAkK5UauCzhnXcknL9duy0v?= =?us-ascii?Q?1RaUIK2w8FHQxhFAP+EZ6jFp/KT7xqNqSP7zbYjB3Blgk/tekkhR5Wi7aLVq?= =?us-ascii?Q?qIpb/weUTuo3OqCnw2elDMhWn8nNnblM5IPlxxZDw2PemJIDFTLLfLU/VRO1?= =?us-ascii?Q?HyZS4beqpdmtcSvmhtzk4pYnXQ+lQ4/uXFO1GEIPioz+iTaOa/3xonFBxUgF?= =?us-ascii?Q?7I3D+P8cfRpRPFAXA6/xqsqvXgKzvSAC4aOFgdKpN/fhUrUhLHtCDpvr9Vi/?= =?us-ascii?Q?daKIQdhKizUUnGU5zTDSqq4wnRQzaQzkSpSC4YCSZgvR/3tAz9nBGRNcMCox?= =?us-ascii?Q?0pt4P8KrffTzyqEwpOOvblEiN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PCVa88gAapDhJfeaK0Qt2XEGnp5rNFn3eb/FrdYo2WwHEIGMYs9dz?= =?us-ascii?Q?+oeayy2FfOu+6UavmSBba1ki9XGE+/CqeQ2Qhf9dlUG56pij1HPmdRefp4Gp?= =?us-ascii?Q?Isv9IpAPTbhMIAMQf9qyrog0tSMao/OU9xDyxvPpNAZHogn8b8Q8g7szzFBR?= =?us-ascii?Q?6q4Cl+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 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/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); -- 2.39.0