Received: by 2002:a6b:fb09:0:0:0:0:0 with SMTP id h9csp3072184iog; Mon, 27 Jun 2022 08:33:49 -0700 (PDT) X-Google-Smtp-Source: AGRyM1vEBYfKkdMnKh7yZZuwtDVuOeLj5bD2PR7FtIB7ZofxnwHO9v7V3jbwSlynxVN4hlRyIRhb X-Received: by 2002:a17:90b:350f:b0:1ed:4d69:75f3 with SMTP id ls15-20020a17090b350f00b001ed4d6975f3mr12174028pjb.17.1656344029129; Mon, 27 Jun 2022 08:33:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1656344029; cv=none; d=google.com; s=arc-20160816; b=s97CDE2esWSoG8NZFTxqqRcOn35qjNiCCVXeprNdoAodZQUwUosQvleum1KBurQ+Hi xS5GPfVJ/UDdxG8kEej/AR4GEp++5Du1Lvp1AOVhoC3x89Ea4f9JDd1CoNvN4ZydVFJ2 dM/4i3fSiCFvJn1yANY0PCdIvWUqb6DNLcRKWDrecjRmAggh+2O9xT7U8oq6Xu5rGK6Q qcfckX9W7zbpIrFq0eO+Go6zvv0SByjQTpqvGOmFKiTU6iJYrOQeEBksR9lyhRVGNLLa xot3wN5gHcgt+CeBZ/tpkpvsaR6s5rDUDUuhgDFF+qNdFcAbqGeZFZIeE1O+hWab6MpJ PxRw== 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 :references:in-reply-to:message-id:date:subject:cc:to:from; bh=mm6BB5yiLx98Z2XGU3aHg3lmaHmIc97MF4Ia84TQBcQ=; b=fMiWaIUX0bLDHnJBhBiY/h/tI5/q/4Ye3A3qv/CFqUiz2IYVjDAioQS59bX+ZsCJ1l eQS5Q0e+RybdW1qWGbdXg75BrYdEA/K1474KUouwDusDcEdUf5kxGGkPIsKe1wXs+pKX nOrmG5IDpJ5eAjwdK71GvxIU5u7Ir+ve3HPc+qxUSflahM7kSwgdzEv9KeuGmz5Hx0tC L7zqNrXy/enYjkucYXvneZtgBot1LSEKmtZxRam98rXaPdAyTHilOF+p3ERImh3nsWSf wLv8HlmEIegoMQd73qID+B0d/i0gVbWzUbrkHCJlJWBVWuihwFwZVZjcC+1v0uJaJdd2 UlAA== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id pq7-20020a17090b3d8700b001ed354b0bd4si12142860pjb.140.2022.06.27.08.33.35; Mon, 27 Jun 2022 08:33:49 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236965AbiF0Pbg (ORCPT + 99 others); Mon, 27 Jun 2022 11:31:36 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51080 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238137AbiF0Pb1 (ORCPT ); Mon, 27 Jun 2022 11:31:27 -0400 Received: from xavier.telenet-ops.be (xavier.telenet-ops.be [IPv6:2a02:1800:120:4::f00:14]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 430F819C36 for ; Mon, 27 Jun 2022 08:31:24 -0700 (PDT) Received: from ramsan.of.borg ([84.195.186.194]) by xavier.telenet-ops.be with bizsmtp id oFXH2700W4C55Sk01FXHal; Mon, 27 Jun 2022 17:31:23 +0200 Received: from rox.of.borg ([192.168.97.57]) by ramsan.of.borg with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.93) (envelope-from ) id 1o5qhp-0014yY-2P; Mon, 27 Jun 2022 17:31:17 +0200 Received: from geert by rox.of.borg with local (Exim 4.93) (envelope-from ) id 1o5qho-004jEM-El; Mon, 27 Jun 2022 17:31:16 +0200 From: Geert Uytterhoeven To: Vignesh Raghavendra , Sergey Shtylyov , Krzysztof Kozlowski , Wolfram Sang , Lad Prabhakar , Miquel Raynal , Richard Weinberger Cc: Mark Brown , linux-mtd@lists.infradead.org, linux-renesas-soc@vger.kernel.org, linux-spi@vger.kernel.org, linux-kernel@vger.kernel.org, Geert Uytterhoeven Subject: [PATCH 1/7] memory: renesas-rpc-if: Always use dev in rpcif_sw_init() Date: Mon, 27 Jun 2022 17:31:08 +0200 Message-Id: <98924121e59ab3f389ddd413b6d252a8deb889cf.1656341824.git.geert+renesas@glider.be> X-Mailer: git-send-email 2.25.1 In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.4 required=5.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,RCVD_IN_DNSWL_LOW,SPF_HELO_NONE,SPF_NONE, 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 rpcif_sw_init() already has the "dev" parameter pointing to the right device structure, so there is no need to take a detour through the platform device. Signed-off-by: Geert Uytterhoeven --- drivers/memory/renesas-rpc-if.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/drivers/memory/renesas-rpc-if.c b/drivers/memory/renesas-rpc-if.c index 4316988d791a527f..829b962e8f034bdd 100644 --- a/drivers/memory/renesas-rpc-if.c +++ b/drivers/memory/renesas-rpc-if.c @@ -263,22 +263,21 @@ int rpcif_sw_init(struct rpcif *rpc, struct device *dev) if (IS_ERR(rpc->base)) return PTR_ERR(rpc->base); - rpc->regmap = devm_regmap_init(&pdev->dev, NULL, rpc, &rpcif_regmap_config); + rpc->regmap = devm_regmap_init(dev, NULL, rpc, &rpcif_regmap_config); if (IS_ERR(rpc->regmap)) { - dev_err(&pdev->dev, - "failed to init regmap for rpcif, error %ld\n", + dev_err(dev, "failed to init regmap for rpcif, error %ld\n", PTR_ERR(rpc->regmap)); return PTR_ERR(rpc->regmap); } res = platform_get_resource_byname(pdev, IORESOURCE_MEM, "dirmap"); - rpc->dirmap = devm_ioremap_resource(&pdev->dev, res); + rpc->dirmap = devm_ioremap_resource(dev, res); if (IS_ERR(rpc->dirmap)) return PTR_ERR(rpc->dirmap); rpc->size = resource_size(res); rpc->type = (uintptr_t)of_device_get_match_data(dev); - rpc->rstc = devm_reset_control_get_exclusive(&pdev->dev, NULL); + rpc->rstc = devm_reset_control_get_exclusive(dev, NULL); return PTR_ERR_OR_ZERO(rpc->rstc); } -- 2.25.1