Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp35364326rwd; Mon, 10 Jul 2023 06:31:51 -0700 (PDT) X-Google-Smtp-Source: APBJJlHJjWxmiRNkAmEDU1Mx885s9zesQuFtI4yoGSAUPaxyti+sqV1sSgU/IR/FTEkgxwwYiZtY X-Received: by 2002:a05:6512:3e08:b0:4f9:5781:8628 with SMTP id i8-20020a0565123e0800b004f957818628mr13144055lfv.24.1688995911203; Mon, 10 Jul 2023 06:31:51 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1688995911; cv=pass; d=google.com; s=arc-20160816; b=PM4UA5ze8SvV/bMdo8hBekDU8l/nr+tPmkLgfnScMhyTNPpHTHH/V8lpy/t+KNebi6 KQuCXpzOdMK/H7DMRGP77YwLSZAH93Yu8XQ06krxn2mace4SmVky7Qf2xu0aAr+rzW2s IAt4XinI/CykD+NQHa5JGZr+5J+6M3N7/3XCkk/K4VonrG9ETKus6iaawQcT7D3w76SW cK15aWEnfGIfH0vZmIVq7mpsQhi4dMKljbq8yUuC8f/Z9hhs3EaBJp/xz0SIA94Xp78g cQiUhfFcBz2t5p7Fr/sKAIVqV52cMNjq8vDwPFwLxZlmvozQr9Rtth9l3Ozi05ov26i0 uTWg== 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=yWZj1Nag3gBRifYS71xzwmE9Gz0lr0/Mqy+4hbv/PI0=; fh=UOCFwyHp0XuBMl4DW/Dx0U7qtACvhetokf1XSE46AnI=; b=VmOeEdkcBBL++U8sqQeC0c4eMekJ4BhloYk6jnefCpbd0IA2yvkaT1l6oMtD4kQOcl FKIu8Ms/50qEGEiDTf4MBFru3fSwAb9qHc4yl2Yhb7rNumFiJ1Ksu33Aoq61g6Va8OGu oZ01U0L+hUxCdFBBmPVENzylBsD6nFEfu4LMp+cojW9GTQ/reUjauYRDE9tvS6x+Bf07 yFMGe69hjCTT20qFcQdcRTrTtIEbcUG95V+pu7rYXcOGUj4IaonwlxwwHEoCuV5Aeyy1 ITsJDDbBpQP4BGlAts3bhhoBvs0uRAxZ1kPugwZRx/XnZ1v70XnEAlaUfEvq21PbO8yY jG0Q== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@vivo.com header.s=selector2 header.b=IW+3KkjT; 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 a4-20020aa7cf04000000b0051e3c92a20bsi7647134edy.318.2023.07.10.06.31.20; Mon, 10 Jul 2023 06:31:51 -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=IW+3KkjT; 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 S231573AbjGJNU0 (ORCPT + 99 others); Mon, 10 Jul 2023 09:20:26 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34172 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229837AbjGJNUV (ORCPT ); Mon, 10 Jul 2023 09:20:21 -0400 Received: from APC01-SG2-obe.outbound.protection.outlook.com (mail-sgaapc01on2113.outbound.protection.outlook.com [40.107.215.113]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 342ACC4; Mon, 10 Jul 2023 06:20:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=dN8Pk6UmfAmCOi/yV9UApqR7xOjvTuHu69XwHIgfIwKeHUFWNryN+JcXzCRZ7oh25Q1DfYfLDuubzJcoMf8E+0z2/hEpENlfqwzCyIqr61KgCKgfFlGyMp/Fp77rk6PciP6cLuD/aAyaOYNNm/38n9Vbz6Dg2PbQfTRl3OLtSJgC0A+tpSgWwSFERsRPTbRxrHbyXqkx2luxnqloKZ/pLZcMfLYvSArH63FWrifwgYFSVwZ8FTtPyn9T6jNKsysUfEdFGY0RgSuKlFAG4Gh6Wt2IAxC73XA6tUPJW7stic7t4CZRfMb9E/ct472QuMjK+fZCIDe7uUJCMne3pnzUwA== 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=yWZj1Nag3gBRifYS71xzwmE9Gz0lr0/Mqy+4hbv/PI0=; b=A7yy07US4rsP9PrphwzWIecoZI+thBNePXxLmM1kJ2TsbFZK8dGoPMvLRk4xEhUz/gIWlH2iMRCCwcIUdQtfLvvuWVdUs4tg+pqH/+djFlNGHkv5lDa0B4U8q1wzjjP96Gw+pHRb6vMzjuUx1AT2hHluUEtwJqaq43MAZbmSi5830BzckiDljevBvfmTu03r27eFnkulssQl5cvnYAitPsTRX4LKp8bmbKA+riqS0vfswYVPh0+nC2tbonvi4GuMaK0ZAmpSf3JtlihQtD4uaBmwv/BMAkFXJnSAdhG5pQI/TFQkZfWIYjztpDsm80Ik2+lwmI2nXCSVYFVM8MTFKQ== 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=yWZj1Nag3gBRifYS71xzwmE9Gz0lr0/Mqy+4hbv/PI0=; b=IW+3KkjTzy2i+s6iOlRY9VSu3cJNLkFBBNxiN6k7LxBrXlREHPx+yRuA0iAa8gXHokt5WlC3gYR4lI3rqZ4PSmTFAkBx0XwEi9W+nYDP5jUcpy3Bn4UpbBD0vBW7ft39YDMRjrLwrlaQMfw6T7lbSlUhwOURaXumvZaBR/cJSeG71smo4kdZFMBuaoMgBtCMT7xEXGy2MpZoHSNH8bdBBteBvVgoATnAOFRUL3KUvPyxckhp4pmxmeOJQmUHs/p489njvOj+K9hK3zrnkXKOzgC78jzSJszaKsDdER2WPqD2/Zdv6cpTGtxrphkJNGxhSYP1GRCKQCoB75pg/DLuHg== 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 SG2PR06MB5131.apcprd06.prod.outlook.com (2603:1096:4:1ce::6) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6565.30; Mon, 10 Jul 2023 13:20: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.028; Mon, 10 Jul 2023 13:20:16 +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 v2 3/4] fbdev: imxfb: Convert to devm_platform_ioremap_resource() Date: Mon, 10 Jul 2023 21:20:00 +0800 Message-Id: <20230710132001.50764-3-frank.li@vivo.com> X-Mailer: git-send-email 2.39.0 In-Reply-To: <20230710132001.50764-1-frank.li@vivo.com> References: <20230710132001.50764-1-frank.li@vivo.com> Content-Transfer-Encoding: 8bit Content-Type: text/plain X-ClientProxiedBy: SGBP274CA0005.SGPP274.PROD.OUTLOOK.COM (2603:1096:4:b0::17) To SEZPR06MB5269.apcprd06.prod.outlook.com (2603:1096:101:78::6) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SEZPR06MB5269:EE_|SG2PR06MB5131:EE_ X-MS-Office365-Filtering-Correlation-Id: 2034c2e6-bb90-4771-1dbe-08db81486688 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: xJEoGisALoOZhGS0l5YX627AgWmElhFTSpO2LEpUcfWoZjFdFqoviR/lKMJbuC1clPROmmSELvf95rShz8DMpxZvMZJ15IVgfIeUlxEVmKM5qjoaHD8SFQme4XGzuLeRPNwwapfFoukLCJo9wCKkIt6KHzlUtcX5YKu5NopquxMtmEO9qCitwHbhrbRJxsbWhOXlOyRitlGcHac6s/ijCtK0xeZCrQz+HQtCVdwq9VWY0h62id1Eepk+2rR7F9W+IECdJ+argJDCRRjzUnZVNvMqaSOfP9sPlicoYsgmaVOcsxwb7vYDX6eC/UUdMFQQCASVQmuYoTE24UvZki+Fp0zVhVvIwnM7SqM670PtugSszdBOnzDSkOfQ2hDlkc6WTRB9L9U8OAH/FVFE35ns6HL5ByZTm6Kz1G7DdQ7l8JAuix/8NqiQa15xL5bHTtCOsTIb4HEIh4CVXehHUvr+6QxvjUS+rHEIwGTwJmrBmKlX3HtRG3KAA1KgGE6v+NY1mXV3yY8dbrdJ07uGrx82hiWt7D5ffc6xQpJ0umUMYNejqHcULtVTuTOVRQDckSF65ho4Jc456Yep0jwZru9HiE6XFqwCW7f7X4G+q7/1DYMCyDDjlByQ89gsuOc6uDet 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)(366004)(376002)(396003)(39860400002)(346002)(136003)(451199021)(38350700002)(86362001)(38100700002)(36756003)(6666004)(6486002)(52116002)(110136005)(26005)(6506007)(186003)(6512007)(1076003)(2616005)(7416002)(5660300002)(2906002)(66556008)(316002)(478600001)(66946007)(8936002)(66476007)(8676002)(83380400001)(4326008)(41300700001);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?Xylkbb01x1myo3KuV0eseSgfQrIkFzybxTeozMC1qMFNH0mOWu6AV6HK07+Y?= =?us-ascii?Q?8LqZHRAz+NSDGe/SWSdVjwlg4/yIfJ9dVJyKCxnJR2+GXmz6sWn797Nv29xa?= =?us-ascii?Q?MLZwGXTZw6SVf0vek19RTFyK1RTAxJZDBbkdh42Cl3Ee+/dnG95a3NUDnp/D?= =?us-ascii?Q?E6h7IGtWB5AdUREyYNwMelLGvVByt4pGtRR33sqmcvd/S7QVo1DijAZYC3fY?= =?us-ascii?Q?DFrySxe4IIXWfwL1CHrWKKSFdMZVz0ltXdNrZAqXA6cpTuuq9Z2INgu9Ii+T?= =?us-ascii?Q?JwMfXgSXozUWkkBXuK/5WZuXFAuKS4HH28QRy7iTzeSRBV2hYHzNPfays7I/?= =?us-ascii?Q?nKwo5WUcjUOny65Lty2Xkq3rQNkdddVv5f18oXA7L3Ny7w4332hEleg1l71L?=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gDM8h3+XAy8X2uA4kdnKPZrfT0F?= =?us-ascii?Q?vxF4Q0HSwwBywiBqRKxK9DvZ7h3E0EKWj4FAQdXB8vSSeQ3/RWUnFtVKbKnD?= =?us-ascii?Q?cI/KrtEVPwlxGQknFFGK7CQztORaAFQuQJx78ieHZB1bHjGWOL/KcExC2qG7?= =?us-ascii?Q?I71LSH8i3eURK9ColqTxoYS6Yf6vJ9iJZ5be2917ccZzF33bFwMMvZgH3iAA?= =?us-ascii?Q?yyd5S2u1JDWYInGISHSO2u8MrzkeuEN6QAJBw5QT3j5glomLFmaUkEbRHuSC?= =?us-ascii?Q?8sufAECj8AtxpNHXKKyLECC05GP7lq+IIlp9vTAQ?= X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: 2034c2e6-bb90-4771-1dbe-08db81486688 X-MS-Exchange-CrossTenant-AuthSource: SEZPR06MB5269.apcprd06.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 10 Jul 2023 13:20:16.2867 (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: Q+rVaRplNv0Yacc4aP2JgmdK/wcVr9Wnge24w6CYMV4op7KrJKehLaaCNiZFG+d/GF19WdiyhGmm8ahU6a5wiA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SG2PR06MB5131 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_BLOCKED, 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: X-Mailing-List: linux-kernel@vger.kernel.org Use devm_platform_ioremap_resource() to simplify code. Signed-off-by: Yangtao Li --- drivers/video/fbdev/imxfb.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/drivers/video/fbdev/imxfb.c b/drivers/video/fbdev/imxfb.c index 7020b5f6434d..4582ea801121 100644 --- a/drivers/video/fbdev/imxfb.c +++ b/drivers/video/fbdev/imxfb.c @@ -869,7 +869,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; @@ -886,10 +885,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; @@ -971,7 +966,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; -- 2.39.0