From patchwork Sat Dec 19 17:40:12 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 1418750 X-Patchwork-Delegate: sjg@chromium.org Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=85.214.62.61; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.a=rsa-sha256 header.s=google header.b=noShazt1; dkim-atps=neutral Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4CytQb3rzPz9sWQ for ; Sun, 20 Dec 2020 04:44:23 +1100 (AEDT) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 8250A82E1E; Sat, 19 Dec 2020 18:41:35 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.b="noShazt1"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 640D182889; Sat, 19 Dec 2020 18:40:57 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-io1-xd2c.google.com (mail-io1-xd2c.google.com [IPv6:2607:f8b0:4864:20::d2c]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 2939882815 for ; Sat, 19 Dec 2020 18:40:51 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=sjg@chromium.org Received: by mail-io1-xd2c.google.com with SMTP id i18so5148969ioa.1 for ; Sat, 19 Dec 2020 09:40:51 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=lDEsZhu2T5tPQ4xFCt3mkqqdSD+z0OAsYQqSVp6YZqA=; b=noShazt1Rf67Y1TNsDg+F4QwSswb9m2jaX0cei0cseXW7dsHTVgRnAXEdQ4lE2RR2i sjMMKXQ0qieYvaeksFIkIrWB2jFzyAxNlSc3Aaro7HgVPF0i/FSzvK8akD6BfIO8VjFc 9EYyTm6vz+3jP2ZhCvMCG5uWxZTZBhx9KjxSo= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=lDEsZhu2T5tPQ4xFCt3mkqqdSD+z0OAsYQqSVp6YZqA=; b=Mav2OuQDTPEq2FNvdYqaQz4o1KnxP8rqKfGr73ts+wKW9kLqXXVHsVhq7sjPEJ7vNj 6Nx2lOfENAvmOD2zUEQ7qsfK8Pbjfog951bmzaBrZpKuw+gX3132bVy4B/xAfLmE41+/ orgPOyxeW2dK8prUyaVbCcYah4r4ZzWefiwvFVoEMlzZWo6hPfsRR1K83aOogOpnWMOS TG56sq1UYRBQ6YQr3Nvpkef0MxHVnjlJNxGVVowBuilt6I4rZpVIAPJJwD5BTAr5w+8n 6ZTe/MfNtZ91xTvH8QK42d7gLKzT1QTEaKhPdANSYhJV1GnYlL/G8jshu/PFXcFz5iCo z+9A== X-Gm-Message-State: AOAM5319QFTGw+N1v84GF2JSycuzB/TZjiS17HUlIDFuL/to7mKjilsH R2EK9Uy0ni48pke4RVbD6fc8AD/hX7jwyYA6 X-Google-Smtp-Source: ABdhPJwwVNkW7NHztNgHFGXvNLqDR24fYEvg87TgnZWi2SBuE1GX1t1PQUPr++bxBKBNxjmBBThTfQ== X-Received: by 2002:a02:969a:: with SMTP id w26mr9015411jai.96.1608399649815; Sat, 19 Dec 2020 09:40:49 -0800 (PST) Received: from localhost.localdomain (c-67-190-101-114.hsd1.co.comcast.net. [67.190.101.114]) by smtp.gmail.com with ESMTPSA id n10sm9781962ila.69.2020.12.19.09.40.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 19 Dec 2020 09:40:49 -0800 (PST) From: Simon Glass To: U-Boot Mailing List Cc: Simon Glass , Bin Meng , Marek Vasut , Michael Walle , Pavel Herrmann , Peng Fan , Stefan Roese , Ye Li Subject: [PATCH 20/26] dm: core: Rename dev_has_of_node() to dev_has_ofnode() Date: Sat, 19 Dec 2020 10:40:12 -0700 Message-Id: <20201219174018.1114146-19-sjg@chromium.org> X-Mailer: git-send-email 2.29.2.684.gfbc64c5ab5-goog In-Reply-To: <20201219174018.1114146-1-sjg@chromium.org> References: <20201219174018.1114146-1-sjg@chromium.org> MIME-Version: 1.0 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.34 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.102.3 at phobos.denx.de X-Virus-Status: Clean We use 'ofnode' rather than 'of_node' in U-Boot. Rename this function to fit. Signed-off-by: Simon Glass Signed-off-by: Simon Glass --- drivers/core/device.c | 2 +- drivers/mmc/octeontx_hsmmc.c | 2 +- drivers/pinctrl/pinctrl-uclass.c | 2 +- drivers/usb/host/usb-uclass.c | 2 +- include/dm/device.h | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/core/device.c b/drivers/core/device.c index ba50d46effe..8c7ce220f84 100644 --- a/drivers/core/device.c +++ b/drivers/core/device.c @@ -406,7 +406,7 @@ int device_of_to_plat(struct udevice *dev) assert(drv); if (drv->of_to_plat && - (CONFIG_IS_ENABLED(OF_PLATDATA) || dev_has_of_node(dev))) { + (CONFIG_IS_ENABLED(OF_PLATDATA) || dev_has_ofnode(dev))) { ret = drv->of_to_plat(dev); if (ret) goto fail; diff --git a/drivers/mmc/octeontx_hsmmc.c b/drivers/mmc/octeontx_hsmmc.c index 57d107aac32..f3da6af9090 100644 --- a/drivers/mmc/octeontx_hsmmc.c +++ b/drivers/mmc/octeontx_hsmmc.c @@ -3752,7 +3752,7 @@ static int octeontx_mmc_host_probe(struct udevice *dev) host->dev = dev; debug("%s(%s): Base address: %p\n", __func__, dev->name, host->base_addr); - if (!dev_has_of_node(dev)) { + if (!dev_has_ofnode(dev)) { pr_err("%s: No device tree information found\n", __func__); return -1; } diff --git a/drivers/pinctrl/pinctrl-uclass.c b/drivers/pinctrl/pinctrl-uclass.c index 4e474cbff73..4653e86ba46 100644 --- a/drivers/pinctrl/pinctrl-uclass.c +++ b/drivers/pinctrl/pinctrl-uclass.c @@ -305,7 +305,7 @@ int pinctrl_select_state(struct udevice *dev, const char *statename) * Some device which is logical like mmc.blk, do not have * a valid ofnode. */ - if (!dev_has_of_node(dev)) + if (!dev_has_ofnode(dev)) return 0; /* * Try full-implemented pinctrl first. diff --git a/drivers/usb/host/usb-uclass.c b/drivers/usb/host/usb-uclass.c index 17db5eb0609..ae6b1450d3a 100644 --- a/drivers/usb/host/usb-uclass.c +++ b/drivers/usb/host/usb-uclass.c @@ -517,7 +517,7 @@ static ofnode usb_get_ofnode(struct udevice *hub, int port) ofnode node; u32 reg; - if (!dev_has_of_node(hub)) + if (!dev_has_ofnode(hub)) return ofnode_null(); /* diff --git a/include/dm/device.h b/include/dm/device.h index a0c1752cddc..b15a14ec330 100644 --- a/include/dm/device.h +++ b/include/dm/device.h @@ -200,7 +200,7 @@ static inline int dev_of_offset(const struct udevice *dev) return ofnode_to_offset(dev->node); } -static inline bool dev_has_of_node(struct udevice *dev) +static inline bool dev_has_ofnode(struct udevice *dev) { return ofnode_valid(dev->node); }