Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp7507102rwb; Wed, 23 Nov 2022 07:21:26 -0800 (PST) X-Google-Smtp-Source: AA0mqf4MTWGEcesMIH+hG86UDUi1snrYrs6P1OXTl7ErS8gLMFuRkjP0n2pNJy8RtxUAyxpP67Hw X-Received: by 2002:a17:906:a2d1:b0:781:bc28:f455 with SMTP id by17-20020a170906a2d100b00781bc28f455mr23902194ejb.170.1669216886768; Wed, 23 Nov 2022 07:21:26 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1669216886; cv=none; d=google.com; s=arc-20160816; b=UmuK8dlsNNjWi6Rm0yWZrc0KwkwRRWVvEVrfsQ4jMXDPETjtxERllFkQ6/UvwanRJz cTflVPH49+EwlLwIItwawGvJ4/ScWLHfy7xLvDxMTzukFERjr5UEevNJJkUxvEyhL/6Y 8wL/cId8RHJrtw6D+Ky/cbKjgOXGYy9MXBGc6kWft3+L9AvtjdKsCAoDlErZJXnyCIIW He4XzBEU2/btmGKdGCn8wDgwy6sC9uesrm8RZkmJeJDEG7+NRkKZfHeBFiwr5nNgTn9k JoHJGiyXNKhLHit3CywUadMEYxzVQAqsSVO7ekyHyv+o8RPv/yjtuWZ4youCBdoQRFnk 1tSQ== 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=epM7ihmg2Sp3Ga9d0ILj3Fm9FFx2G/K8T7olctjIfLc=; b=imt/fzrdZJa5SpLFl/3O7Oereu0mZtBjwexITkdBkdtpwJEtUX1UOe+ZEqoD6SpJ8j dHbF/HqkFGajP7SsfFcV1h7SaLKObIRemSyXabWzy+J5E4Jl7JLlWvC3NLZ/I8dCg8rR gEWugNfm8nrq4xtGqrS75RgMa7KHPJapBUva6crTQAvxR5Yru6eD4rWdzZ2NJqMrHolX xKHNB6xNxunCVk5FycbcVUVzQrn3g8GYk7dkpEVHjb41OfhRm5FqAFNBu4Sn+3z4tSoi 8KH4axu3/6ikrbjPVPdwIM0htxAWvMPYcjpmntIy1xT3Ath2/PPDOMjc3Lim6LQ1+ADL DI0g== 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 t17-20020a056402525100b0045d4015cdaesi16074785edd.372.2022.11.23.07.21.04; Wed, 23 Nov 2022 07:21:26 -0800 (PST) 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 S238526AbiKWOlm (ORCPT + 88 others); Wed, 23 Nov 2022 09:41:42 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40486 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238477AbiKWOlg (ORCPT ); Wed, 23 Nov 2022 09:41:36 -0500 Received: from laurent.telenet-ops.be (laurent.telenet-ops.be [IPv6:2a02:1800:110:4::f00:19]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 541FD58039 for ; Wed, 23 Nov 2022 06:41:33 -0800 (PST) Received: from ramsan.of.borg ([IPv6:2a02:1810:ac12:ed10:881b:815b:474d:c3fd]) by laurent.telenet-ops.be with bizsmtp id nqhS2800e49U0Rd01qhSaN; Wed, 23 Nov 2022 15:41:30 +0100 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 1oxqwI-001Rqi-06; Wed, 23 Nov 2022 15:41:26 +0100 Received: from geert by rox.of.borg with local (Exim 4.93) (envelope-from ) id 1oxqwH-0012HT-3W; Wed, 23 Nov 2022 15:41:25 +0100 From: Geert Uytterhoeven To: Krzysztof Kozlowski , Vignesh Raghavendra , Miquel Raynal , Richard Weinberger , Mark Brown Cc: Philipp Zabel , Sergey Shtylyov , Wolfram Sang , linux-kernel@vger.kernel.org, linux-mtd@lists.infradead.org, linux-spi@vger.kernel.org, linux-renesas-soc@vger.kernel.org, Geert Uytterhoeven Subject: [PATCH v2 3/6] memory: renesas-rpc-if: Always use dev in rpcif_probe() Date: Wed, 23 Nov 2022 15:41:19 +0100 Message-Id: <298009c43ad119703f564c0f1864743914b4beeb.1669213027.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.3 required=5.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,RCVD_IN_DNSWL_LOW,SPF_HELO_NONE,SPF_NONE 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_probe() already has a "dev" variable pointing to the right device structure, so there is no need to take a detour through the platform device. Signed-off-by: Geert Uytterhoeven --- v2: - Combination of the old "memory: renesas-rpc-if: Always use dev in rpcif_sw_init()" and "memory: renesas-rpc-if: Add dev helper to rpcif_probe()" after rebasing on top of the two fixes. --- drivers/memory/renesas-rpc-if.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/drivers/memory/renesas-rpc-if.c b/drivers/memory/renesas-rpc-if.c index 42c5f9f10135b86a..83171242f9514c22 100644 --- a/drivers/memory/renesas-rpc-if.c +++ b/drivers/memory/renesas-rpc-if.c @@ -688,9 +688,9 @@ static int rpcif_probe(struct platform_device *pdev) const char *name; int ret; - flash = of_get_next_child(pdev->dev.of_node, NULL); + flash = of_get_next_child(dev->of_node, NULL); if (!flash) { - dev_warn(&pdev->dev, "no flash node found\n"); + dev_warn(dev, "no flash node found\n"); return -ENODEV; } @@ -700,12 +700,12 @@ static int rpcif_probe(struct platform_device *pdev) name = "rpc-if-hyperflash"; } else { of_node_put(flash); - dev_warn(&pdev->dev, "unknown flash type\n"); + dev_warn(dev, "unknown flash type\n"); return -ENODEV; } of_node_put(flash); - rpc = devm_kzalloc(&pdev->dev, sizeof(*rpc), GFP_KERNEL); + rpc = devm_kzalloc(dev, sizeof(*rpc), GFP_KERNEL); if (!rpc) return -ENOMEM; @@ -734,9 +734,9 @@ static int rpcif_probe(struct platform_device *pdev) vdev = platform_device_alloc(name, pdev->id); if (!vdev) return -ENOMEM; - vdev->dev.parent = &pdev->dev; + vdev->dev.parent = dev; - rpc->dev = &pdev->dev; + rpc->dev = dev; rpc->vdev = vdev; platform_set_drvdata(pdev, rpc); -- 2.25.1