Message ID | 20230706101100.75654-9-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 v5csp2453907vqx; Thu, 6 Jul 2023 03:27:13 -0700 (PDT) X-Google-Smtp-Source: APBJJlHFuXCoDjriaKZQCcX0y2YMiNpoauqWZUmNTWdDWrQO9zZYLSX/oBY8gjVK5qno0F1urXbt X-Received: by 2002:a17:90a:8007:b0:263:5d25:150c with SMTP id b7-20020a17090a800700b002635d25150cmr862837pjn.29.1688639233251; Thu, 06 Jul 2023 03:27:13 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1688639233; cv=pass; d=google.com; s=arc-20160816; b=A3Kt+/d1bfxJGSxuCNMcHYE5oa9jXtlmN8u8f1pMe9yP1DxIIk+1bSstCRCA5h6Y6d srijWJf7PBrT5AKn9duJO0VcAo73TsiICeKZDLHykh1H9lwAcfA4ZLbkLWmyREAVVGrn FMo1GtNlwYy8WGxIO+y8UCP1RpzyFzSEZWWsIyhfvGbTeXEr5Votfc/jduBAy07efZdc zlb/Angbf1ovIcJSVwUFzvk/1lHYbsu/vasm2ZOUcUPc/t+n71DF5ttjY9ha7OHqpknW l8DKw51LEhfoznpkNXvVcsax3K7uEuM2/rGyJaSJXgykfjh3STxfsy8d4P+oTzXgkVDU HAxg== 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=AzQdBwm0YUNBzjmo8D9Z/4M7Py45GLerlbZjZIF7NOA=; fh=rEf1l8h1ePLC155Qn3TFdcbBDnc68XQPbd8rBx/dzWQ=; b=p2NkKyEexy4+n7ZJ+5+YdKM24B3BcpFcSpmdhtRt8cl7Iuo3pueAUqd92ZOiWOeSBP GrIWlRpM0me6h5xN6CHLLT8qD9qf3EO4rzGhsU3mGQhb2tSYUVyhMe+7NdJkk9GxpKUo 8dik0UEQq2+trlZ+Gcnn+6y4otf9DcwXb8xT5rY88a9KMj2fK67WNJisc4jClpz2Yi3q 7q4TbcZJ6/qW6hVzborWjRORFvFl4Nl9ipWnmA2WLYxnt2JdJG6yRJbQ5RMGYWMhCHHS b67LsI12eufgks1kZJBCdMYvC9BpbVULUrTYJ3QD91c09qm+QUgPWaHsbhoCnD3VNLsE Ytxg== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@vivo.com header.s=selector2 header.b="pa8rs/gJ"; 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 pi6-20020a17090b1e4600b00262d692db39si3921628pjb.12.2023.07.06.03.27.00; Thu, 06 Jul 2023 03:27: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="pa8rs/gJ"; 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 S232473AbjGFKMD (ORCPT <rfc822;hadasmailinglist@gmail.com> + 99 others); Thu, 6 Jul 2023 06:12:03 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55390 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232329AbjGFKLm (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Thu, 6 Jul 2023 06:11:42 -0400 Received: from APC01-PSA-obe.outbound.protection.outlook.com (mail-psaapc01on2135.outbound.protection.outlook.com [40.107.255.135]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9D0941FD0; Thu, 6 Jul 2023 03:11:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=UC2vVQmnyOB2S5WvWEtf4F+gphXhwB3aNdzamuvR82U6Y0TrNYI8SilwJKD074eExmuO/dKHPm95OmzZWWDvfBooepXuzoA0E0MW+EUS/kRt/Rktz72kehtwpp1ZmQKacWxyRTjfdfGY+ZKfBJTnllzRq/TVuJVl4bCALsWbEGAPT7ggAwyTz2JZ9/yGcYoUwPBkGjnozDrzqMW/J/J0b5ZemkSctHLS4Sm8/pwMxOnqsrmTyQ73qWH/vpwWJFFENQXYdgkMmmev3nnHX33kvQ3F7OnxZgkmTdbk9Wbxyb/8559em9OJfvDZy3XjJb5fJ/lTtz9WHMMAx+TP+x5NxQ== 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=AzQdBwm0YUNBzjmo8D9Z/4M7Py45GLerlbZjZIF7NOA=; b=HXpRvzWEDfOPlQl6DBrxUqd/fq8IrcPNLvz0kteAOqvlYhNzy5KOChEyxdSH1gFLoMJNHsXz/ftFsjAu+JvCbb0PyqSarcCUUs+jcg7P1nhGgiwX1k6D+XQdkrC0pYgNpcSHbK3xmYQx71C4GkMCUBenLxauMVqh/+ltrhk4CyD3VRbU/UBZfU0UDesqh5RxYHd3ybDXJW8zZTQzeAVTXhzfwL1Q38m/XjPNTb9732FCBsQsYHhAQaJSscROSKMqkym0zTDPHq2QHqQmQRfRoCFCWK07m99eyItmRO9KeSCoZsNRt3bUNKaTEwhxnJ8q3q9ES2jpiIlait6jdm79nQ== 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=AzQdBwm0YUNBzjmo8D9Z/4M7Py45GLerlbZjZIF7NOA=; b=pa8rs/gJrp2BYSPaxJ9juO54ebwaJHunTSLAMPcCS37CdJ4goO2MyZ+o3A2YR2LCHFxSB+71/u15Hyahlwy0i74N3+rw+7abGewBmUVDSwJbkIKEEaaqC0RRSwNiQgakFQbpng63onocqEtKOm50zWx6haecTETj9QvA9FXyN3rvJPjm6X1h05bEXln0E01ZFuzW3bIplzsxiXhY5hdoz/eQsqI6s/LweO/z/akjGJqi9YfzcTNR3M6XR6UEInGKfXEa7SltOBs/1UlhNDj0g+mAulOEeEZtbMp7RDok1eyGc9l4n0Y7cuS9Xjf2PdiVaZEkM3Vq84RXIh41YwKksw== 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 SG2PR06MB5287.apcprd06.prod.outlook.com (2603:1096:4:1df::8) 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:26 +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:25 +0000 From: Yangtao Li <frank.li@vivo.com> To: Laurent Pinchart <laurent.pinchart@ideasonboard.com>, 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 09/11] media: platform: ti: Use devm_platform_get_and_ioremap_resource() Date: Thu, 6 Jul 2023 18:10:57 +0800 Message-Id: <20230706101100.75654-9-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_|SG2PR06MB5287:EE_ X-MS-Office365-Filtering-Correlation-Id: c86a02ae-bddc-4c6c-5b02-08db7e095b6a X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: bgyFfyfT4OpuNf5jST66GBleoUQH/3+LLRvhkWdY/4epBEn6o7urpT/XBAQeW2GIjvBZrzEa2reuu/2AqyrmCl94/AXLpqigP6inMrycqneHWd21eiPhkF24NFHhPdeNn2YuImN2USVOwL8kmxb/tahTV0e/ghIfsfDLQYxOitNCiFDzzdETZIteFErnRZvveyCPI7uFHHEKrmaqW3buhrgIIR6PT9pBtHzuKtjVbT7LB6LKYLYosAAZYKQS/xs4v4VQbrFnzQEqxVQIvqzoZ8ZNyX735RLXVi9jQgavGMW17Z0rnRLS+lMXdzhANCJu2PIKMJE6e9938duq2M9anQ6QkyZIxQARHX0dRvNTZ+Toika5PeQwnmkCewIjRg+u3WYIyPfhBsssv3KP+U+o37p4b4zDvLYq20v0DC7Pj95jbRDJpz8mnvAoNa1JSGu2nhbUZ4/yqjhdDTMj6ehyBq9ZvT6TbNVOtK8Vbo2OPPSbsNzQORZF1qCIABn6pRXvaVOjjkNyfhuFGvNvkJZzFs3eMO6PQ32KFlFDD0lFNVHd1OUyKwE3BXRnBmMmLcYQpUQFDvVs42psJ28pUd6YaRtDeMTfYdMc+8VF2wRSiCY+q0UfGRzcGDPxAfkjfTue 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)(376002)(396003)(39860400002)(346002)(136003)(366004)(451199021)(2906002)(86362001)(8936002)(66556008)(8676002)(2616005)(6512007)(6506007)(110136005)(478600001)(6486002)(1076003)(6666004)(52116002)(186003)(5660300002)(38100700002)(26005)(83380400001)(316002)(38350700002)(4326008)(66476007)(66946007)(36756003)(41300700001);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: r2amZgof/gTEM55XNfu8kAUSeC6FGKJaeEoYBaV/Cp+EWpHAjBpixnZlOo0kOg+YhHHecj/zZaySsCgKj5gap/jkbuQ2/iQv57vYcgqGLd67Mqtd869LMbxC3x4iR1DTokg3iWE8i4AdvrWsf5LXhtn/t/HUXEzr+jyfzu/ArNcVtby790nRpiQYWb4yciC+LoTmtv+Xyxzpe56D+MzuyZ3Vmw0M8uasi4nsuHMIzLv4ILvMsbbZ4ybvhhbVok82B+hgUMTULSJ/9rjYN5MAfCb8ceGQDonEyb+Gga+V7SX+M1B/lttseBT8i0K0Uxl78JZdvJw7a09qH/6qb/HIedhzZUONIUp/rVcGHQxr0STjRR3QDbbwxr0BSXGzlaNXg5WVZf4FXZz460DTW6kTm2QeE+dN4N18yJZ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YginFdDQkX9Fd2EwY73ng+t/Aien4EHI2KUisJhISQxHl/co5YzsnV2QEnY5Ner6RewWAc5jimGS2naCacWk0fN8Q4+pxZH6rchcr9y1QmZ X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: c86a02ae-bddc-4c6c-5b02-08db7e095b6a 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:25.8583 (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: glAEzU6Oh10z/pZMZu0UJdCKQtThuE33e9yz0k5nzjznZhWpkOHP5f+JA7XlstoeFcqPaj8EjEQRMKv6tzhiBg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SG2PR06MB5287 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 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: <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?1770666572906253209?= X-GMAIL-MSGID: =?utf-8?q?1770666572906253209?= |
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/ti/omap3isp/isp.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
Comments
Hi Yangtao, Thank you for the patch. On Thu, Jul 06, 2023 at 06:10:57PM +0800, Yangtao Li wrote: > 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/ti/omap3isp/isp.c | 4 +--- > 1 file changed, 1 insertion(+), 3 deletions(-) > > diff --git a/drivers/media/platform/ti/omap3isp/isp.c b/drivers/media/platform/ti/omap3isp/isp.c > index f3aaa9e76492..1c8e4ede29b6 100644 > --- a/drivers/media/platform/ti/omap3isp/isp.c > +++ b/drivers/media/platform/ti/omap3isp/isp.c > @@ -2329,9 +2329,7 @@ static int isp_probe(struct platform_device *pdev) > for (i = 0; i < 2; i++) { > unsigned int map_idx = i ? OMAP3_ISP_IOMEM_CSI2A_REGS1 : 0; > > - mem = platform_get_resource(pdev, IORESOURCE_MEM, i); > - isp->mmio_base[map_idx] = > - devm_ioremap_resource(isp->dev, mem); > + isp->mmio_base[map_idx] = devm_platform_get_and_ioremap_resource(pdev, i, &mem); I expect Sakari to prefer a line wrap: isp->mmio_base[map_idx] = devm_platform_get_and_ioremap_resource(pdev, i, &mem); I assume he will be able to change this when picking up the patch, without requiring a v2. Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> > if (IS_ERR(isp->mmio_base[map_idx])) { > ret = PTR_ERR(isp->mmio_base[map_idx]); > goto error;
diff --git a/drivers/media/platform/ti/omap3isp/isp.c b/drivers/media/platform/ti/omap3isp/isp.c index f3aaa9e76492..1c8e4ede29b6 100644 --- a/drivers/media/platform/ti/omap3isp/isp.c +++ b/drivers/media/platform/ti/omap3isp/isp.c @@ -2329,9 +2329,7 @@ static int isp_probe(struct platform_device *pdev) for (i = 0; i < 2; i++) { unsigned int map_idx = i ? OMAP3_ISP_IOMEM_CSI2A_REGS1 : 0; - mem = platform_get_resource(pdev, IORESOURCE_MEM, i); - isp->mmio_base[map_idx] = - devm_ioremap_resource(isp->dev, mem); + isp->mmio_base[map_idx] = devm_platform_get_and_ioremap_resource(pdev, i, &mem); if (IS_ERR(isp->mmio_base[map_idx])) { ret = PTR_ERR(isp->mmio_base[map_idx]); goto error;