From patchwork Thu Jul 6 10:10:50 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: 699959 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 92269EB64DD for ; Thu, 6 Jul 2023 10:11:20 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232022AbjGFKLT (ORCPT ); Thu, 6 Jul 2023 06:11:19 -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 ); 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 To: Mauro Carvalho Chehab Cc: Yangtao Li , 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> 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/HVuXNDbVFODLeo8bd7Tr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G5rnLYZJtDz/077RmXin1k4pDw+PHO7fz49C3SmyM8GOkMWOws3vQp4kgKl4AIcG3GL9l4kdHHUpqfRAanlET92TUCTh8RV+Uu1z5KkKcJWQK2UYSoetJGOna+okW0MO0LkPWwxX4n4I7KHGOEtPOXlKfStt1iQwbnrOHVKoxWSTM71GyM2NckjDle5bPch1tgXtPvEdwalo38vdeLwNZGT9f0Le8lYFSbR7TjFt8lwQ8BY6WGmHJOXzjc+WQCG1vNBBewAHE1MtE7Dme2GQXv/Qe8k7qDGR0skL+BJVDG850PXUTG9z5Xc//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 Precedence: bulk List-ID: X-Mailing-List: linux-media@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/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; From patchwork Thu Jul 6 10:10:52 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: 699958 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 E4B5DEB64D9 for ; Thu, 6 Jul 2023 10:11:24 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232173AbjGFKLW (ORCPT ); Thu, 6 Jul 2023 06:11:22 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54940 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231956AbjGFKLU (ORCPT ); Thu, 6 Jul 2023 06:11:20 -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 0C9851B6; Thu, 6 Jul 2023 03:11:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=PCbXLdwEhtyFLb06XBQ7l8yjZnXSkyfFpPuOxmEIdONz9FRv5YhGy3x5WR78hkXPHwG+seZFAvnb/bmVs+559iFHtZkW90FqQPrFIH7EamAZ2gQz0vq1ZPdiHr2oyIKfuUZjUl2EVTnxNWXZjlCv6P5u+ZEq2mktomkJV64NwZwdm8V3enczf1jWMlQc/XOBDWJqRR0e0AUtvVOZP8ztfw6EUjuG9TIFA/RUfztZLzlZh7SRvvX/kNLB/OJSE9dkUh1Y6P8anUMh9SpFN6kFHFEQjeGHGx2pEItJppQ55Xcu+rQTUo+Bk3437odIoPbDxwGan9zKz7w9a2c+PPv+BQ== 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=tfouEtqZ7uS6ZOcDGWijvrv3iSSdFp2d2nCGg6/ubeI=; b=QbGZmM0kK0PfFF/NBWUSPgkf9v/t/4X9FZ4/UA+lSlYwWzE4M8vup4B7Sx6uOYVNoxEmWphtucCsRUdk+NxjUw7QNW69lPvVYwGRksO6ft95c30zWER94ny0f6o2VM1YjKFlADeDXnAlHdVDBpELnaOtUna4AmxOxOrmBZaul+ruL6Gz7M8q87lrZEdrTX6oZ9XEsvSKQFzgbSNjWp66Hmcfcjs0wtejgY7TReuBhb7XxKTTWSnZLG0kKljmjxtRGTAw3XwGwGTe6r2i9VxxDKd2SvhMMa1cqEpG0IJmVEbmj1AVrUVdciRdBjaSLV6pI5ftzZ1S1OtHddzbkOCMZg== 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=tfouEtqZ7uS6ZOcDGWijvrv3iSSdFp2d2nCGg6/ubeI=; b=ac7WSQjo6Y+jAwL0L/kCkmGWKyBx1amRWkiKz7f2wH1G+JAAptmWzMPCeKT1Kdc1s7nFk/q5MlvPe6TYx9scjpt3uea730fl0i6FIFX+dmY5AOEgpWSOVO25PU1vu6mRNqs09ESkkimz08tjlVgoiQd4H6kZ3z8dxgEKxpE1OpfIqhsYuHYAIDlNOR5o9ba99mGZkjkgHc7Sxcf2VMCUIfKQIPfKbaSnPedqu8htN6vNxtAmlTg9m1yOHXRz8l5KITe+QtnPppeZn72cpkLtqlch7d6O/5eIHy0A4Kbb9Gpps2GfeF1Qg/rJukZ9V3DWYaedIYRhUrahptRUSeODiw== 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:16 +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:16 +0000 From: Yangtao Li To: Eugen Hristev , Mauro Carvalho Chehab Cc: Yangtao Li , linux-media@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 04/11] media: microchip-sama5d2-isc: Convert to devm_platform_ioremap_resource() Date: Thu, 6 Jul 2023 18:10:52 +0800 Message-Id: <20230706101100.75654-4-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> 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: 9d24267d-1e3b-4eca-49d2-08db7e09559d X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: mnTHNVRqCM9YIiyAOdt5BcmJW5YJFwqs8d/Y+PhfPxgYP+RsA42rBFO1mXjYR+ewFgi/V2KjLfHj2QwrQXEqGgn4hCJmlvGXmsbKPFlsvJbOH1Vs5ZiIHY4mASbAE86q4Js4lGbAurHhvbOA6t3pXESfTK6xuKkWNxouVFkoWHFaC0heSXXjlk8VY5Cq4nrS+Wge7oyW3RSw9x+RizN5qpDgxtDurRz62oWYLsamieom3oSk9gEYneCeJXszEfYpSouzMA2DwBVIzVEj0SUrPl8KaFwkB6PknKCoEXuN/Txn7m/2knDxYOaSv1BFhJu5B9JvsQcsReK1eOZo2gFD8VaFkjAJWSfffOvKgd06yYv3wNGckBqVI5cSsFrbU8OSiB+RtkDAKx4JYYCsf+MTpxOfkH52zYficg96l61g0XirLb078PBiXag7BoYy0y8U3HXEoXqVBV2spgl3KzSX3KoUn4RKtUbYv+F2dAzrJv8GWnpu1grickpXAgz9qs0nhln6KIhRIX8BrZz7j7pugfOI8jCyUjMV6huw6ICVQ0N++mycxC3uOv/ZBW82wu0GbQzxt+V7ofwEipg/RiiM8prf5v0W1yPX7i61uvlkW/LSFTR3YMSEGqLFS5GvgaCt 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)(66556008)(66476007)(36756003)(52116002)(6512007)(26005)(6506007)(110136005)(186003)(1076003)(6486002)(478600001)(6666004)(5660300002)(2906002); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: O/zGWsX7DCjy3Zz4mRDP32tJMy4rujmLmigMPlTOP3pS+eepiTTbQWI+YGg4v/nlE/gIYDngYCALG+MNtUIbYkkaZPJJa94992XlCpwBNbp7phCThlouy1IvS2QjadXXsSE9DTJ7dU4i/3BqHix/7F4DWue6AkU4iljOk8Li2wMAY6IqdDJqshLoO+ig/BE4jJ+t24lIKOvvJ8u1R1uQdpLMkQdWd1/SPVFdy8QwMKNrAnvxZ+2c9BrZ8JVoSFLDI2cEhzjqNixV8sGWU4nJXKCCExoWBf3sBZe7bUYurjXhlsBsZaVPDyp/es/f90oVHHQymkS30IKadLgem35YuzbQq4ZcVyHS9KrYdFZHhEcEsTkLcgjExklh7ewCOHUCSGvpBtn2Ql/LfPPJhaItj4klSJRvcNW/tcbpOFNqhdD1t9ZFv65NRfCQpSfLuX7f6YaVnJJLA0iENG35usUxG9NojsiKQodOBuP4t6Fvvjg7WaTpBiwI7iH11XS+qTb/tRjkxR8xpUX/WoUNxuDr7w+1Mcrn1UyqQG/N34LW/rPcYHh/XX3cKdVGxlZTvvMAdwhoJ6g7IpNIyReeBPY6egQzM9KuKqqnP9MOyQ2IyRZY4sFr6VSjqKtBpK2B+luI4m2rxN9VugMetXiaZEUrvwRkxUoB0/3638V/Ylwylkqh9rteLbtf4PNd6lDlxI4pMIC4IMa7yRWV+xWsteCilM7OXqN1tQpNYSQVabFyBSBnlNIFmFHci9aKtKIMDlWlGRFOKksDHrNEdDJzXjkawmHq85Bb9y3KR7gK4oLC90ll7LAktQVvo7aYetsg5y0Dzdtn3ylYo4q0alVxzTx/2TVWvCE07zgkdkeKKZpGJxxzlERRX8BmkIE67MXo3zovSJvKLsivVakt9Di9MR+IvIhXDLvr/Yju7gfXfLs9iHmuDKMqeTwj0HzEOdgWxnuTqHdPoQK/kjY+7p0Z4UEFQX+jhhiG5MqszmBUyG43EejtkIYQfkeALWFOIBBKPloXkCVZInw5xjGA1zfaZZvpGX36QTBlDNDQC6oBzuxlWAXGYZOV7PXZEUGH7hE6cU0Kjr4qLi90na3GY0/prvX4STOiX+zYEDyBF7sgPvuzO3eBTHnPdtLK/EelT7DGHnCksvTFgS3vYqx0xWnqT4LCrtoV4cEvgnVjvZNebQHjvHm55ZMESEZhx80vV7d+GSLDSAWmx5e5pSeKN8KDVAbNpRHHe/f8QnaayMxnEEhGcSGOHZevShZHBKJGBZ95LNtWU2CLpebr5D0kIdFEYzViP6iPFf+PJanXGVxwPcZE/Mxl8U7nKM/Br/N0TqyKrgPBie6RaxuhElxy7retPtIATWFtAtWBja8Wf/Vjz6Es+Kb+j0UxiCFE8or4xwADhpp/ZfUBO56P9ZlZF1HgCuyOFxE+qNcEgQONrZWQtmfiphXoIZ4SxigHFkQ3QILsgXPO/1N1MYK/fzVMaLJOK7GmrlGhTvbQss5QrxCMu6Y/FGeu+OhV09ImasBp7UlEWpj/HOxFymrbJkFfgXD2+oRdyI5bRnmh/TrALQBjlFNTUkpgx9sLPeLYD+nxKGrftUas X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: 9d24267d-1e3b-4eca-49d2-08db7e09559d 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:16.1387 (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: aMP8O7uUt/ap+zawtkp3kgo8UymKFscjWhCoMOvF7p+csBHJYZ+oFiN9Qj7pWbS5sJo2+84mXgXt/hB8xB5p1A== X-MS-Exchange-Transport-CrossTenantHeadersStamped: KL1PR06MB6447 Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org Use devm_platform_ioremap_resource() to simplify code. Signed-off-by: Yangtao Li --- drivers/media/platform/microchip/microchip-sama5d2-isc.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/media/platform/microchip/microchip-sama5d2-isc.c b/drivers/media/platform/microchip/microchip-sama5d2-isc.c index 746f4a2fa9f6..dfebb58bfd07 100644 --- a/drivers/media/platform/microchip/microchip-sama5d2-isc.c +++ b/drivers/media/platform/microchip/microchip-sama5d2-isc.c @@ -409,7 +409,6 @@ static int microchip_isc_probe(struct platform_device *pdev) { struct device *dev = &pdev->dev; struct isc_device *isc; - struct resource *res; void __iomem *io_base; struct isc_subdev_entity *subdev_entity; int irq; @@ -423,8 +422,7 @@ static int microchip_isc_probe(struct platform_device *pdev) platform_set_drvdata(pdev, isc); isc->dev = dev; - res = platform_get_resource(pdev, IORESOURCE_MEM, 0); - io_base = devm_ioremap_resource(dev, res); + io_base = devm_platform_ioremap_resource(pdev, 0); if (IS_ERR(io_base)) return PTR_ERR(io_base); From patchwork Thu Jul 6 10:10:54 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: 699957 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 58ACBEB64DC for ; Thu, 6 Jul 2023 10:11:43 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232341AbjGFKLm (ORCPT ); Thu, 6 Jul 2023 06:11:42 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55154 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232200AbjGFKLc (ORCPT ); Thu, 6 Jul 2023 06:11:32 -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 A8FB11BE3; Thu, 6 Jul 2023 03:11:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=fwJAXQxPYJe3N0M5uT6zDFs2mIdqi3IK8Dm3PGVVFdf3cubBR50UnI7AbcX6OxH4UVjMxDeiZGi02WC5DShq0Zi0vAUShDhGPP4mMIBxVhrQr6zQnFaZsnp19f9emqyLFq6FPqv70NO0A/Vu1J8nWZSblPWCm+YsKFjD2OO5vTo88TGGDyxyOt7SHo0wSu3oyDUxaP/cHBbrarQhthV+dfAnnMAuimp43MZMZReBLpJnO/q1Q12vQH0aDVYnBGj6tiNdg8BRFfOYPBOqexu3twcmFQIpuUXFGzEJ6Cn0Ga4nvyVs6u4DLOvFfPQRmFt7WkRLxC4hD72Thhnmo3iQgA== 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=MS2FDuWAkni+a5EwCQTyvqVldbp/7BosU2IV9F9kZU4=; b=J0GYFpRZtv8aWdiR4Y2znYLS3ZvRFfc55BDKx2ltBV/D3/E4pyusaBlcUdlmGoJaz9O7RhtUeuvPfSfcS89QBPK/xr4Dd9T3w4rVL2BfUiBOzZavjk2fSBBIhRAeqvvu3aBWTZOgd5z56PcgEanroZAlxx3oEFs8ZoZuc/GbswvyftTDFlMr5WpXmt+hR5uRpknmjzEMwW8B39XSQ4q3F1BtctRhkqBEsUfe361UpsnAhkP6NLEeHTHjoRg0dp+gNAQWuNxnyq72Sxbt7nStjBNShVtRrio4Mz3McolbaE7/xOtEmgG52ZemDTWdQ8SYe8w/cWYxSRldxxCw5/gONQ== 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=MS2FDuWAkni+a5EwCQTyvqVldbp/7BosU2IV9F9kZU4=; b=V+V6lRBMNexLH+lo1blEnea8Z/YVc3AFelm+1PQ5yumePm9sp6zyVyYFv00XVoP5hoY+rILPE7E5SnH89rN7MDNQcJWFtkdqPN8WI7aNTc7l9AzORSkLIl4nbdaEbzydSUvggkQjXGVIJ9LkH+knBImNhuAT3bsSbt8WNorOoxkUE3wcOTV+AcLMxrN1HTjAv4NLELYqpdQzhwO9627VOGfSFvQ+R6fE1kfBAsywnap6db8tzKU0CpWQdSwvDJ6RmDeO9SOFFMNOcuAzjySc5U477PnAmm22fnPE4oJSS5UuqBm41eMY+o2qKNnV2HII9C09PifWDORHfR/wsqZQ5Q== 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:21 +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:20 +0000 From: Yangtao Li To: Eugen Hristev , Mauro Carvalho Chehab Cc: Yangtao Li , linux-media@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 06/11] media: microchip-sama7g5-isc: Convert to devm_platform_ioremap_resource() Date: Thu, 6 Jul 2023 18:10:54 +0800 Message-Id: <20230706101100.75654-6-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> 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: ac978c5f-75fd-4886-7191-08db7e09580b X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 39SQiwkLR8H1cBIaI4K1yjTrV83hpb1p7ka5B6uEFtJjwWha0xK7HnM1t/KBZhMP3c0ehFNq8Qx5qtfbRBHFBc0e2KUaqmun2aOrTIjYiJpK1wkskRLq2EIXn058Yyab2v8sxTXP5nAfRBbnjUZs783JVjkkRcPaoUuL0xBh8ol+mTqGTuVt/dK/eJf2BOXWXBs7Evb0ej1nrtOsB+nkFNUlyccxxBmQcpQcLR+1WZ7T5LYFXvMF4BHdLCwvvaCLmxkDHVwOiSrLN9iC2yK5Nix+WuIR5AoaXJ8bixQMtsCAeTT8u2qyL1xY8R8UyI7j742ksH08pSl0fd3S5CdBqjvi0fKjc8JD+wc9e4r5/JWNZT3Q7w7qoD9pMlIJutnx9efVeUGF0Ti+k+fvECaLig162bByjpgeABP7TzxbH8CjIwF8QpFV2MXCHO38DeM91WI0VnTOYBud5lCyAAWHx0OyhpU4D/EHj4fd09hCEOmFKP5Ity9Os2cThW9eoDXBkx6tk65gv5uE/3SPOWXcP+0LOo8m1VSPJkJwhi0itSmuAGyz1VVWKfVHn1ZgLPr4wJDWQGXcViQQVCW8MW40c7aPLq1Y5/0HjDrEHlG+GF+IupT+XnyH/yvApBRoixfV 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: lNzgCj5hlZDYKvn1E+Vf7kyX7RgbQD3k16i0T6bhfuqdLZaKgOO/sOQUlvtbevN4Nw4Rc7rL9H1EMZD1EgN4jlynim4K4eyNMLY4nzuiPPlVli8kMT6HCxJxybk3jiMVFRdvz7Ko7NjtiOf+TqFSngSpLbtALsKkQteb+VzmFrtwkcMBzcxoaqcfc9a0blSSTcBlp6vO5eRphwIDqFOY6i/9oNtpXV4idQzLNL35nE+q6c2t2G2kS6XKC74/S3IU4b/9gub2FEqZXaFq9Z+n/SZGQad20+4In2ib4J9rqoggiLIelkhepPIFQiaBbrtN9+5bfyHaX7U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CkY3exiTWHACvsSy5AGkEjcf6ETLm6fVEVKGCiHR05jgQY52oeOoMR616Wg2CbuIlkWDV5m3bDOptQBit9MroRzEsIxROydcahN5KNq9W/VmwacY/NEdYLjFRK54x+u8wluT+aWcn2/HVUTr5GJ1QwIx2f0483Eb8kelIUaRuQkwxpAZEN X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: ac978c5f-75fd-4886-7191-08db7e09580b 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:20.1847 (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: sOxPM18ngKDq3lhQxHq9cyuMYnduk7SNllbcmUiIhEGVkg3v4CmJnW6mwnwL7NdTVjEPCMy6MmQ9LKhQ271acQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SG2PR06MB5287 Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org Use devm_platform_ioremap_resource() to simplify code. Signed-off-by: Yangtao Li --- drivers/media/platform/microchip/microchip-sama7g5-isc.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/media/platform/microchip/microchip-sama7g5-isc.c b/drivers/media/platform/microchip/microchip-sama7g5-isc.c index 79ae696764d0..2543e05a3389 100644 --- a/drivers/media/platform/microchip/microchip-sama7g5-isc.c +++ b/drivers/media/platform/microchip/microchip-sama7g5-isc.c @@ -398,7 +398,6 @@ static int microchip_xisc_probe(struct platform_device *pdev) { struct device *dev = &pdev->dev; struct isc_device *isc; - struct resource *res; void __iomem *io_base; struct isc_subdev_entity *subdev_entity; int irq; @@ -412,8 +411,7 @@ static int microchip_xisc_probe(struct platform_device *pdev) platform_set_drvdata(pdev, isc); isc->dev = dev; - res = platform_get_resource(pdev, IORESOURCE_MEM, 0); - io_base = devm_ioremap_resource(dev, res); + io_base = devm_platform_ioremap_resource(pdev, 0); if (IS_ERR(io_base)) return PTR_ERR(io_base); From patchwork Thu Jul 6 10:10:56 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: 699956 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 B11B5EB64DD for ; Thu, 6 Jul 2023 10:11:50 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231600AbjGFKLt (ORCPT ); Thu, 6 Jul 2023 06:11:49 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55144 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232282AbjGFKLk (ORCPT ); Thu, 6 Jul 2023 06:11:40 -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 DEF411FC2; Thu, 6 Jul 2023 03:11:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=CAuFxNqPFT+/OnQObBvdr8JPgchCDUP6E+eMGS4YnYnRftpvkrizuaAS9B2ykxeBSgZD8KXgavj91Lr5G8ljaAb4+3/0MrMJwZUNKenw+ZlCkOD2/fy5r146Z9ZiQ/r0oMk6MMbVXw8S8PoE87nqelt49sm9objygFsQOYzkti1vwfe++RrZJ5PJGmqJ+XgWrsN5nE8FDcPJ6+xpSUvwzSX7ouXDamgPfrCkAn5i0ILUxlrtxdUSNVx5f1t4TX802DybmruK5hz4mIjx6SImaflgQt2FdVTQ1Jgl8nTm0eXMVKaBnVK7arsIvWaNT3PQoJpA19zO2R6ids3WlPzQSA== 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=dMGHCUSP9i/hQaL7wQucQmUgHp7qf+NEj02kOBer8ac=; b=DXrPCgCtY4oM+t7KdWl+Fv8WiH+/ZH1Q4VtzTuXGzM5i68EKtDyQyptAyVX6BdNe5uTBn3tfevpjgPBFYvS8sJrY/En0FlU61KJIo+TtKOgigz1dqqnR3n37n1o7wrrrkfHxte9L38bCDS1AS+KFXRIirGhq99Y9qhhEAcEiFGVvT8gBX+K3NMBEUATCkaeuvJ1o5TBRzg/pUF4xNHSki5kX0e+NvJHpEdnDlQ+5DR2f96zhbDPx8ofygM+ycietQ+SqmHSk+x2T6xhZTp7wKklQ7DgnbOITqICcSYtxUfEK3f3ewRAHFCctNNr470j5/C4+3DRvZ/gtD2ykepXZRA== 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=dMGHCUSP9i/hQaL7wQucQmUgHp7qf+NEj02kOBer8ac=; b=JdyCyO+r0+8B0oDzo3vuJxEDUE/jznIetUiHNaUZf+akf1T1g+NxMx7QxD74qQMakoi8gzK7svhmnKXN9eRlLHR3RrZpR8o30BhKI2aMD459lEhBhRfAn5vMKVcH9Z/k0vc/6cvaeyKPMp/PUMAzc+ez8A8FL4vqlFwoQ+nKLShMD9waquteRtd2iugMY9ce8hyuYqcrazz4xkvOBOStfknV0Z8+98X/RFQ1ticoqZJ2cPqIfpnP1J+tZnNSjaRisF0EItA2/aJ2u5Y01VnK43X3CF6+7rTa83jPFa3O6+f3+fJaFbpqy3g9LnAjnJ/8SdKhTRaD4jRBwJnq1G2mJg== 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:24 +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:24 +0000 From: Yangtao Li To: Hugues Fruchet , Mauro Carvalho Chehab , Maxime Coquelin , Alexandre Torgue Cc: Yangtao Li , linux-media@vger.kernel.org, linux-stm32@st-md-mailman.stormreply.com, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH 08/11] media: stm32-dcmi: Use devm_platform_get_and_ioremap_resource() Date: Thu, 6 Jul 2023 18:10:56 +0800 Message-Id: <20230706101100.75654-8-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> 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: 96eaa846-28e2-4534-8743-08db7e095a66 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: uG2ORbFMWM53GWL+JKoTgvrzCU+ICOS8WkC+d7Up/AnwuvmOyhDkwhJ9rebiyv5zkh/JCrEGSUsedzRnaqz73bpgEUZVTwh92t8WJOUwZ6G3KmzidJoJcEOs6NT6Ab7kHarNggxxFhHcBi51y1B3m47e0Wkf6PLOWqFEWLWOCfOUONAnuUxmg423NeL48DQZK414IM/MuEPdc/5dHph2FFJZP3dk8YkRpEaC4bkVfE+VyN0UEy7s0ZV3uwaaisskEehXTqwaGbOS1iF8up/DRmHKe7Gs4rmbf6Gol7+lFV5d1UcptaAvP31ExkmK4bnGuUV8e5cKxHv5NGFZFz+1Y1FUnr+AwSpZIfSDxZAyzP9WSyipMT+8iR8+C4QbpPnA3XcZwpvtqeRgQNdAXTJ2fweXyE9h1jA7uR3anohs9FLWf42RARaAXLtZJSkPXhs3Jwx00zL2eqI1vkruqzbOsCd9yHkyXf+jdSJB3V7FDRhKTKtTuzA/bYgqeB0R4loxZmskrXYjWJC6iYH++eSvHxJ4X/l4gSNxS3nXiCnMjQc73+YocAgPjXcVxKg0SPosjyqUoxRBZuUgrIWSaidJGjeFF144b20Sp4BV0cS05V+wpmLq1l9rzrM0npZaCehS 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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VrkBhgUlipU+A0QJb3IHDv9Z8z92n6uUml4r8M8gfr0T+sycHdq/isK5c4VKWL3P4j5bs7tw7+vFMGfCvmxiEiOhuTIMvAHeTcrtzUQDdfViJ+jsRXz95JLuMebr7xHFrYLtWQ0gAb5oYaangMcw6ps7Q15vvcdW5fwUztjW7avHQdnvM/LYR2ZRTj02asbmhWV5WinUA+a8kyv4xJj2wtxKGwy6CoSRGS4xRK0HdOqZHh+UDNWMtB33VIpZraxtPzfEOoiTFxZfZG4zIIKDgy6jQRDKiTWuVl7/7EQhbYnUmrMkNmR8VKsV/vuX67YI0DfwOSfjXBkQlrWb11OeFkn0uZqyXK590CMohTMvw8fJnrYTKGxVR6gZU3PyUtfL7F5GKtlddUWqeaPFb0ZkBqsMf1iF3zzwHOTJZQINMF3TQ3roG/RVzf+A/PlIH4Oy+tye65DfF6uF8h6uYzrfct/UJwGzvu6llPu5YHsHUI+nY1jRH8hqFdeJ8Ma6UNGPAvvF6PdLHmXVfY/dc52ipfgip8wOjliF4bFbdoASFCdXJkJjTkfTLz7Q2QZYIcL0dIvQD3OZ89xBHuMaqWm9 X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: 96eaa846-28e2-4534-8743-08db7e095a66 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:24.1222 (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: PkzOzAH1R5ozcpIRBmpZKoM1rrlBOipntZvVzDunv3sbGmPRUUMKDq2aX21nckcxZ7vw/+WjdByhIJm1QF0m4g== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SG2PR06MB5287 Precedence: bulk List-ID: X-Mailing-List: linux-media@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/media/platform/st/stm32/stm32-dcmi.c | 17 ++++------------- 1 file changed, 4 insertions(+), 13 deletions(-) diff --git a/drivers/media/platform/st/stm32/stm32-dcmi.c b/drivers/media/platform/st/stm32/stm32-dcmi.c index dad6e22e4ce4..b2e2af593291 100644 --- a/drivers/media/platform/st/stm32/stm32-dcmi.c +++ b/drivers/media/platform/st/stm32/stm32-dcmi.c @@ -1932,7 +1932,6 @@ static int dcmi_probe(struct platform_device *pdev) struct dma_chan *chan; struct dma_slave_caps caps; struct clk *mclk; - int irq; int ret = 0; match = of_match_device(of_match_ptr(stm32_dcmi_of_match), &pdev->dev); @@ -1981,19 +1980,11 @@ static int dcmi_probe(struct platform_device *pdev) dcmi->bus.data_shift = ep.bus.parallel.data_shift; dcmi->bus_type = ep.bus_type; - irq = platform_get_irq(pdev, 0); - if (irq <= 0) - return irq ? irq : -ENXIO; + dcmi->irq = platform_get_irq(pdev, 0); + if (dcmi->irq < 0) + return dcmi->irq; - dcmi->irq = irq; - - dcmi->res = platform_get_resource(pdev, IORESOURCE_MEM, 0); - if (!dcmi->res) { - dev_err(&pdev->dev, "Could not get resource\n"); - return -ENODEV; - } - - dcmi->regs = devm_ioremap_resource(&pdev->dev, dcmi->res); + dcmi->regs = devm_platform_get_and_ioremap_resource(pdev, 0, &dcmi->res); if (IS_ERR(dcmi->regs)) return PTR_ERR(dcmi->regs); From patchwork Thu Jul 6 10:10:58 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: 699955 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 7013EEB64DC for ; Thu, 6 Jul 2023 10:12:21 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232443AbjGFKMT (ORCPT ); Thu, 6 Jul 2023 06:12:19 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55154 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232320AbjGFKLy (ORCPT ); Thu, 6 Jul 2023 06:11:54 -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 D19161BC3; Thu, 6 Jul 2023 03:11:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=ROwhRr/BYTizapCASt/lu/qhTm0dUNJoUsuw8tmCU5JLf3EWbXE+tVHsLfXur4PgNaC4WxVNpL26nUqboNx5OTKvgRdTnLCTWc3fQM9cXZFdUKmYX3f+Gd31QjTRqHPSD2eeGpCtXGdam7IUqZxgoMVPtsKvFEwf61HrYNLIGvMFfFirE8L4z7+pIzQh/IsZ9aCLothoQYtPQF+BObasSOz3cTQSVRhKplyB0R4v9cYDDiU2co7vrOGtPQ+4kigWgNTVYBFsGPcMUOgyziZUVdmGpt4iNYIGE0b6mc5gL31kxYh7zWTai3zIEI3fNPn7NfF3/I3W+j5TsruZ40GkcA== 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=32Uv43LxUrBhK+2tw60+pa+ufVqWb9XEOgswDfOphw8=; b=j1g0RHEwkw+82IAtGxrWxctzw7TsvjZhk2SyMKU588YUBMdXp+0t1mT4jEg8Jq1TBLjhXsoHbJz+WKr8ON4S9VJzGXIYTndv2QXky3TkxPN/xmygeWxo3zfnRlXq6hBYIq6Wvp9/pMhtc2nnxLZZRPmE6EKCNy+DJA8qyh4H+9orWUFogZxE7toH5vmgHcUo630TFC5D13KyvjO8AXwi71COnnsKLYYmujXSzzkq2Ig77oUlEhsnnqd9Ng1Hy/5IVvETWHof8wcUFhpwj/6QGKeHW7ghu59pxcEnQUI4Afe0I7hUDnIiLfoBKMboPf53asbO4lS2gJHiAZJGp+tBtw== 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=32Uv43LxUrBhK+2tw60+pa+ufVqWb9XEOgswDfOphw8=; b=aE5xP+UkmHg0Mqayc42ueYQhhNp0qpXeykd9WaCvVgIwFfY9bgKjp+py67YZllnGDOt49pM85Rrlzio7xrWUL4S2Ye+kpWaczh1/BRMRAsOOeZvRkjFBC2AN1+fA8xffLV6F6p47U9sHBNFqKyWAIOoh6yVuLsRCZP/9YHWrfVuP1iwjoem7HmE+eh9z4I1Y/6lms86u2HY4Sc0jewo66Z4YY4ofKeasmEgU7n+nRAR+0phT+VDwsaffBfl9yxuOmRhKfK7UKDWBZFg0WkdL6zX0bPxeyfh2+s/jkSt2wCDuArL4kcnwShje+awH5omabVd8Dqn85U44ihw5y+pyjg== 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:28 +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:28 +0000 From: Yangtao Li To: Sylwester Nawrocki , Mauro Carvalho Chehab , Krzysztof Kozlowski , Alim Akhtar Cc: Yangtao Li , linux-media@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-samsung-soc@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 10/11] media: fimc-core: Convert to devm_platform_ioremap_resource() Date: Thu, 6 Jul 2023 18:10:58 +0800 Message-Id: <20230706101100.75654-10-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> 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: ad94f7d8-d1af-46d1-ac05-08db7e095cf3 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: eLdaTd4Yh8cXxxVNaWdr5u+Sks1Nw62o2IBsEZNgjhVpyK/JaTF2N6z8duLFdVzJvvjtpt1DNH9ccjQz4kLo8MOYfV/8zWF6n3xvkbf7caCTPNLUYoTY0XxyX2jbpSoqoPjQekiCK1lN/LNlOjwqlVNK8xk+W2tMWlKuOw0an4IsLbP7b2dja7j0R3jwqGg7ptsOzYQKOG71JiqNSgz5l8ZUMTtoBw3ue9SEODHdRRrcazMIaezhCdKNEazQVdlwi/8Ukxx1PioZd7v98eixpTc3McoK0r+IIpAfohvaTCxvEO69ZTW5kkWvzJVlS/lFja4ZxVDb7ufKtHlJiV4UGA8a6jNGLHQRPG3QdDAsrrjzTGi0PDZd+4AR7wNQKk2SEa7VsOBlKrchcKQemWbbE9a1tWm5dCfHBsWWg9NTzKYG4Rv5aiJW/A9+J19p/7mVkzX1zB3pUGs3/fvPsLZAA0O6s+gL3Hwkj31/jMjwRfXYZUkYdOhA2EOdG78LoX2WvzrFMjJ1YDZEvenU/1icSW3sscB3jg/rPmELl61aFuZ1d8mbadHlPl6WoUWfqFavFXNjm/NJtw6bguGtdbVf1G/BfJ3CBWnVZYs/LhaWMRa61gdO3zowuwQAsalW9IiI 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: DLWKJBOQ8Z9rLIWX4wtJtSLykrsawxY21rBZj+ZG65LUYIOe+iiNozyJq9T7qmWuVFDZXJkJM6GDFDh60h8emJZKG4viZX7YFdT6zwo9A2q8l/vqj+oE1ft4NAYRXChwaNPk0i52kNr5utmTjW4jWCGS3TebpYbs01mk7pTzOmc0ExDzCBCqh+lXII8kquWBNhvLSUTiEoYhzYTO3GXfZnjofIdN88UDNX0nggdVdZ15cIepr5P2VvSeXmDaVk7OHD1PVTmCoVLxRC9qjFJc8ykm9DBR3UyirfiV8Uzg6BwJlX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vUxHGs94mUnofkKD6MydEbv9xbWWWfRIJk3r+1qzoR1QcsnQxx/WnjBcW7vdfbN9cCv07MiaSFg7LcP2SfC/EdiAgPWRNbRVIVlk1JVYws4GcsOJEIjX8z2QSU5J/JdvvlqOnxQZwt12ib4fmmeHdDBjQGAGwprhAOi+VPeuQzjy44kyOscDQsrt4T+vOKW/arZvfrjdXHmngNtj X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: ad94f7d8-d1af-46d1-ac05-08db7e095cf3 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:28.4389 (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: Z6SRPVszSCTu/dKtmIAO04+qB/X9mUEbVCi8u6+4zoA4AFXXZ1hYlAwO1R9Z47bkVgccr+mMD25YwotGQAZ2yA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SG2PR06MB5287 Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org Use devm_platform_ioremap_resource() to simplify code. Signed-off-by: Yangtao Li --- drivers/media/platform/samsung/exynos4-is/fimc-core.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/media/platform/samsung/exynos4-is/fimc-core.c b/drivers/media/platform/samsung/exynos4-is/fimc-core.c index 976b4f747ad4..4e8059f100f5 100644 --- a/drivers/media/platform/samsung/exynos4-is/fimc-core.c +++ b/drivers/media/platform/samsung/exynos4-is/fimc-core.c @@ -924,7 +924,6 @@ static int fimc_probe(struct platform_device *pdev) struct device *dev = &pdev->dev; u32 lclk_freq = 0; struct fimc_dev *fimc; - struct resource *res; int ret = 0; int irq; @@ -961,8 +960,7 @@ static int fimc_probe(struct platform_device *pdev) return PTR_ERR(fimc->sysreg); } - res = platform_get_resource(pdev, IORESOURCE_MEM, 0); - fimc->regs = devm_ioremap_resource(dev, res); + fimc->regs = devm_platform_ioremap_resource(pdev, 0); if (IS_ERR(fimc->regs)) return PTR_ERR(fimc->regs);