Received: by 10.192.165.148 with SMTP id m20csp4917541imm; Tue, 1 May 2018 06:14:16 -0700 (PDT) X-Google-Smtp-Source: AB8JxZqvtKLVZeWSMlzPwTZUuVFEd6T2bIki6OZ7DEcbrMlIrJk6Gy0yz1VybLFH4jadWREMYHJn X-Received: by 2002:a17:902:3181:: with SMTP id x1-v6mr16348564plb.198.1525180456074; Tue, 01 May 2018 06:14:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1525180456; cv=none; d=google.com; s=arc-20160816; b=dkcNm9w+F1VLK/aqEZqeiOVLhCCuTCEBsjDlzSWt8VDXotvofRwRgh7fJ8YwK+F1gm Zbk/L7/5X7B8mM9cCFGJg1TORciKz8jIGpca5SNfeGJkTUpANZHLhk5gIqVLS4yjrHwP 1fu4KO4XWPrWiuodGt0/xbp3uvJoBDukt0M5GGiRD04XtXOzYs7/C1SgZ3TLb7qyCW2V 15ZAT++K520dGsTsLXWZ5iGGZ26csa0KKpnsiy+IPYAm+2A+f3qj66baFMUrsRJY+flB ZWTD7tOkC5mfR1uSlDxV9DWKP0gvJVxgdrVH0HwbTwylfFrZjcnn0jv9Xg/p1MNkieu2 tV6w== 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=gkRmNuoEvYfdwlYHJxUmMz66BKjnRrlqxPOsVhv0CQg=; b=YaRksfv3y66QX4iiPiIPE7LhjohNZkteaATV4pbm4n3o1MxEMCnp1+TvoH4Y35C/8V nXBv1bPksVHzRbYDz71+2eB4PNaFgyLd9G9JVkAiZ7o5fL8w0Si0RS9ViqAad8zr9CN1 79PpfR8APsg9fiOr4ppK+Q7i4Lx5pDObwfso0ku/yJih6MxvipkID7QT/lNG2Wc0XtRD vZau15ljYYXNZM2ApL2Q0Nk8Z7ijAj90+5eBYTPrTYJOtPHM25u7Gm48HnIf4zec5Tra VeC1uTlnfgvgtbHdZ5iR1n98momQwrAvBH/YZaSthd0p6w77eovbAe88rgkkXcM90J/y Xbfw== 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 n11-v6si9352511plg.236.2018.05.01.06.14.01; Tue, 01 May 2018 06:14:16 -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 S1755852AbeEANMM (ORCPT + 99 others); Tue, 1 May 2018 09:12:12 -0400 Received: from mga06.intel.com ([134.134.136.31]:65261 "EHLO mga06.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755236AbeEANKx (ORCPT ); Tue, 1 May 2018 09:10:53 -0400 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga006.jf.intel.com ([10.7.209.51]) by orsmga104.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 01 May 2018 06:10:52 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.49,351,1520924400"; d="scan'208";a="38382543" Received: from gvt-dell.bj.intel.com (HELO gvt-dell-host.bj.intel.com) ([10.238.154.59]) by orsmga006.jf.intel.com with ESMTP; 01 May 2018 06:10:49 -0700 From: changbin.du@intel.com To: yamada.masahiro@socionext.com, michal.lkml@markovi.net, tglx@linutronix.de, mingo@redhat.com, akpm@linux-foundation.org Cc: x86@kernel.org, lgirdwood@gmail.com, broonie@kernel.org, arnd@arndb.de, linux-kbuild@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arch@vger.kernel.org, Changbin Du Subject: [PATCH 2/5] regulator: add dummy of_find_regulator_by_node Date: Tue, 1 May 2018 21:00:11 +0800 Message-Id: <1525179614-14571-3-git-send-email-changbin.du@intel.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1525179614-14571-1-git-send-email-changbin.du@intel.com> References: <1525179614-14571-1-git-send-email-changbin.du@intel.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Changbin Du If device tree is not enabled, of_find_regulator_by_node() should have a dummy function since the function call is still there. Signed-off-by: Changbin Du --- drivers/regulator/internal.h | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/drivers/regulator/internal.h b/drivers/regulator/internal.h index abfd56e..24fde1e 100644 --- a/drivers/regulator/internal.h +++ b/drivers/regulator/internal.h @@ -56,14 +56,19 @@ static inline struct regulator_dev *dev_to_rdev(struct device *dev) return container_of(dev, struct regulator_dev, dev); } -struct regulator_dev *of_find_regulator_by_node(struct device_node *np); - #ifdef CONFIG_OF +struct regulator_dev *of_find_regulator_by_node(struct device_node *np); struct regulator_init_data *regulator_of_get_init_data(struct device *dev, const struct regulator_desc *desc, struct regulator_config *config, struct device_node **node); #else +static inline struct regulator_dev * +of_find_regulator_by_node(struct device_node *np) +{ + return NULL; +} + static inline struct regulator_init_data * regulator_of_get_init_data(struct device *dev, const struct regulator_desc *desc, -- 2.7.4