Received: by 2002:a05:7412:bb8d:b0:d7:7d3a:4fe2 with SMTP id js13csp99552rdb; Mon, 14 Aug 2023 10:36:55 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEfO/U3OLRjK25L98oaNnPTKT7gc0NWy35Pn+dvvIaxZNuT5Cx1iFXEk+j+iJ8HiSZ4Ml9V X-Received: by 2002:a17:903:11c8:b0:1bc:56c3:ebb7 with SMTP id q8-20020a17090311c800b001bc56c3ebb7mr10072132plh.20.1692034614651; Mon, 14 Aug 2023 10:36:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1692034614; cv=none; d=google.com; s=arc-20160816; b=PE+Q7qso0tz5K7z3x137M6/+d5JBKZdaTN2VVBPFjLFVWg7mEDE6Z9I6LtNmDZWmhE HEOIX7TH1D/mtrkTg9hOofBBKC6E5QYkMZaPfVA/q5Twjuw2yjGzMoZSPDv5/UHpsvlN cfo7PLY8T2Xc4GDSj8JKI3MNMDdsaKur0Pi/3owR+Y2FBBSkt39mtbNy+FilCcE1YPAq TnOLfrx/3+BhWgk6GHCh31GCAvjQ22P6vIpMZHPBY4pbxcPwVP3JSgyrduDUvgG8o9Gl cxbGfLS0IP7cKiNIdqlrXB0vY0e1Nr8n1tFohwZZJlNjzetzt0GTlLcXYkyCXLxTGrHM 3pBA== 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 :dkim-signature; bh=wIvDC1RQQDdB76emFuds/bRYMDd6MDnA3Z/g/2DlsAI=; fh=mXlPD21qwRqc/FimxWVEy0+KGFAgzsKdbbBiMkbSZzo=; b=RGhiNoE5yiz+rVx8W0ofjq3QT4YDJbzgXyooDmNPWQE7sR7Qchea+7LoRcz2pzMYvJ 7F8t0yXra9CV0n7NUBb6Uv77aTx3JJvyl0tIP54lULDXszNOzEs8FaTDeglpvSWajHd9 rAMrX9llpO77CcsYMVTHXXH5+8HDpp8Fod8KkjTAbFxJelP9a2HsQLd/qQQxzLzagNfQ 0Wxv9iqkXXyecmRdNNMNRVCxvv98NXnmYJiaBV4scPr4ZT8UU4QHObgfwpLidaBjB/PL iKQpUu0FDg6jX22Fcas6R0kpvkw5fJzj7TC57Rf0PVgz55UikpvKogkw7UUu+tnvaSdj ktDQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=JmSqvmCK; 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=linaro.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id y15-20020a17090322cf00b001bba7713547si8498356plg.151.2023.08.14.10.36.40; Mon, 14 Aug 2023 10:36:54 -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=@linaro.org header.s=google header.b=JmSqvmCK; 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=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233022AbjHNQym (ORCPT + 99 others); Mon, 14 Aug 2023 12:54:42 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59566 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230219AbjHNQyP (ORCPT ); Mon, 14 Aug 2023 12:54:15 -0400 Received: from mail-ed1-x535.google.com (mail-ed1-x535.google.com [IPv6:2a00:1450:4864:20::535]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D5353170B for ; Mon, 14 Aug 2023 09:53:59 -0700 (PDT) Received: by mail-ed1-x535.google.com with SMTP id 4fb4d7f45d1cf-5230a22cfd1so6116371a12.1 for ; Mon, 14 Aug 2023 09:53:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1692032038; x=1692636838; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=wIvDC1RQQDdB76emFuds/bRYMDd6MDnA3Z/g/2DlsAI=; b=JmSqvmCKWvittCs/IjCbgu+3xqMi7OkUVwBC3dXea5j8Kv+WlsIT5F68uLkHbljWBO dLk6Dh0jeSdwo8b9lmw2wLfFDBPsAcFgkiwYEWNylb4c74K4O0TPoNx3kuoLQ6qGJFy5 uGpI8LRJZISYnq312Fi++Jmq0QIjOpzy0t0UJd+uuckQgircJfAOIrWwrwB/gpCFEdkL Meq1czYOYWlBG1QRwV0Trld6WhBKgOTRLedGAZygAIMojPemO6hUfmRFfIxEbXPyC7Wl dQYSq7leXT2yTm7QHS8REiz7gCsLVe8dPDG8iGPif03pVe0oogjHLp0dVC8oit3f712Y ErFQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1692032038; x=1692636838; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=wIvDC1RQQDdB76emFuds/bRYMDd6MDnA3Z/g/2DlsAI=; b=UDVr5oESD5mxigbwPQ3oduNAmwJpKsTXezxdEKHQ97JyrYIPcaApdiFAVnEQ+X0rJp wy4HliXDx5ITkiaMHCoyId2Gt+mY0A8+z+Y/K8WlQ/2muwFQf+4jjoY3YV1BcTkhGiQc 8sHrj/MV7RiV4HmCiw+2BRHltRy4csFrEsnIBe7+BaFOU1LSmneZYUwwU6Rqo560rIsD 9EGm9Py3Y5tm4j3hi2aly+eBH7BmwFJb99rHtcR6SrdBFVhQ63dMnclI8EAvYi0fJKKE BOcbzKu9iH0KH9zjcHVRi4EewYIQEmJtUbTyTSXbdOoZNsclf7eMhQRO4mdzTpWdSVuO npOg== X-Gm-Message-State: AOJu0YyQjndVAy27P5N2vxEx/lRkwMGp67IyjwEaOXStpdUEACfwZRY7 Fbx4OnuMnj3EbCWEk4qe3ynyIQ== X-Received: by 2002:aa7:da06:0:b0:525:69ec:e1c8 with SMTP id r6-20020aa7da06000000b0052569ece1c8mr1696256eds.40.1692032038481; Mon, 14 Aug 2023 09:53:58 -0700 (PDT) Received: from localhost.localdomain ([5.133.47.210]) by smtp.gmail.com with ESMTPSA id n5-20020aa7c785000000b0052338f5b2a4sm5811267eds.86.2023.08.14.09.53.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 14 Aug 2023 09:53:57 -0700 (PDT) From: Srinivas Kandagatla To: gregkh@linuxfoundation.org Cc: linux-kernel@vger.kernel.org, Miquel Raynal , Michael Walle , Srinivas Kandagatla Subject: [PATCH 21/22] nvmem: core: Do not open-code existing functions Date: Mon, 14 Aug 2023 17:52:51 +0100 Message-Id: <20230814165252.93422-22-srinivas.kandagatla@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20230814165252.93422-1-srinivas.kandagatla@linaro.org> References: <20230814165252.93422-1-srinivas.kandagatla@linaro.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=1.2 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_BLOCKED, RCVD_IN_SBL_CSS,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.6 X-Spam-Level: * 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 From: Miquel Raynal Use of_nvmem_layout_get_container() instead of hardcoding it. Signed-off-by: Miquel Raynal Reviewed-by: Michael Walle Signed-off-by: Srinivas Kandagatla --- drivers/nvmem/core.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/nvmem/core.c b/drivers/nvmem/core.c index bc7ea001a446..12d05aea0b41 100644 --- a/drivers/nvmem/core.c +++ b/drivers/nvmem/core.c @@ -785,10 +785,10 @@ EXPORT_SYMBOL_GPL(nvmem_layout_unregister); static struct nvmem_layout *nvmem_layout_get(struct nvmem_device *nvmem) { - struct device_node *layout_np, *np = nvmem->dev.of_node; + struct device_node *layout_np; struct nvmem_layout *l, *layout = ERR_PTR(-EPROBE_DEFER); - layout_np = of_get_child_by_name(np, "nvmem-layout"); + layout_np = of_nvmem_layout_get_container(nvmem); if (!layout_np) return NULL; -- 2.25.1