From patchwork Wed Aug 28 08:48:49 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jinjie Ruan X-Patchwork-Id: 13780895 Received: from szxga06-in.huawei.com (szxga06-in.huawei.com [45.249.212.32]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id DF4A115749F; Wed, 28 Aug 2024 08:40:59 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=45.249.212.32 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1724834463; cv=none; b=J+kVjJt7c6G0pQYhHQ+e3Vm187SoTvzB7OyapeFo64ousDd9gl3AwwXtIDQePbMzyQMrezF6xNvByYViysv5hPnn3458Oxd7kioApeGCMdbjr49aGDm4EFp2T5NMD7BfsrWqDzyyJTWwOEfVWRLgUGaLUyNAS7ira73goARUdmQ= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1724834463; c=relaxed/simple; bh=HfWTE1Am9nZpyXZKJsfLUjtIgzRg8x76TSy+kRfaV/s=; h=From:To:CC:Subject:Date:Message-ID:MIME-Version:Content-Type; b=Xz4no/Po9yzD6WZZx7NIWZU1fAYXmu2Budtm2eWnGx+SmjEA9tJBssu7AObNaRQdhINtONrqOiB9k2JGMoOkmw4iFLy5m+kJ5vm4AGXXYm8kEnTyGSQK4eaLVHk+aeWBr/cpG1PX23m1Y2h6g1/fr0be7ZBwv2VMyaIjQ4cEVEU= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=huawei.com; spf=pass smtp.mailfrom=huawei.com; arc=none smtp.client-ip=45.249.212.32 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=huawei.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=huawei.com Received: from mail.maildlp.com (unknown [172.19.162.112]) by szxga06-in.huawei.com (SkyGuard) with ESMTP id 4WtyW73xqjz1xwSZ; Wed, 28 Aug 2024 16:38:59 +0800 (CST) Received: from kwepemh500013.china.huawei.com (unknown [7.202.181.146]) by mail.maildlp.com (Postfix) with ESMTPS id 28D1F14013B; Wed, 28 Aug 2024 16:40:57 +0800 (CST) Received: from huawei.com (10.90.53.73) by kwepemh500013.china.huawei.com (7.202.181.146) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1544.11; Wed, 28 Aug 2024 16:40:56 +0800 From: Jinjie Ruan To: , , , , , , , , , , CC: Subject: [PATCH -next] drm/msm: Use devm_platform_ioremap_resource_byname() Date: Wed, 28 Aug 2024 16:48:49 +0800 Message-ID: <20240828084849.2527115-1-ruanjinjie@huawei.com> X-Mailer: git-send-email 2.34.1 Precedence: bulk X-Mailing-List: linux-arm-msm@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-ClientProxiedBy: dggems701-chm.china.huawei.com (10.3.19.178) To kwepemh500013.china.huawei.com (7.202.181.146) platform_get_resource_byname() and devm_ioremap_resource() can be replaced by devm_platform_ioremap_resource_byname(), which can simplify the code logic a bit, No functional change here. Signed-off-by: Jinjie Ruan Reviewed-by: Abhinav Kumar --- drivers/gpu/drm/msm/msm_io_utils.c | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/drivers/gpu/drm/msm/msm_io_utils.c b/drivers/gpu/drm/msm/msm_io_utils.c index afedd61c3e28..6f7933f01ae6 100644 --- a/drivers/gpu/drm/msm/msm_io_utils.c +++ b/drivers/gpu/drm/msm/msm_io_utils.c @@ -54,13 +54,7 @@ void __iomem *msm_ioremap_mdss(struct platform_device *mdss_pdev, struct platform_device *pdev, const char *name) { - struct resource *res; - - res = platform_get_resource_byname(mdss_pdev, IORESOURCE_MEM, name); - if (!res) - return ERR_PTR(-EINVAL); - - return devm_ioremap_resource(&pdev->dev, res); + return devm_platform_ioremap_resource_byname(mdss_pdev, name); } static void __iomem *_msm_ioremap(struct platform_device *pdev, const char *name,