From patchwork Mon Nov 24 22:33:33 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Grant Likely X-Patchwork-Id: 41432 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-ee0-f70.google.com (mail-ee0-f70.google.com [74.125.83.70]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id AB92825E18 for ; Mon, 24 Nov 2014 22:37:50 +0000 (UTC) Received: by mail-ee0-f70.google.com with SMTP id b57sf6237709eek.9 for ; Mon, 24 Nov 2014 14:37:49 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:delivered-to:from:to:cc:subject :date:message-id:in-reply-to:references:sender:precedence:list-id :x-original-sender:x-original-authentication-results:mailing-list :list-post:list-help:list-archive:list-unsubscribe; bh=hiszNAF28ByocBtCJFGlShe5kGqBfC3ccJ3OIrUfBZY=; b=UEx+6N9VuT+fJVlxyFMZtaqxK2VgAzPb0zJ03FyaE89gMYiLcaFnXaag5uQTK1wqP9 BEuiLDInf5d4ZZOMbxfKnqeNkiqlSK2rDIKkUFauBUdmHUs1WJNhAXh+DnfL4eWZydws CTryaEXQcOswJD+Y+V0E8oK/unQJcZWkeWK4GC6RsaoOVZg0pgmdrbtbuSUgSmdFHKJ4 xWJL8AbSifcCTIGZAAOZeToCQVIEctGVABc6guPBGrF2ubkYxHRbdsYU76ZYOgamdu2I IL2CUDkLerSXLKPi/Yc7li0lkSBiuDXR/MH3gI1IvwvdfA5jRJxLZyWTEgFLgydanypd gr1w== X-Gm-Message-State: ALoCoQl28DRdfUfHS6BGOzS0fLm9FpVju2a6J96AbJedg7XJ0gRx9/DFmgJtT9u13jTvPKlsnK6z X-Received: by 10.152.8.67 with SMTP id p3mr6752147laa.4.1416868669583; Mon, 24 Nov 2014 14:37:49 -0800 (PST) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.28.137 with SMTP id b9ls516319lah.29.gmail; Mon, 24 Nov 2014 14:37:49 -0800 (PST) X-Received: by 10.152.198.235 with SMTP id jf11mr22987714lac.72.1416868669398; Mon, 24 Nov 2014 14:37:49 -0800 (PST) Received: from mail-la0-f50.google.com (mail-la0-f50.google.com. [209.85.215.50]) by mx.google.com with ESMTPS id ea3si16470965lbc.123.2014.11.24.14.37.49 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 24 Nov 2014 14:37:49 -0800 (PST) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.50 as permitted sender) client-ip=209.85.215.50; Received: by mail-la0-f50.google.com with SMTP id pv20so8371930lab.23 for ; Mon, 24 Nov 2014 14:37:49 -0800 (PST) X-Received: by 10.152.9.7 with SMTP id v7mr22942698laa.40.1416868669315; Mon, 24 Nov 2014 14:37:49 -0800 (PST) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.112.184.201 with SMTP id ew9csp348003lbc; Mon, 24 Nov 2014 14:37:48 -0800 (PST) X-Received: by 10.70.53.102 with SMTP id a6mr37515070pdp.70.1416868666970; Mon, 24 Nov 2014 14:37:46 -0800 (PST) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id sl5si23332156pbc.164.2014.11.24.14.37.46 for ; Mon, 24 Nov 2014 14:37:46 -0800 (PST) Received-SPF: none (google.com: devicetree-owner@vger.kernel.org does not designate permitted sender hosts) client-ip=209.132.180.67; Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751587AbaKXWhm (ORCPT + 4 others); Mon, 24 Nov 2014 17:37:42 -0500 Received: from mail-wi0-f173.google.com ([209.85.212.173]:63195 "EHLO mail-wi0-f173.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751041AbaKXWeM (ORCPT ); Mon, 24 Nov 2014 17:34:12 -0500 Received: by mail-wi0-f173.google.com with SMTP id r20so7322622wiv.0 for ; Mon, 24 Nov 2014 14:34:11 -0800 (PST) X-Received: by 10.194.92.116 with SMTP id cl20mr39055087wjb.71.1416868450945; Mon, 24 Nov 2014 14:34:10 -0800 (PST) Received: from trevor.secretlab.ca (host86-166-84-117.range86-166.btcentralplus.com. [86.166.84.117]) by mx.google.com with ESMTPSA id he3sm22892170wjc.15.2014.11.24.14.34.08 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 24 Nov 2014 14:34:10 -0800 (PST) Received: by trevor.secretlab.ca (Postfix, from userid 1000) id 85024C4420F; Mon, 24 Nov 2014 22:33:45 +0000 (GMT) From: Grant Likely To: devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Pantelis Antoniou Cc: Rob Herring , Mark Brown , Wolfram Sang , Grant Likely Subject: [PATCH v2 05/14] of/reconfig: Add empty stubs for the of_reconfig methods Date: Mon, 24 Nov 2014 22:33:33 +0000 Message-Id: <1416868422-22103-6-git-send-email-grant.likely@linaro.org> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1416868422-22103-1-git-send-email-grant.likely@linaro.org> References: <1416868422-22103-1-git-send-email-grant.likely@linaro.org> Sender: devicetree-owner@vger.kernel.org Precedence: list List-ID: X-Mailing-List: devicetree@vger.kernel.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: grant.likely@linaro.org X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.50 as permitted sender) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , To simplify subsystem setup code, make empty stubs for the of_reconfig_*() methods. This is particularly useful for registering and unregistering the notifiers so that it doesn't impact the flow of the subsystem setup code. Signed-off-by: Grant Likely --- include/linux/of.h | 29 +++++++++++++++++++++++------ 1 file changed, 23 insertions(+), 6 deletions(-) diff --git a/include/linux/of.h b/include/linux/of.h index 8e3a264c869c..b59ee21933a4 100644 --- a/include/linux/of.h +++ b/include/linux/of.h @@ -324,11 +324,6 @@ struct of_prop_reconfig { struct property *old_prop; }; -extern int of_reconfig_notifier_register(struct notifier_block *); -extern int of_reconfig_notifier_unregister(struct notifier_block *); -extern int of_reconfig_notify(unsigned long, void *); -extern int of_reconfig_get_state_change(unsigned long action, void *arg); - extern int of_attach_node(struct device_node *); extern int of_detach_node(struct device_node *); @@ -895,6 +890,11 @@ enum of_reconfig_change { }; #ifdef CONFIG_OF_DYNAMIC +extern int of_reconfig_notifier_register(struct notifier_block *); +extern int of_reconfig_notifier_unregister(struct notifier_block *); +extern int of_reconfig_notify(unsigned long, void *); +extern int of_reconfig_get_state_change(unsigned long action, void *arg); + extern void of_changeset_init(struct of_changeset *ocs); extern void of_changeset_destroy(struct of_changeset *ocs); extern int of_changeset_apply(struct of_changeset *ocs); @@ -932,7 +932,24 @@ static inline int of_changeset_update_property(struct of_changeset *ocs, { return of_changeset_action(ocs, OF_RECONFIG_UPDATE_PROPERTY, np, prop); } -#endif +#else /* CONFIG_OF_DYNAMIC */ +static inline int of_reconfig_notifier_register(struct notifier_block *nb) +{ + return -EINVAL; +} +static inline int of_reconfig_notifier_unregister(struct notifier_block *nb) +{ + return -EINVAL; +} +static inline int of_reconfig_notify(unsigned long action, void *arg) +{ + return -EINVAL; +} +static inline int of_reconfig_get_state_change(unsigned long action, void *arg) +{ + return -EINVAL; +} +#endif /* CONFIG_OF_DYNAMIC */ /* CONFIG_OF_RESOLVE api */ extern int of_resolve_phandles(struct device_node *tree);