From patchwork Tue Jul 4 09:36: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: 115682 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:9f45:0:b0:3ea:f831:8777 with SMTP id v5csp1109584vqx; Tue, 4 Jul 2023 03:19:01 -0700 (PDT) X-Google-Smtp-Source: APBJJlGeP1p1U32lByvSyKcQfjFgzgduvwm+LzSUptS8x85A8vsVxU9146jyt1ZMJIA182PHE4wL X-Received: by 2002:a05:6a00:b84:b0:682:4c9f:aa1 with SMTP id g4-20020a056a000b8400b006824c9f0aa1mr13150401pfj.5.1688465941326; Tue, 04 Jul 2023 03:19:01 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1688465941; cv=pass; d=google.com; s=arc-20160816; b=aVhS8sIaWehE5qfwooqRl9S07xRJO+ryUreijKKJtQX2KS4CsfiPcc95uh+NACDhO1 zp4FF9VzPQNJPp1LXrz5cBaJ0Y+G44V3VcE0jJffXKSZGJ0zq6az57tVJlw5mzMQ/x4i KoVyZdJiN/CbGqa22aalLq9af7Er6tKISwSGbAEILNbzmfoO0m7MYyb3dffL4QE2VP/y ZHsFyTiNIC+/98EpmKXumhhGIc55P1hERH44Nb95bx3yhHbg0rhRATL5fjiaLEDIdC9N +tOTms32dCb5QnjB1pNjqhAt8dh3i1EX1i4k7gISdnQRQ3+e29KYD1qt7idZyjgdTAxu hy1A== 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 :message-id:date:subject:cc:to:from:dkim-signature; bh=czZggQmv9oQ7vK3K20QsgpSOBgFoVIKa2AxRU9FHdoU=; fh=hjddpPXZDF1kGwaaqyFKBQdr4ER3lS425ToZlIV4HF0=; b=B907CLd5nVsvvJE3R2e+rHTxdYdX3N3eJb+0VbkuNCll0T4PoLO/Y5yCgYoqnFnv1b 7v+YU2pQW3NTP+AJUH6ESBl5HJWZuIL+e2Hqtom2tIzfXfodo5NfqZFSRdBTMBypPQQC SD/uU+wmZJsIlFJOIt5l4ZUJX7jaOfrTJSAN/3/Quzn7Q6VYFyjATOVMEJnWL1ZYFhvk mXLl87fEWTsISIKLYaICR1/iiYoOK8uIDuwf69NvRRf8lx1NK/d8bxxLJhGHTfJydZil VirprYWPeHE+LycJwqp+DPZ7VvzYB8QdwWfSsJvk18b4yulkxI4CNMXaqfJwH3pL3cSW QQhw== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@vivo.com header.s=selector2 header.b=Ebfdag2G; 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 z7-20020a056a001d8700b0066874556a58si12869673pfw.213.2023.07.04.03.18.46; Tue, 04 Jul 2023 03:19:01 -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=Ebfdag2G; 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 S231548AbjGDJkz (ORCPT + 99 others); Tue, 4 Jul 2023 05:40:55 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56366 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231403AbjGDJkf (ORCPT ); Tue, 4 Jul 2023 05:40:35 -0400 Received: from APC01-PSA-obe.outbound.protection.outlook.com (mail-psaapc01on2094.outbound.protection.outlook.com [40.107.255.94]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 94E122979; Tue, 4 Jul 2023 02:38:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=RD3ptZbLSRgoTa3pSnxhoyZp60Tqm2dyy9motq4/pdVS44YBtBGM4nE46OBGt70TKkPGpk4BDh0huXkeHbNeFk4c4N9PzNgOotyNuGCH0NnfXEQSNQqtbugj8vWT4LCuVeW2JMWbUej2OISw3UJ7mwvzocNdAauL8eh7QNW7cfK7jD8Fh7+ErtsfXBIOcddyAwV+PLMZL8Uo3sniuOAHD6OX1Va8NOEq3AdoTgsV+YP/i/ROB1nzJcxE5ql0AFoQKFsl2L+ckdgvMHRVsfnFGe4KgmABoFOBYqHv48+vbGrGuCw9rdEhl75O71VNI7Jay+zSnVrKr4iW5D3vyTH8ig== 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=czZggQmv9oQ7vK3K20QsgpSOBgFoVIKa2AxRU9FHdoU=; b=PZcAQXVmTlh64qHSYSrefqP8nL528M324F0kmlDMzGxO56vKKG+OiUws2kR9fbhAbJzYcQn9NfjuwF8dFF7CRWblulHcAPJ5eNG3DKDaV/8ewvXQMKG9cMsJZ71cU9FRW/UNWQ6QyYotoWa6wyciTdjgVN3SNB3Fh2vOxllpMF4cuxz6JrmrL4Atyi4def61cw6V+uwR9hK+t1Kprpw9cDr4zklGhVRviCOCfuafGdgTain14U0EK5W1WX3PA5QL7ji5vMf/i7bMR77lbj6AYUNStOe7v/mhabincWrwH656qpzrWV8K7VGVsqI5DrBKUPbKhT4PUcVDvjPdZz8xIA== 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=czZggQmv9oQ7vK3K20QsgpSOBgFoVIKa2AxRU9FHdoU=; b=Ebfdag2G+7NRzmuVDWXQRUNPAbFOS5VtjmsJCsOzzP7/+3c0IOziWLwj/2kuWmUco3DUbVjT3ztDU/bKFlkNwASApJ0zIMTY+E96KjHPEnlDp7+A80xhHRYnxBHIOgVOKkHIbqydry9phTtpB1y8FMPasumslMvEBgQ6rmxVWdedDtwIT0W8tdcEZRy0ZIo3jcolTz+BqNUsJ3HJnp0rbavGkyXXyZd+SCRbwdUT1C7jF3AU4RNQUDi9hCNKO7av3vQIHZpOztNSHD89AnrkI1Kj9jMol8wMPXo44whBWrJotpTzbITPf3Dg2s1PmyoMNOYQRZ+ZYFGkGdG110TFWw== 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 KL1PR0601MB5565.apcprd06.prod.outlook.com (2603:1096:820:c2::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6544.24; Tue, 4 Jul 2023 09:37:08 +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.6544.024; Tue, 4 Jul 2023 09:37:07 +0000 From: Yangtao Li To: Sascha Hauer , Pengutronix Kernel Team , Helge Deller , Shawn Guo , Fabio Estevam , NXP Linux Team Cc: Yangtao Li , linux-fbdev@vger.kernel.org, linux-arm-kernel@lists.infradead.org, dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org Subject: [PATCH] fbdev: imxfb: Convert to devm_platform_ioremap_resource() Date: Tue, 4 Jul 2023 17:36:52 +0800 Message-Id: <20230704093652.18191-1-frank.li@vivo.com> X-Mailer: git-send-email 2.39.0 X-ClientProxiedBy: SG2PR01CA0153.apcprd01.prod.exchangelabs.com (2603:1096:4:8f::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_|KL1PR0601MB5565:EE_ X-MS-Office365-Filtering-Correlation-Id: 5db4ad79-dc31-4a45-ef33-08db7c723bf9 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: dGefYTqL1LfiVIWrbAAuD8TL1p+thE5qXvmr42luJX1F8Ae0RzQI6WsJJWibgd2VT1lqzpFpyhQKXDYiqaZUSQukLgggVL+f2MQeZnbV9Lc2e6LXZhsmtshNQ7TCXa9xdWoZQsWui7u9bKMyxpYoRWXCedDuhtCimOg32rFx1Tktu8u3qWXWdCiA9L8vozgkgLSgPTRH8z8e/RDii2dewN6OO2TqA1sW9Yk+ILIXhm1cjB/7/OaaoQFGFtyk91ijy8qLwY1wXVzH5QPDl1TGP051k8sxkU+UsZwhXDTY/C6Zkq4dYwE1NbGWx/lRDwcc9zCIeEfl0F8dCX4hObazISeiv+xzoNM3uoexlAgf/uiXbmHVFCJS2lvMPXhL4gSIW9Vfa6ba7XXnJfgG3w0Jpfbzm3Aopi3ObeZ/g75pT/hMqUYjEM971I/IjocRXm2xikL2Yk5eme0Ivri9ww8zz1BhrWOWa5GxK26mqo9gjI8+oRggUIQjsmCg48CMK5p3Mk+ErUymHQQE2sSyJCvWw4iKwaXJTUq4Nvylm8eE6ZlmUt/apQTD9x8iJqA9sQxYh6rCeBRfJpok12YVMRLSBDxsYEErMRxFG+nPH7bqKKa6c0g3KeQFrimKktfY6tu0 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)(136003)(376002)(346002)(39860400002)(366004)(396003)(451199021)(38350700002)(478600001)(110136005)(6666004)(5660300002)(7416002)(8676002)(36756003)(8936002)(86362001)(2906002)(38100700002)(66476007)(4326008)(66946007)(66556008)(316002)(41300700001)(83380400001)(26005)(186003)(1076003)(6506007)(2616005)(6486002)(52116002)(6512007);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: MFyLGIWqcM1mdT9PvfNOWAmhFGeNeowqoSZevXQ+MvcL0gHZsfUsA8f0yNS8BiNS9IDVQSnQLJ4cuqOwtWAKN2BF52360ydqKfnsnIX+Ce2/W2Bbp+PdrY45eP5pMWbE0hCqTvFp/8QltJQ3EH00pxJrhLJFo7Go0DnmxlcNN6NFcLgBx543l9Cdoc+K3tHw835GWEyee+Zsqu5R+UkPmm1Od2rXj1rTu3BNPF5Bxh+ByJGoe++LTDlq3M4pqmohJe+1Q9K5XEHFp+iTaqjK2Yr5S4pj3h28EEUWAXWhtru10QaFIqV2UZEMgtVyT5Sqzao9zM6/0w1xmkq8E/2K2f5bHmvAwcXd6EMSx1n6wcoJ9yD/pJdKdK17CrasFRJV+zA2jjqk4uHPSd3Hc342AgbWQiyVAkQI1C3cNxz2b9SSVMwaKtC5fmTQI6w+HeBU3tTKygRjffGlpjJLygbVX+954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P+5SLMAJgy9j9ZSzzio5HCuRASx5or5BrR95g04NqdzpltUhyZAbu X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: 5db4ad79-dc31-4a45-ef33-08db7c723bf9 X-MS-Exchange-CrossTenant-AuthSource: SEZPR06MB5269.apcprd06.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 04 Jul 2023 09:37:07.8932 (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: RXMfePyIfciwW6M3kiMx2C7450yCVbENLe2Tu9v/BW7reFpTSKAGNgaknofJwYkI26k8HSA0wFI8YnoPsxVlWA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: KL1PR0601MB5565 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,URIBL_BLOCKED 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: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1770484862868697874?= X-GMAIL-MSGID: =?utf-8?q?1770484862868697874?= Use devm_platform_ioremap_resource() to simplify code. Signed-off-by: Yangtao Li --- drivers/video/fbdev/imxfb.c | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/drivers/video/fbdev/imxfb.c b/drivers/video/fbdev/imxfb.c index adf36690c342..517eb65bbaa6 100644 --- a/drivers/video/fbdev/imxfb.c +++ b/drivers/video/fbdev/imxfb.c @@ -868,7 +868,6 @@ static int imxfb_probe(struct platform_device *pdev) struct imxfb_info *fbi; struct lcd_device *lcd; struct fb_info *info; - struct resource *res; struct imx_fb_videomode *m; const struct of_device_id *of_id; struct device_node *display_np; @@ -885,10 +884,6 @@ static int imxfb_probe(struct platform_device *pdev) if (of_id) pdev->id_entry = of_id->data; - res = platform_get_resource(pdev, IORESOURCE_MEM, 0); - if (!res) - return -ENODEV; - info = framebuffer_alloc(sizeof(struct imxfb_info), &pdev->dev); if (!info) return -ENOMEM; @@ -970,7 +965,7 @@ static int imxfb_probe(struct platform_device *pdev) goto failed_getclock; } - fbi->regs = devm_ioremap_resource(&pdev->dev, res); + fbi->regs = devm_platform_ioremap_resource(pdev, 0); if (IS_ERR(fbi->regs)) { ret = PTR_ERR(fbi->regs); goto failed_ioremap; @@ -1043,7 +1038,6 @@ static int imxfb_probe(struct platform_device *pdev) failed_map: failed_ioremap: failed_getclock: - release_mem_region(res->start, resource_size(res)); failed_of_parse: kfree(info->pseudo_palette); failed_init: