Message ID | 20230808062932.150588-4-miquel.raynal@bootlin.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:c44e:0:b0:3f2:4152:657d with SMTP id w14csp2433411vqr; Tue, 8 Aug 2023 15:32:55 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHQ9fWLSCGfw9x1qutKZNwc8pc4fB/ImIUtAdbV6xCPOy6CKFwu7o+E0gJbRqY4e8wLXSuw X-Received: by 2002:a05:6300:808c:b0:138:2fb8:6b42 with SMTP id ap12-20020a056300808c00b001382fb86b42mr788654pzc.14.1691533974701; Tue, 08 Aug 2023 15:32:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1691533974; cv=none; d=google.com; s=arc-20160816; b=ert3tC5eX9EjZ9fPAFnX9UOuGJTApiKJpDWjNqaTgMYbiEoNsWlciDr8FYUeZK7kNg vQdULic/TRJxSv5r0v+If4BGY04nCMi4pp2zqP36FfZ39FlD9wsPst/6USokRQeq7Mkg znx/KqkccfLkWhZr3U7ufQp4BiypX7phvQF6LahWA8+HihZtEbzIgQp9QEpuI0FDvpZZ o9je4CQBayJ1swhc53NMpmwLTRnIICBc5VeXWUQVTSUf4uifzhmqt1lT0XBHF62V/fKr SFNYSp7vNXqXaIuzclDutt1VOUuyDqqDp5nmuQDA70eyY4q/B3bFV8CUuNw6NczyA+od 57xQ== 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=X3Zr5zi6oiutEUY5SskrgH9VYy6BX6UnhftLaueXlCU=; fh=OHS2tDwbcHt81zFnYeyYq8ynDfpjq+e2h9R20vebRfM=; b=wyx70EXqM7PK2bHMH+I5IbKOiWgwxxqFVsQYfYKHutOObGMsoIlSRckuX70I6YRKN5 7OIjt97az77jqQK0xIXQ8vTWiRbEeev8Paz3gHzzeLOhOzilnuYqL15bnUtDd80nkAlf U1mKUKg6aFtzhjA6XnKQxkBLlyUrLy/mWqv5bej1TQNLN5P7EYCMnJhhmKx4uCCzA2X5 2mmVSrdZ9fibY0SFni/FzJYPCLYDIVLD2Vsk8rUSkhNPh1rr9wJ4Fm8RPLNgUpEzNCZ4 s0xy7etCkzK9yf0TQd45FS3RGq2f8yAfTDTI/9KLWbHLeghB2MRJY/YaifG3fdUlLMRh 6O3Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@bootlin.com header.s=gm1 header.b=nfxXacI4; 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=REJECT sp=REJECT dis=NONE) header.from=bootlin.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id fb26-20020a056a002d9a00b00687505e2bb8si8145511pfb.24.2023.08.08.15.32.41; Tue, 08 Aug 2023 15:32: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=@bootlin.com header.s=gm1 header.b=nfxXacI4; 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=REJECT sp=REJECT dis=NONE) header.from=bootlin.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230525AbjHHTv1 (ORCPT <rfc822;aaronkmseo@gmail.com> + 99 others); Tue, 8 Aug 2023 15:51:27 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37482 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233209AbjHHTvE (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Tue, 8 Aug 2023 15:51:04 -0400 Received: from mslow1.mail.gandi.net (mslow1.mail.gandi.net [217.70.178.240]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 69ABC550E3 for <linux-kernel@vger.kernel.org>; Tue, 8 Aug 2023 09:57:02 -0700 (PDT) Received: from relay1-d.mail.gandi.net (unknown [217.70.183.193]) by mslow1.mail.gandi.net (Postfix) with ESMTP id 7F47ED2EAB for <linux-kernel@vger.kernel.org>; Tue, 8 Aug 2023 06:29:44 +0000 (UTC) Received: by mail.gandi.net (Postfix) with ESMTPSA id 4DAC0240009; Tue, 8 Aug 2023 06:29:38 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1691476179; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=X3Zr5zi6oiutEUY5SskrgH9VYy6BX6UnhftLaueXlCU=; b=nfxXacI46SMugrnbW8CpNixY6lUc08T2a/xyLcq9Vbw+tn1Imt9HYCNQFEQH2GV2DLKAjo cpfn/Ytaf3rWv0B9CCRTjwtiNscMlZkMztS7liNYaXudaLaiMbXul36dryAWNh56IIkbYF et65n1hyiqIq0hnUVPp2RYYbPoN4F55hO4t3+gRHjzmL3ZrLMo9P42BLsXHAKnISBbKDeK q5/Eh1jKAVJowXOedYJMuyfuqEfcre+PHdzYJD7+PFFnDEdq2bsvJzo/AmlP+Jg+t5QxlC +bjNRQp0wKEGLJhylvVpzCDK3aqz+p//qXYWZ/7PdrGAqgR3wk7QX6i8QEskkw== From: Miquel Raynal <miquel.raynal@bootlin.com> To: Srinivas Kandagatla <srinivas.kandagatla@linaro.org> Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>, Thomas Petazzoni <thomas.petazzoni@bootlin.com>, Robert Marko <robert.marko@sartura.hr>, Luka Perkov <luka.perkov@sartura.hr>, Michael Walle <michael@walle.cc>, <linux-kernel@vger.kernel.org>, Randy Dunlap <rdunlap@infradead.org>, Chen-Yu Tsai <wenst@chromium.org>, Daniel Golle <daniel@makrotopia.org>, =?utf-8?b?UmFmYcWCIE1pxYJlY2tp?= <rafal@milecki.pl>, Miquel Raynal <miquel.raynal@bootlin.com> Subject: [PATCH v9 3/7] nvmem: core: Do not open-code existing functions Date: Tue, 8 Aug 2023 08:29:28 +0200 Message-Id: <20230808062932.150588-4-miquel.raynal@bootlin.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230808062932.150588-1-miquel.raynal@bootlin.com> References: <20230808062932.150588-1-miquel.raynal@bootlin.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-GND-Sasl: miquel.raynal@bootlin.com X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_BLOCKED, SPF_HELO_PASS,SPF_PASS,URIBL_BLOCKED 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: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1773687266362202844 X-GMAIL-MSGID: 1773701928905902058 |
Series |
NVMEM cells in sysfs
|
|
Commit Message
Miquel Raynal
Aug. 8, 2023, 6:29 a.m. UTC
Use of_nvmem_layout_get_container() instead of hardcoding it.
Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
---
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 48659106a1e2..257328887263 100644 --- a/drivers/nvmem/core.c +++ b/drivers/nvmem/core.c @@ -786,10 +786,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;