Message ID | 20230706101100.75654-2-frank.li@vivo.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:9f45:0:b0:3ea:f831:8777 with SMTP id v5csp2446868vqx; Thu, 6 Jul 2023 03:12:15 -0700 (PDT) X-Google-Smtp-Source: APBJJlGosfrbREd7cprbxBmhzoi1juJj0RBozU7gsaRYAcEN9ckM9u9cG1iWSBFfqnWdRQ9px2ZW X-Received: by 2002:a05:6a20:970a:b0:12c:518:b8de with SMTP id hr10-20020a056a20970a00b0012c0518b8demr779710pzc.17.1688638335459; Thu, 06 Jul 2023 03:12:15 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1688638335; cv=pass; d=google.com; s=arc-20160816; b=hQ7c1afhiFStJ/H0G5yMBwVYsDoqkXaZ5BUeWj9Aih6qWzeH4mYJq0AQP3FI/ar9UC wEDxbogaHQULvU+ORnaxI1mCwH7r7lwxD+wJCwsWjtCYRwo7G5vDrPbWZSf/3Udoptgl VGpPqCEjbQl7fnDjfPzmVcANGxW5pkFivXHklE/o2xqAlgwnZeE3EQK1xfmGg2YxJIXz lu79evAYLJa2lWhEmM2JpmGc0f+8jDtYTL1gPDDjLOZxzgvALxLn/6Digvu5sKA50Ule yZpe3Ueb6xHpgzKC3Bwr+mP/Sb6kzPx+tS+tI1lpgO/Kq4LwaXqfx3UszM6w6F0hu+Ds 1CrA== 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=KTxE+of8wCmkptrxhllbCWnCjYpgayfnaPWM+yL3Y20=; fh=qT1IeUN2DSf0XsMZhLUbcvGUECtFprkgDHAU+OykdgQ=; b=DLyD1rvwEKpfVWr7h5SMFm43hoWLL0OykmlCDOxPYE3OryZRIgWGysc7Fbu4gOROhn 0IJ+vrggJa56LRexDOZA370yb5YWSH31/RHWJU0I6I1Qn+DOAbhtZTN3n1dZLe2QbZqc mjG36n868qZqOjMuevmwXDDDspO5PHw177I8Uk2QyCvVHlTGc5D+quA+0ZY2mU23fKnM eNhCnljFFlJjT2G7uu7l9dCLMJY+zbYyDZNFj9fg6C5kn86elupSn2tfCHIVlHapnnDO xbRO7qM85MnZcjOnGv5tXuqZdv2MQB+q6MG8x5RLRIw+AXOH1KLI/5pXAXrwVlROVrAL rxSw== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@vivo.com header.s=selector2 header.b=UPh5lAT6; arc=pass (i=1 spf=pass spfdomain=vivo.com dkim=pass dkdomain=vivo.com dmarc=pass fromdomain=vivo.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=vivo.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id l7-20020a170903244700b001b89ba798d2si1079603pls.498.2023.07.06.03.12.00; Thu, 06 Jul 2023 03:12:15 -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=UPh5lAT6; 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 S232144AbjGFKLV (ORCPT <rfc822;hadasmailinglist@gmail.com> + 99 others); Thu, 6 Jul 2023 06:11:21 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54910 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231925AbjGFKLR (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Thu, 6 Jul 2023 06:11:17 -0400 Received: from APC01-SG2-obe.outbound.protection.outlook.com (mail-sgaapc01on2106.outbound.protection.outlook.com [40.107.215.106]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id AC08819B7; Thu, 6 Jul 2023 03:11:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=NtLzVq4iFAgT6NbOwDc7YgwAP6oF3MfdEp5IqC6o3JdErynqIvyRZrIS2agC1moV0qwslcl/fgRam9Ph4mqJnsaEN+RUxk+ZiYhvlRmfTj3qibaxZjXfKYqNWqfqLt/rXorxIOk2AT3SyamCOZizyInz6CODSrwDEZXkoOynk0mxR8uXVuuO/sCpp4QmIgk8ErkTxn/wRntMXn2t1wHUFk+jNwX2IQy+7wYqMtTazvtujVLn10WOsi5tzdN71gNuMVg/IdinD3/yLGuDF6ig/HLoJFOfyjnugg/XnFjrXMokzEEpnmlaVpYTlNQtk3UwDo7hJBCOpV1MoLEn47Q2yg== 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=KTxE+of8wCmkptrxhllbCWnCjYpgayfnaPWM+yL3Y20=; b=ZBYv+nJMnzn2SuRSHp7xgJgdnONZdJYpxv71gHzeOCZfoa1lrXKKVgwdxWk65sbNnl7KxG+o6se6ZgYetLrFbdzsqaRn3nvGzJI+zx/XUY8gXQZCPeHn7k/Sv02RwKgEUgvTnXvD2FdLjlf5hMjOt1y3S3nzJ72zvmHtTwzPchVli0mq/pvFzAjS8g8wdwRFVqL1alGjLbK0Fc51CIVnSaW2Omsv9X5oT77qhLN2dH4jtt91nIXep/CCI7N1OQxAHKez4kaM3q9UnXFJN7xVCCtL8/AypAxdLF7S3pg67Tmi5tNFYqmpO8wQGwf0QnlnIEIGZo1UCowMpWRWV7RMGg== 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=KTxE+of8wCmkptrxhllbCWnCjYpgayfnaPWM+yL3Y20=; b=UPh5lAT6oWMdrN3hqQPbhQN8E4H+lVVPWYhsj9K9g/jusyao6oISkQ76aTQoDT2HBDVABRQvle2wYTYGBei0L47WLDSRqIXA9DFEczoazgJVdX4WmNrStyhxOvYQWtt49jluZ+HEUzAir7Ajhib0bUXzLi6brt71ZfxfZmsx115H5SmZzY7Qv5T8NjLiBPq8vR5lkoQ8Dn35kMWoCM5dlt2QBG+t6lYNnVddImxxhdDwWV2CdOulnwNGYj5k2E++broU5M+CsmME+spHJDKKWs/QGXOxeftuC3fiwTOmYvnx+0eycn4fzQ/oXC4fZQI/kh+7I6sDmI8LiZQOhIl/Fg== 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 KL1PR06MB6447.apcprd06.prod.outlook.com (2603:1096:820:ef::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6565.17; Thu, 6 Jul 2023 10:11:12 +0000 Received: from SEZPR06MB5269.apcprd06.prod.outlook.com ([fe80::fa0e:6c06:7474:285c]) by SEZPR06MB5269.apcprd06.prod.outlook.com ([fe80::fa0e:6c06:7474:285c%5]) with mapi id 15.20.6565.016; Thu, 6 Jul 2023 10:11:12 +0000 From: Yangtao Li <frank.li@vivo.com> To: Mauro Carvalho Chehab <mchehab@kernel.org> Cc: Yangtao Li <frank.li@vivo.com>, linux-media@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 02/11] media: pxa_camera: Use devm_platform_get_and_ioremap_resource() Date: Thu, 6 Jul 2023 18:10:50 +0800 Message-Id: <20230706101100.75654-2-frank.li@vivo.com> X-Mailer: git-send-email 2.39.0 In-Reply-To: <20230706101100.75654-1-frank.li@vivo.com> References: <20230706101100.75654-1-frank.li@vivo.com> Content-Transfer-Encoding: 8bit Content-Type: text/plain X-ClientProxiedBy: SG2PR02CA0093.apcprd02.prod.outlook.com (2603:1096:4:90::33) To SEZPR06MB5269.apcprd06.prod.outlook.com (2603:1096:101:78::6) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SEZPR06MB5269:EE_|KL1PR06MB6447:EE_ X-MS-Office365-Filtering-Correlation-Id: 367139da-5ab6-4a93-904d-08db7e095382 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: c24gtkZLe1g+6RRN1TLfsmSsr2qmeCTRFz5l0wn5p8l7/rVb7sph3Ov3aEGRPhIKgMHcWCBcXyjpfYTvL6kvCd4j/aq1QA7I7G3RQuyTJ1xlVDZXfR68nrUIoEu9KAe5uXoEB9tGFb+H6/hgbysGZ+mBfHHBjh3/bkYHYa0oLXtvZwnFZ9TAshK7BN7ElDhNe2Xikl+nYfReY1Qu7jsslgU2/rTa05UH6KGEgUPvjtiGme8sl9Iqx8FjL8lf3xfBSIcx/oG2LwE3q7y5w7yVpkqnFbFW5wRksdCN0Of2648cGCXt3n7Tc6tQKnWae6+uvR2IPiUeFEtvUCMbVg+i6GINXHYbQHbweze9ynBJhSXz+KP4PpOleOOSXtrY7whi/DQLBkXmfFQXZK/7LLj+XGi1OjLg22/LXWnCEhz0/FqZ2fkY0JT2PVCZzxkbujqQbXDjktB73seqwA1cPz2uE4UoiODo/O9BgLVat5i32hB8sSy2UFBr1kVGC+ldhqlaRn20LLSMm0ZB2OcHM5Glqie2ZNTUGZTBECQ/M0elFUvEcJ3JPkvqIRcluV5XUbkvyqw/EoaHMH+G2Xh/AUK9ct/xRB9TRa68mwWIoYDAq1pHT7GS+mJEVdveqdizfuNC 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)(366004)(136003)(376002)(39860400002)(396003)(451199021)(8676002)(8936002)(86362001)(2616005)(83380400001)(38100700002)(38350700002)(316002)(41300700001)(66946007)(4326008)(6916009)(66556008)(66476007)(36756003)(52116002)(6512007)(26005)(6506007)(186003)(1076003)(6486002)(478600001)(6666004)(5660300002)(2906002);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: wkO8tZFsuo6J3ea39VvxaFrrEb7s8ZVlGxyqk0lDungGYZtl8piCv6/6Ab1oaoJc6aRrMhTb5slN8XSpZOp0PZwVufibC2H4m/RvaoTaj3/z2tEQmYDqo/R15C+63Y2/HVuXNDbVFODLeo8bd7Tr0m5ZRG1iq4HSSMPgwdznW7zZD1SX4JX1qruGz87hxH+apM6GwtPDuRj5d5R+exAwTmi2EOR7KLeJvk3KfPUCVqDO4ZdlXV3EZ2MBmKqaBlD+lQ+i7ZyueRoWpaWMTT/kCnNYo7m/u4kIJbJDXD9/70hzh2e5697S3NJodCeV4OMlDjbBZBHzgXIELPraQ5VmtSOrqBtBaRTMlrZnrPb1pACVKTxdregXE59UF0WlHIoRZ1MNJK5oz3Nj2TzXq0yEyAMS2Ze+iyAWGAA6wLoROc7aku3UHxjlAto8D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XUTG9z5Xc//AO7z8WfAQXVs0++ELqLR6Z2N7O4UBBv21xdtGH4P7GcFfVbV8iZSPLZLXaj8pOUmNf9ux3L X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: 367139da-5ab6-4a93-904d-08db7e095382 X-MS-Exchange-CrossTenant-AuthSource: SEZPR06MB5269.apcprd06.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 06 Jul 2023 10:11:12.5299 (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: He5Rd9GOoAJe4gwcp0vEjcsETeTNoRgcqr7EOLUVQS+KgxWbIKsPx5ybXD0vmo3+9nAhTCD9B4RnWQg94g19Rw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: KL1PR06MB6447 X-Spam-Status: No, score=-0.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2,RCVD_IN_VALIDITY_RPBL,SPF_HELO_PASS,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1770665631265642634?= X-GMAIL-MSGID: =?utf-8?q?1770665631265642634?= |
Series |
[01/11] media: atmel-isi: Convert to devm_platform_ioremap_resource()
|
|
Commit Message
李扬韬
July 6, 2023, 10:10 a.m. UTC
Convert platform_get_resource(), devm_ioremap_resource() to a single
call to devm_platform_get_and_ioremap_resource(), as this is exactly
what this function does.
Signed-off-by: Yangtao Li <frank.li@vivo.com>
---
drivers/media/platform/intel/pxa_camera.c | 17 ++++++++---------
1 file changed, 8 insertions(+), 9 deletions(-)
diff --git a/drivers/media/platform/intel/pxa_camera.c b/drivers/media/platform/intel/pxa_camera.c index 9ed3c2e063de..aaf83e515ff7 100644 --- a/drivers/media/platform/intel/pxa_camera.c +++ b/drivers/media/platform/intel/pxa_camera.c @@ -2274,9 +2274,15 @@ static int pxa_camera_probe(struct platform_device *pdev) int irq; int err = 0, i; - res = platform_get_resource(pdev, IORESOURCE_MEM, 0); + /* + * Request the regions. + */ + base = devm_platform_get_and_ioremap_resource(pdev, 0, &res); + if (IS_ERR(base)) + return PTR_ERR(base); + irq = platform_get_irq(pdev, 0); - if (!res || irq < 0) + if (irq < 0) return -ENODEV; pcdev = devm_kzalloc(&pdev->dev, sizeof(*pcdev), GFP_KERNEL); @@ -2338,13 +2344,6 @@ static int pxa_camera_probe(struct platform_device *pdev) spin_lock_init(&pcdev->lock); mutex_init(&pcdev->mlock); - /* - * Request the regions. - */ - base = devm_ioremap_resource(&pdev->dev, res); - if (IS_ERR(base)) - return PTR_ERR(base); - pcdev->irq = irq; pcdev->base = base;