Received: by 2002:a05:6a10:1d13:0:0:0:0 with SMTP id pp19csp4509382pxb; Tue, 31 Aug 2021 06:59:06 -0700 (PDT) X-Google-Smtp-Source: ABdhPJygM2EeUSaTYbBUePoT4KL65vkGZ5pXfGEWarZuM1b3OWbrnNVK34gKvpitFYgeMC8j+1Ls X-Received: by 2002:a92:3f01:: with SMTP id m1mr10483744ila.105.1630418346672; Tue, 31 Aug 2021 06:59:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1630418346; cv=none; d=google.com; s=arc-20160816; b=LPy9leJ6XllaueJe8g9SiilNbgpLWrHM+V5t5VaZJ63RO9iUjYp6yg7LpsKeYxpKGc yRXIoRsbHr4Yo5wfcFjUOOBNSRqFOIdtInWIv7WquG7X2OfQbiqRSvVPhYURXUlMB6a2 oabkwQ4UnrlI0N0kw9JqiUWdn/N/YXu1JKu3mcoKWI43kfKARDQYxRaBkSUZIX1EXyPk OBmdCEsF9CAMar/UGGZP/vt8kzPZAHzUIMwf0ViobpJP2RRCXQFrLERPXMP5l8wHO0ut cfySiceHyuySbaa0Rfmn0Zjh3HtVLCukXYUAprnAi+6WgsiCuG9T2tai/eMHrHf2Y5lq 9fuA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:message-id:date:subject:cc:to:from; bh=AZsN/IY7HNJB2en7JyKtLmhk92b8RuBnZ7p+Zu1+Ymk=; b=vQEF7yBEJM0Ev1NwqGWJc6CM9NJnH+eyRBi4vuKCxJXCEoLkggQHWgRo/nOuRr6riA SaXQJtl2rcqR2cFZvcP+W1Dik7HhBnK0ehrVJ8GXroNpnATpm0NohwwOoesy7YF79G2Q q4i6WZr5PfaD4wa6jwCqFOGy8xun4pYhjEL50IbyVxwryPXW6qWg2bFVtyvzGk20uTx/ Q0fSFgfwE2+XcbwkYy+zkJglpvkV8DvZph/zlIv2V6w68OL/0UMzDfu9BUXGujMP0rDU sXVyKi+o0DXH42xo9iqS0fwSmUHfftDZhuWXk3GTfWFR1gxroI8tIPIWYWY6bYj/TuUL T31w== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id 70si7419205ioc.95.2021.08.31.06.58.52; Tue, 31 Aug 2021 06:59:06 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235551AbhHaN6U (ORCPT + 99 others); Tue, 31 Aug 2021 09:58:20 -0400 Received: from mx21.baidu.com ([220.181.3.85]:60476 "EHLO baidu.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S232851AbhHaN57 (ORCPT ); Tue, 31 Aug 2021 09:57:59 -0400 Received: from BC-Mail-Ex14.internal.baidu.com (unknown [172.31.51.54]) by Forcepoint Email with ESMTPS id 5AA70121A2CF6C27C6D3; Tue, 31 Aug 2021 21:57:01 +0800 (CST) Received: from BJHW-MAIL-EX27.internal.baidu.com (10.127.64.42) by BC-Mail-Ex14.internal.baidu.com (172.31.51.54) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2242.12; Tue, 31 Aug 2021 21:57:01 +0800 Received: from LAPTOP-UKSR4ENP.internal.baidu.com (172.31.63.8) by BJHW-MAIL-EX27.internal.baidu.com (10.127.64.42) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2308.14; Tue, 31 Aug 2021 21:57:00 +0800 From: Cai Huoqing To: CC: Marek Vasut , Stefan Agner , David Airlie , Daniel Vetter , Shawn Guo , Sascha Hauer , "Pengutronix Kernel Team" , Fabio Estevam , "NXP Linux Team" , , , Subject: [PATCH] drm/mxsfb: Make use of the helper function devm_platform_ioremap_resource() Date: Tue, 31 Aug 2021 21:56:54 +0800 Message-ID: <20210831135654.4626-1-caihuoqing@baidu.com> X-Mailer: git-send-email 2.17.1 MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [172.31.63.8] X-ClientProxiedBy: BC-Mail-Ex30.internal.baidu.com (172.31.51.24) To BJHW-MAIL-EX27.internal.baidu.com (10.127.64.42) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Use the devm_platform_ioremap_resource() helper instead of calling platform_get_resource() and devm_ioremap_resource() separately Signed-off-by: Cai Huoqing --- drivers/gpu/drm/mxsfb/mxsfb_drv.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/gpu/drm/mxsfb/mxsfb_drv.c b/drivers/gpu/drm/mxsfb/mxsfb_drv.c index ec0432fe1bdf..86938d24b32f 100644 --- a/drivers/gpu/drm/mxsfb/mxsfb_drv.c +++ b/drivers/gpu/drm/mxsfb/mxsfb_drv.c @@ -200,7 +200,6 @@ static int mxsfb_load(struct drm_device *drm, { struct platform_device *pdev = to_platform_device(drm->dev); struct mxsfb_drm_private *mxsfb; - struct resource *res; int ret; mxsfb = devm_kzalloc(&pdev->dev, sizeof(*mxsfb), GFP_KERNEL); @@ -211,8 +210,7 @@ static int mxsfb_load(struct drm_device *drm, drm->dev_private = mxsfb; mxsfb->devdata = devdata; - res = platform_get_resource(pdev, IORESOURCE_MEM, 0); - mxsfb->base = devm_ioremap_resource(drm->dev, res); + mxsfb->base = devm_platform_ioremap_resource(pdev, 0); if (IS_ERR(mxsfb->base)) return PTR_ERR(mxsfb->base); -- 2.25.1