Received: by 2002:a05:6a10:eb17:0:0:0:0 with SMTP id hx23csp401025pxb; Wed, 8 Sep 2021 03:58:04 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwde0oDrf+UOq2Ug48Ag6Y3DZZCNKlK9UfWUNUtIr51HRl3q87yZDFKWLOuNHvXL62YdcaG X-Received: by 2002:a02:9566:: with SMTP id y93mr3054411jah.55.1631098684626; Wed, 08 Sep 2021 03:58:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1631098684; cv=none; d=google.com; s=arc-20160816; b=0NnYCjvW0FVFtA4JIxDf/TRLEom+7yGkPhtJ+ZFflWMIU1ZkyYoPzDTmMRVRCU3v8Z O5GRnUjF4wK5wqP8I8SqkGEDNl0tXrPzJ2Umd//qIZ40rXYrhUMkLKJMhGi1XDk3gOIo o0fQ5za2efAwz+KnlUtaFKPxaOgDlN5sNqIHLmEIDCUd6wSsZbV6mHF9B3I2BEULkQZ5 /Wa92q4yMCi90YsdOIpbiAjaygvBaEDfDoks/WrIisZKEVQPvktI3Z70nVOdfwOtbdKq sDMNMxuLoReKVfKJNPgvySoJFKfWJgn+vF1vZiEaolHbc6OfGw4sxC/JUsBxRAx12JOQ vcQQ== 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=atMkiKAUHQi/g2WL2NCsB46zOUAg9RRAB3+xip+arjs=; b=X4dvPfy+b9PiAfE5GcPrNmb15J1soLYdEFDmpE4fQl7K4Xw/2O/C3iCuTgRFPLN/ik 9uJ7DhZMIv0VUlHI2pcB9iwUasYn9g4f5Mw7r/Bxg9w9H9diDwuD9Dhc5jnqPh/bMhST dwM6a9x9YQMZsDzHXrV22mlTzI1HErf6vqSf96SuSqcfNFqQDlEHkVrwki9ewxDsiGVS 8AFMfwpiiQlOZs5FDmMtUCtOHD3ITZ5zqGRZYPOAZR2/sT+hv7C2aq/T8oGk93jLotUF 42p8c4qQN7+2wSJiMBUvzZxGfoATu/5abk6aOnA5cAcAjJnD9IJRzgQAU3a9tACCw7hn H2Mg== 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 q7si2138704ilu.111.2021.09.08.03.57.52; Wed, 08 Sep 2021 03:58:04 -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 S1349059AbhIHK6E (ORCPT + 99 others); Wed, 8 Sep 2021 06:58:04 -0400 Received: from mx20.baidu.com ([111.202.115.85]:40088 "EHLO baidu.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1348979AbhIHK5y (ORCPT ); Wed, 8 Sep 2021 06:57:54 -0400 Received: from BJHW-Mail-Ex05.internal.baidu.com (unknown [10.127.64.15]) by Forcepoint Email with ESMTPS id 1F312325696CBF91C806; Wed, 8 Sep 2021 18:56:45 +0800 (CST) Received: from BJHW-MAIL-EX27.internal.baidu.com (10.127.64.42) by BJHW-Mail-Ex05.internal.baidu.com (10.127.64.15) 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:44 +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:44 +0800 From: Cai Huoqing To: CC: Jonathan Cameron , Lars-Peter Clausen , Maxime Coquelin , Alexandre Torgue , , , , Subject: [PATCH] iio: dac: stm32-dac: Make use of the helper function devm_platform_ioremap_resource() Date: Wed, 8 Sep 2021 18:56:38 +0800 Message-ID: <20210908105638.1525-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) X-Baidu-BdMsfe-DateCheck: 1_BJHW-Mail-Ex05_2021-09-08 18:56:45:120 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/dac/stm32-dac-core.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/iio/dac/stm32-dac-core.c b/drivers/iio/dac/stm32-dac-core.c index 906436780347..9a6a68b11b2a 100644 --- a/drivers/iio/dac/stm32-dac-core.c +++ b/drivers/iio/dac/stm32-dac-core.c @@ -90,7 +90,6 @@ static int stm32_dac_probe(struct platform_device *pdev) const struct stm32_dac_cfg *cfg; struct stm32_dac_priv *priv; struct regmap *regmap; - struct resource *res; void __iomem *mmio; struct reset_control *rst; int ret; @@ -106,8 +105,7 @@ static int stm32_dac_probe(struct platform_device *pdev) cfg = (const struct stm32_dac_cfg *) of_match_device(dev->driver->of_match_table, dev)->data; - res = platform_get_resource(pdev, IORESOURCE_MEM, 0); - mmio = devm_ioremap_resource(dev, res); + mmio = devm_platform_ioremap_resource(pdev, 0); if (IS_ERR(mmio)) return PTR_ERR(mmio); -- 2.25.1