Received: by 2002:a05:6a10:eb17:0:0:0:0 with SMTP id hx23csp485500pxb; Wed, 8 Sep 2021 05:53:15 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzZK/5VmcPiTQHS6mx5FeDKP/9CtbERiy/dg4T3hoI8BwzKXLNufIX1YNt+d9aKnmznU3mB X-Received: by 2002:a05:6602:340a:: with SMTP id n10mr3194698ioz.188.1631105594942; Wed, 08 Sep 2021 05:53:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1631105594; cv=none; d=google.com; s=arc-20160816; b=CV8GRN7gpx10zGcwgFOEoRGXtoKXlfsiwWPizjXxkmP1Ws5TALumV0zyfNdn1xpgk+ 9BAZJLapHYre9JgQEXaxZN1VqC1ROSyEtxnP41g1FxDrftPkuVoSWpRHiIiLOt6SrlZZ rv+yzh8iuaEK7zjt+2F2474N6TqLs4cbZhkQIP5iobMYSfRJZSWZG3c5W6WCsMqsz7ao ABUzYw2Swb5Ow12+L0Zkt/rIZj/6LWRL3YC+tZY5N2y4xq+KWETCZRStFE+hxa2dUKdR EfCLN63KqJp/NHloUaZLoscGdC0Wy6PEw2+Le/yY/DmLjLoRiLCtj58yWkPikOfP4q0o LecQ== 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=TNfUlwCpwGfYLxcZIXpe9SqWDj2nAkeXJwO4RuVZRQM=; b=JeTd+PTSua31FfNBqLJCk7luJS5mg3/vzaXdUsR4SH/s8xlRkxVVBT0e7Dd8SdH9Rk 6qHU+XQei0YNIJDQdZOo2uG+ThmhEWxz/VuOsOjPkIIPuVWioVdWjAeNPC+GRL7GqNWE VoN5EDKt5p/W26xH7q7gcgKU9nLzLZqCMO/i4p3W3tzTgTYso76Xkh5wPNoBL3CLnLdk rt8YHQzKaICAGTIi+12aaDltwjG5VPo6Ml8oso+cv/NMNsnkQgmPUCMoKuV9vTX65QHe 7l0BvaH8MGstHCU/F1ShWQJfK4ReD61Agv39W6tmQqHKwkw7SPVrPz0269JCD0pQivAV jXvQ== 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 y12si2472727ilu.84.2021.09.08.05.53.00; Wed, 08 Sep 2021 05:53:14 -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 S1348968AbhIHK5u (ORCPT + 99 others); Wed, 8 Sep 2021 06:57:50 -0400 Received: from mx20.baidu.com ([111.202.115.85]:39978 "EHLO baidu.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S242347AbhIHK5r (ORCPT ); Wed, 8 Sep 2021 06:57:47 -0400 Received: from BJHW-Mail-Ex03.internal.baidu.com (unknown [10.127.64.13]) by Forcepoint Email with ESMTPS id 9CC0367B9CD6297E3102; Wed, 8 Sep 2021 18:56:37 +0800 (CST) Received: from BJHW-MAIL-EX27.internal.baidu.com (10.127.64.42) by BJHW-Mail-Ex03.internal.baidu.com (10.127.64.13) 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 18:56:37 +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 18:56:36 +0800 From: Cai Huoqing To: CC: Jonathan Cameron , Lars-Peter Clausen , Heiko Stuebner , , , , Subject: [PATCH] iio: adc: rockchip_saradc: Make use of the helper function devm_platform_ioremap_resource() Date: Wed, 8 Sep 2021 18:56:30 +0800 Message-ID: <20210908105631.1474-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: BJHW-Mail-Ex15.internal.baidu.com (10.127.64.38) 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/iio/adc/rockchip_saradc.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/iio/adc/rockchip_saradc.c b/drivers/iio/adc/rockchip_saradc.c index a237fe469a30..a56a0d7337ca 100644 --- a/drivers/iio/adc/rockchip_saradc.c +++ b/drivers/iio/adc/rockchip_saradc.c @@ -319,7 +319,6 @@ static int rockchip_saradc_probe(struct platform_device *pdev) struct rockchip_saradc *info = NULL; struct device_node *np = pdev->dev.of_node; struct iio_dev *indio_dev = NULL; - struct resource *mem; const struct of_device_id *match; int ret; int irq; @@ -348,8 +347,7 @@ static int rockchip_saradc_probe(struct platform_device *pdev) return -EINVAL; } - mem = platform_get_resource(pdev, IORESOURCE_MEM, 0); - info->regs = devm_ioremap_resource(&pdev->dev, mem); + info->regs = devm_platform_ioremap_resource(pdev, 0); if (IS_ERR(info->regs)) return PTR_ERR(info->regs); -- 2.25.1