Received: by 2002:a6b:fb09:0:0:0:0:0 with SMTP id h9csp5789830iog; Thu, 23 Jun 2022 05:31:46 -0700 (PDT) X-Google-Smtp-Source: AGRyM1uOvPFt+bYyjyxtgX4BvweKskaavMJwRdIPIp+NgVZ0FLyX7he3AioAO/D04xYmtpKT1qzg X-Received: by 2002:a05:6402:42c6:b0:435:dc4b:1bb2 with SMTP id i6-20020a05640242c600b00435dc4b1bb2mr1253359edc.355.1655987505831; Thu, 23 Jun 2022 05:31:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1655987505; cv=none; d=google.com; s=arc-20160816; b=HxUZRanHDJZnJlskO3WHndk8rKUcaqVE16SYfk27TDdd4a7Jw49cDak3gfhtugd5ro qMDWgZoW8gTQ03eFxIraLWm4kbJ6q5dppf+xaxsQXCB3SnYllhhoFLFGhqcKMhlmOMmi BfESxoPD/m86d6h8zsqaVIF1lYcnbQ2cm1b8f0BtVOSIxNVGt4Jql0rzaFm7NTS/lFS8 xclOZlDuEz6RHJuNG/cSxGiGo0FLtlkGEe+S0oiFvtQtja+PLgULS6jBt9RMlAcWv36D ytrqQbHNeIWmXCDJJAYlyAvhpn93cdoiNFTXZGa4eNv92RXoTXcu/Y5VM3BHSlG9kWL0 W6Ew== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=dE7fmtBOiUOU4sxLu/vNILMBhpIA2O6k1eghYdjC8Mg=; b=Id/K81nkj+2ilcsYilANIajr8OcwI8BvCODBnTBEmZQJE0DhnACEeWn1NPf29OCVf2 QTS3iVZb2mdDp9WGsKe1tAXKsykJFaePuPK/V2/zlUvi3lwnLtNL8wQg1uZ722IkN94g iDdtfJh5YFSEEqfDA2uGAxqmRS9ufFJlDgn+XR07mLKk+Hpc5F3odjZGXI792KRo5NPm vjXJe5/BhdP6B1LizrtvbjaY7rZWf3U6znJwjliuSITximnGXbAlFYejodMvUTJOK8+R +GFWif6lOPXEV0X897ZCeERLfAFBVEjFZwfRuA9P1MeqfOdQZjMYu3A8+aI74+lRaIny cp9A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=RX3sx2ed; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=collabora.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id h25-20020a50cdd9000000b004357897e3b8si15981990edj.175.2022.06.23.05.31.19; Thu, 23 Jun 2022 05:31:45 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=RX3sx2ed; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=collabora.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231246AbiFWMQM (ORCPT + 99 others); Thu, 23 Jun 2022 08:16:12 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33972 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230229AbiFWMQK (ORCPT ); Thu, 23 Jun 2022 08:16:10 -0400 Received: from madras.collabora.co.uk (madras.collabora.co.uk [IPv6:2a00:1098:0:82:1000:25:2eeb:e5ab]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DFC1619F for ; Thu, 23 Jun 2022 05:16:06 -0700 (PDT) Received: from IcarusMOD.eternityproject.eu (2-237-20-237.ip236.fastwebnet.it [2.237.20.237]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: kholk11) by madras.collabora.co.uk (Postfix) with ESMTPSA id 020916601796; Thu, 23 Jun 2022 13:16:04 +0100 (BST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1655986565; bh=c1ltb7P9u2qj0Fs9oN4PA6mGEwCxXTSVI8fdy2xBOek=; h=From:To:Cc:Subject:Date:From; b=RX3sx2edtnPFcOUv7DhwLjcZnlIaU5CXGUFNocWsBWPytjo8PsYREV0r1riRDTLJP PW2HWltXu4DfHXZP7dWqOJ1PoLkqfRDAX/WO43328Vv/EjCvaS6iK+LrmttSpYJa4B 0IoS/v0N3SiDaxzONf52VZ7Zv8OYasyujEPr4/Sj3eElcVfKq6hFMdxKeN+LDrJFC/ liVLI3d4q7A6IROK7EczfZVtPkYIR1FTtHJBMW/5NbokP758X8lP/KeY0EK1PsBuzN 2nKE+Lu+tJzXCN7oowhpCr3Hg69fA7KNZsFp6m6WKwPupQ1bElBMsIXP/eDyfBcqhF fDt/iGrpfvcww== From: AngeloGioacchino Del Regno To: srinivas.kandagatla@linaro.org Cc: matthias.bgg@gmail.com, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org, linux-kernel@vger.kernel.org, AngeloGioacchino Del Regno Subject: [PATCH] nvmem: mtk-efuse: Simplify with devm_platform_get_and_ioremap_resource() Date: Thu, 23 Jun 2022 14:15:58 +0200 Message-Id: <20220623121558.107400-1-angelogioacchino.delregno@collabora.com> X-Mailer: git-send-email 2.35.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Convert platform_get_resource(), devm_ioremap_resource() to a single call to devm_platform_get_and_ioremap_resource(), as this is exactly what this function does. No functional changes. Signed-off-by: AngeloGioacchino Del Regno --- drivers/nvmem/mtk-efuse.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/nvmem/mtk-efuse.c b/drivers/nvmem/mtk-efuse.c index e9a375dd84af..a08e0aedd21c 100644 --- a/drivers/nvmem/mtk-efuse.c +++ b/drivers/nvmem/mtk-efuse.c @@ -41,8 +41,7 @@ static int mtk_efuse_probe(struct platform_device *pdev) if (!priv) return -ENOMEM; - res = platform_get_resource(pdev, IORESOURCE_MEM, 0); - priv->base = devm_ioremap_resource(dev, res); + priv->base = devm_platform_get_and_ioremap_resource(pdev, 0, &res); if (IS_ERR(priv->base)) return PTR_ERR(priv->base); -- 2.35.1