From patchwork Thu Oct 5 19:44:20 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Rob Herring \(Arm\)" X-Patchwork-Id: 114990 Delivered-To: patch@linaro.org Received: by 10.140.22.163 with SMTP id 32csp958608qgn; Thu, 5 Oct 2017 12:45:22 -0700 (PDT) X-Received: by 10.84.141.131 with SMTP id 3mr23950650plv.219.1507232722641; Thu, 05 Oct 2017 12:45:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1507232722; cv=none; d=google.com; s=arc-20160816; b=ubnjkP6ijOwNrhUnsPYyuhOfeLhXq7VqRD6x+BMBVuN9WwfKThjfddQECrXaPIDBip 9mj9T/9r/LdECfWfopeIEO1P/GTzbAb2clB1iwWWxLNuSHep9jkVbC+PSehf57NPQxfj N/fxfcXjmSex3I/Eyxf7sIBh5Phb/UpKxAko34fLlF7FaDFxYxwntjaFiMjMnYtVkRH+ vtuOXGaCc/MNV9+f2hAgHqU3XmnVDN8uvmjm2j4hB/Ijusd1DUBTa8KJTIC51An5zplq H7hSuGvrpkXlEAa09emzmta+hxn8+/smPDKFErNt8qLto6SFYGLcQJlPlwJ4+2EtYcKG ayUA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:arc-authentication-results; bh=a/gEJfGlL/gJiaI7qABAvDPfTI3yxaF804rLfInBGhA=; b=UIpADozCbQJ2w3pRkMV3+/F8wdF9QehjGdUCRzdoAH6XVljd6f2XiYtRgpY6XD46rA ALDyxYt/C9jvW9ThLH6hNPkmajTFwsQBkoA4nNVxePZtmzgjVuRZDzEu771uy9ohaWg4 8yrqcawy1QfBdy2NMSfb0HEPePQ+12d+Fmar5q1OtjbPV9sQdhllG7byXhMPSsyOzY5p XzvVHkYEvWXs98hKHDqp28z74Mtu/kZtJe+g8YDjiYi9Jl4IY/kbVTK2QX0Kb9qJYdTa lzjVeJsZkVZTyEp51WoOVLc8YjEEZW5CaIW751JGhbH3ErdyLDnzruY6RPo9CRW52zgd qRPA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id s73si1605248pfe.177.2017.10.05.12.45.22; Thu, 05 Oct 2017 12:45:22 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752260AbdJETpT (ORCPT + 26 others); Thu, 5 Oct 2017 15:45:19 -0400 Received: from mail-oi0-f68.google.com ([209.85.218.68]:38764 "EHLO mail-oi0-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752105AbdJETob (ORCPT ); Thu, 5 Oct 2017 15:44:31 -0400 Received: by mail-oi0-f68.google.com with SMTP id t134so2084101oih.5; Thu, 05 Oct 2017 12:44:31 -0700 (PDT) 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; bh=a/gEJfGlL/gJiaI7qABAvDPfTI3yxaF804rLfInBGhA=; b=mzdRJckFAP03VC2emPexuwjEfNiKsRth898wDUMzdO7vbtQfPeSUeuX5SVuwNi2MLy MzL094MZcmB20Dxjmt7m1gR6hIIy5sPh9aAh0Poby1q4TP6J2tbLF+9otrogNuPXyBPY 4kqvYQhVQKvC1Fuc7KhearmtQxiNgSCpdv5OCdHLwM4hqSqonDoXVmUNzNQLr3svGx8w Q70Q6NIQnsW3gVWHrRh5zct9h9f1DuYx9Q2sMPBE+Bf6YTIUyp2i+vvwSv4AoT3FeBUj /MIPczRfURdgqyJMdZgtkjaLI+FIB4k3lcDOu5De/G9TdzzM3MUisk8pWIoGYX53OWBH ffpQ== X-Gm-Message-State: AMCzsaVqkSqFHbYafU4gg8ZSVlwTr6f9kMy92+GBtW08EWQD6ea6Ge8u p/eTJJEIL53GqEP6ImQH+W0dcHA= X-Google-Smtp-Source: AOwi7QAKiYj8PM2JlSVAwLIjMZeoZX1r2oUIJOdAifFdT8qPJHifIRWzX2OZ6CzqBoHuzvvVhFBMDA== X-Received: by 10.157.35.110 with SMTP id k43mr10968376otd.434.1507232670684; Thu, 05 Oct 2017 12:44:30 -0700 (PDT) Received: from localhost.localdomain (216-188-254-6.dyn.grandenetworks.net. [216.188.254.6]) by smtp.googlemail.com with ESMTPSA id b73sm9011795oii.1.2017.10.05.12.44.29 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 05 Oct 2017 12:44:30 -0700 (PDT) From: Rob Herring To: linux-kernel@vger.kernel.org, devicetree@vger.kernel.org Cc: Nicolas Pitre , Frank Rowand , Grant Likely Subject: [PATCH 4/6] of: move kobj_to_device_node() into dynamic.c Date: Thu, 5 Oct 2017 14:44:20 -0500 Message-Id: <20171005194422.26224-5-robh@kernel.org> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20171005194422.26224-1-robh@kernel.org> References: <20171005194422.26224-1-robh@kernel.org> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The only user of kobj_to_device_node() is in dynamic.c, so move it there. This avoids having to make it conditional once kobject is configurable. Cc: Nicolas Pitre Cc: Frank Rowand Signed-off-by: Rob Herring --- drivers/of/dynamic.c | 5 +++++ drivers/of/of_private.h | 6 ------ 2 files changed, 5 insertions(+), 6 deletions(-) -- 2.11.0 diff --git a/drivers/of/dynamic.c b/drivers/of/dynamic.c index 301b6db2b48d..9d6ba18c529f 100644 --- a/drivers/of/dynamic.c +++ b/drivers/of/dynamic.c @@ -16,6 +16,11 @@ #include "of_private.h" +static struct device_node *kobj_to_device_node(struct kobject *kobj) +{ + return container_of(kobj, struct device_node, kobj); +} + /** * of_node_get() - Increment refcount of a node * @node: Node to inc refcount, NULL is supported to simplify writing of diff --git a/drivers/of/of_private.h b/drivers/of/of_private.h index 3ae12ffbf547..cc86a974f35f 100644 --- a/drivers/of/of_private.h +++ b/drivers/of/of_private.h @@ -35,12 +35,6 @@ extern struct mutex of_mutex; extern struct list_head aliases_lookup; extern struct kset *of_kset; - -static inline struct device_node *kobj_to_device_node(struct kobject *kobj) -{ - return container_of(kobj, struct device_node, kobj); -} - #if defined(CONFIG_OF_DYNAMIC) extern int of_property_notify(int action, struct device_node *np, struct property *prop, struct property *old_prop);