From patchwork Mon Jul 10 13:20:00 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: 117923 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:9f45:0:b0:3ea:f831:8777 with SMTP id v5csp5032354vqx; Mon, 10 Jul 2023 06:39:24 -0700 (PDT) X-Google-Smtp-Source: APBJJlFY2JoLFEH0FCPXyozE3Bh2zzucZ7NKeypWftBEGm7SaPSSLbKuG5txQ2AuxVNYoNwG4v8U X-Received: by 2002:a05:6512:3190:b0:4fb:96ed:93b3 with SMTP id i16-20020a056512319000b004fb96ed93b3mr11597980lfe.65.1688996364485; Mon, 10 Jul 2023 06:39:24 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1688996364; cv=pass; d=google.com; s=arc-20160816; b=0znWUdSXR9KN6muC1woZl2lmlumxyRU3awAonmMkmXBhkS6zKl9u/1jtw0ctXj19iA SemoB8rc8DUd7Z4X5IJPGU6aDsbBE5liOqN7vrbIsJroaZAGoflQhDmai0MYQe68rPhV dTchjB3pZ1t/jnZ1lVDdt3SLTfNyT+5f/R0ZCDIuqZ/Ic1AHHVYUHYRg+mDOCXer7/g5 SU018VAMb3r7gLSujpcDLdxZ8zd50VW1KBuO+hwWM1yXUoJkg3PRfhiZcgw/4vP/jT6+ cJd4KqWwZdkHlfVwwzNbuSkkJWDF2W3EGHmWaO1WFnx0YKJnhhNVJE9C3j1CX4pD6nOC bF+w== 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 Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id f4-20020a170906560400b009932537925asi10276913ejq.550.2023.07.10.06.38.57; Mon, 10 Jul 2023 06:39:24 -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 S231575AbjGJNU1 (ORCPT + 99 others); Mon, 10 Jul 2023 09:20:27 -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> 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: Xylkbb01x1myo3KuV0eseSgfQrIkFzybxTeozMC1qMFNH0mOWu6AV6HK07+Y8LqZHRAz+NSDGe/SWSdVjwlg4/yIfJ9dVJyKCxnJR2+GXmz6sWn797Nv29xaMLZwGXTZw6SVf0vek19RTFyK1RTAxJZDBbkdh42Cl3Ee+/dnG95a3NUDnp/DE6h7IGtWB5AdUREyYNwMelLGvVByt4pGtRR33sqmcvd/S7QVo1DijAZYC3fYDFrySxe4IIXWfwL1CHrWKKSFdMZVz0ltXdNrZAqXA6cpTuuq9Z2INgu9Ii+TJwMfXgSXozUWkkBXuK/5WZuXFAuKS4HH28QRy7iTzeSRBV2hYHzNPfays7I/nKwo5WUcjUOny65Lty2Xkq3rQNkddd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9iJZ5be2917ccZzF33bFwMMvZgH3iAAyyd5S2u1JDWYInGISHSO2u8MrzkeuEN6QAJBw5QT3j5glomLFmaUkEbRHuSC8sufAECj8AtxpNHXKKyLECC05GP7lq+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 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1771041052121438690 X-GMAIL-MSGID: 1771041052121438690 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;