Received: by 2002:a05:6a10:eb17:0:0:0:0 with SMTP id hx23csp265432pxb; Wed, 8 Sep 2021 00:12:32 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzjQ+5i7NwGXsN7kcEUJEqrx1pLfNUK47EUpW2/FSh4Kju+USdSiiCFzV57GNL2qyFDAhKw X-Received: by 2002:a17:906:3157:: with SMTP id e23mr2590908eje.29.1631085152014; Wed, 08 Sep 2021 00:12:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1631085152; cv=none; d=google.com; s=arc-20160816; b=kV2Y9fMqH7cH3Cj1SlF+we9Mbc7ilU/LTKlARuYkLDs+fJqzK5xhZlMFmcVEOFF9sB i7zYBRK+ozp/KvLYocdUwKEJ+TZpS0PrKH8qT7wOqe9ywFxD+iIROZRnhzwXHHi+zcRD mhi6zczEtaCD2yfjTbgS4Edn6eqaXbQbiMFiYU7q+6n2DUslu7cxNysyh4rzihkwWX+u uCrURcZ8u+zBkGq+digHADq7I61AMh/Q8LdKaZeOiw0T6ieZagYOSUguefxILWs29dii EWsQ4+IrwUUJKt/uJ5Czv2WGadegHs3TLli/rtghejNQEv2kBAUIPkmlVQ1+16thP1bn h15w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:references:in-reply-to:message-id :date:subject:cc:to:from; bh=e+4a/BMUM/kW04OrtBKYCQ/EJfPzli7fVG5Nv+svJYI=; b=jg2EUYcYGPVTZh+4O0WzO6Udtb8Q6ZXOSdL+S9z57T1XnPmHFoLErDtrDrD3uAeL84 c2/5DLeZ9kiRuwnnHXZIz0uaoRgrrWEaz9IZt0AodBcoYFAPCg6RXWwtNbiWu1HcHWdK Ny3aRNviWpDgZu1pL4pGgtkZcdzDfjb6X3pMoY2+fDk2uOK4gM9SONALxOV+CUQ4SD2f xfHgyoK9uAJosS28xZ/bGKoTGWefcRl1YLMSibe7QtZF/5P5Q5Z3jMzd6meLHfRbhq+/ Nin4Bhr6CIFIJ/k8jMgW7MN1aF1Mdi0PEELlpjmhFB42CA3SfVpyU1fxj+FaSYLzMV+s dZWQ== 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 i2si1578384ejw.120.2021.09.08.00.12.08; Wed, 08 Sep 2021 00:12:32 -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 S1348197AbhIHHLJ (ORCPT + 99 others); Wed, 8 Sep 2021 03:11:09 -0400 Received: from mx20.baidu.com ([111.202.115.85]:55136 "EHLO baidu.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1347504AbhIHHLA (ORCPT ); Wed, 8 Sep 2021 03:11:00 -0400 Received: from BC-Mail-Ex10.internal.baidu.com (unknown [172.31.51.50]) by Forcepoint Email with ESMTPS id 7BF9BA85B7143C02D90D; Wed, 8 Sep 2021 15:09:50 +0800 (CST) Received: from BJHW-MAIL-EX27.internal.baidu.com (10.127.64.42) by BC-Mail-Ex10.internal.baidu.com (172.31.51.50) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2242.12; Wed, 8 Sep 2021 15:09:50 +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; Wed, 8 Sep 2021 15:09:49 +0800 From: Cai Huoqing To: CC: Niklas Cassel , Andy Gross , "Bjorn Andersson" , , , Subject: [PATCH 6/6] soc: qcom: rpmh-rsc: Make use of the helper function devm_platform_ioremap_resource_byname() Date: Wed, 8 Sep 2021 15:09:30 +0800 Message-ID: <20210908070930.214-6-caihuoqing@baidu.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20210908070930.214-1-caihuoqing@baidu.com> References: <20210908070930.214-1-caihuoqing@baidu.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [172.31.63.8] X-ClientProxiedBy: BJHW-Mail-Ex11.internal.baidu.com (10.127.64.34) 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_byname() helper instead of calling platform_get_resource_byname() and devm_ioremap_resource() separately Signed-off-by: Cai Huoqing --- drivers/soc/qcom/rpmh-rsc.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/soc/qcom/rpmh-rsc.c b/drivers/soc/qcom/rpmh-rsc.c index e749a2b285d8..2834c6efc16b 100644 --- a/drivers/soc/qcom/rpmh-rsc.c +++ b/drivers/soc/qcom/rpmh-rsc.c @@ -910,7 +910,6 @@ static int rpmh_rsc_probe(struct platform_device *pdev) { struct device_node *dn = pdev->dev.of_node; struct rsc_drv *drv; - struct resource *res; char drv_id[10] = {0}; int ret, irq; u32 solver_config; @@ -941,8 +940,7 @@ static int rpmh_rsc_probe(struct platform_device *pdev) drv->name = dev_name(&pdev->dev); snprintf(drv_id, ARRAY_SIZE(drv_id), "drv-%d", drv->id); - res = platform_get_resource_byname(pdev, IORESOURCE_MEM, drv_id); - base = devm_ioremap_resource(&pdev->dev, res); + base = devm_platform_ioremap_resource_byname(pdev, dri_id); if (IS_ERR(base)) return PTR_ERR(base); -- 2.25.1