Received: by 2002:a6b:fb09:0:0:0:0:0 with SMTP id h9csp3089291iog; Mon, 27 Jun 2022 08:55:49 -0700 (PDT) X-Google-Smtp-Source: AGRyM1sg/5CASOTRPUn9TeUx9nRX3/hgD9liOh/qyOPIUTSBfjH7cITtpdJk1E4tilafQui46NL3 X-Received: by 2002:a63:b60a:0:b0:408:d61b:77ac with SMTP id j10-20020a63b60a000000b00408d61b77acmr13832159pgf.432.1656345348809; Mon, 27 Jun 2022 08:55:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1656345348; cv=none; d=google.com; s=arc-20160816; b=USRLY8SOlzryMgebRYud+0CJBA96WD0CGOVhBcjfmZSZqSGyNy1k6EZbcCbgpzAaQt yXI0pOM4Ndr6ewNis+HaFKHDBhk69CKmHr7gHqLD+d7d1snfSWu4o194MiCGeyH0p2oI 2H9+p6gxgkgzbLcm43cErtVNQZ4HWWh9sdHo9h4rf6UAvZhgfaELpUuF4s55qsN35EBK vIsiXXsl9Oqx70bhG5K4aR/FoVCQhp7PGlmaERfhJ33E+Duf3yMEnebYlwnu7SK5poga eQHHPFKfXjSnajKT6gWziNbsGDEo+in3+OusCt4hHXaLwe83cXrAf3/j2MeNLw4ONAhC +qnA== 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=qaLyr+Dhrf0AnOhDkFtVzSgdpEdROYodQYQGrnfmfAw=; b=bf10GlboaTtIOoyRLclYzveBqUR3IVcH5uyXbER7gS/b0UP1iq1L9+RhJU1ycapik2 LTgbzQpn/QVuGeyG/l0Dng7fBwrgskx2AeB4GuOWrdCjHItihr0tU/W6rAyly4uh0NzA glKOj2MuIFgIqqAtnTcxagO7m8Y2J7BVfD9r8Z1x3eB0MJJAT+lp3typjdRFMZ6UnT0y Iiv5a4rkTRyk09gSR0MzPfMugVJS3ohvy+poroa6RVc66bIY2+Nedsf79f+ak1AEbttF Wr8pCrGmbMcEuLkatNfxAID0xWMgcuQFrX9jmEOfSTYnsrUwFC3DyczMdSmVzATJdnDj QfQw== 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 hg20-20020a17090b301400b001ec76532644si17399505pjb.32.2022.06.27.08.55.36; Mon, 27 Jun 2022 08:55:48 -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 S237665AbiF0Pbp (ORCPT + 99 others); Mon, 27 Jun 2022 11:31:45 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51160 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238185AbiF0Pb2 (ORCPT ); Mon, 27 Jun 2022 11:31:28 -0400 Received: from andre.telenet-ops.be (andre.telenet-ops.be [IPv6:2a02:1800:120:4::f00:15]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 203F519C2D for ; Mon, 27 Jun 2022 08:31:24 -0700 (PDT) Received: from ramsan.of.borg ([84.195.186.194]) by andre.telenet-ops.be with bizsmtp id oFXH2700N4C55Sk01FXHYj; Mon, 27 Jun 2022 17:31:21 +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-0014yZ-1Y; Mon, 27 Jun 2022 17:31:17 +0200 Received: from geert by rox.of.borg with local (Exim 4.93) (envelope-from ) id 1o5qho-004jET-FY; 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 2/7] memory: renesas-rpc-if: Add dev helper to rpcif_probe() Date: Mon, 27 Jun 2022 17:31:09 +0200 Message-Id: <31051c05581d0200a45357a6d1ab4ad268a1bbf4.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=unavailable 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 Add a helper variable pointing to the device structure, to avoid going through the platform device every time. Signed-off-by: Geert Uytterhoeven --- drivers/memory/renesas-rpc-if.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/drivers/memory/renesas-rpc-if.c b/drivers/memory/renesas-rpc-if.c index 829b962e8f034bdd..2421a820e3c5880c 100644 --- a/drivers/memory/renesas-rpc-if.c +++ b/drivers/memory/renesas-rpc-if.c @@ -666,14 +666,15 @@ EXPORT_SYMBOL(rpcif_dirmap_read); static int rpcif_probe(struct platform_device *pdev) { + struct device *dev = &pdev->dev; struct platform_device *vdev; struct device_node *flash; 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; } @@ -683,7 +684,7 @@ 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); @@ -691,7 +692,7 @@ 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; platform_set_drvdata(pdev, vdev); ret = platform_device_add(vdev); -- 2.25.1