From patchwork Tue Dec 1 16:38:33 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nishanth Menon X-Patchwork-Id: 57515 Delivered-To: patch@linaro.org Received: by 10.112.155.196 with SMTP id vy4csp2294647lbb; Tue, 1 Dec 2015 08:39:11 -0800 (PST) X-Received: by 10.66.158.97 with SMTP id wt1mr100436380pab.155.1448987951511; Tue, 01 Dec 2015 08:39:11 -0800 (PST) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id d3si10831140pas.116.2015.12.01.08.39.11; Tue, 01 Dec 2015 08:39:11 -0800 (PST) 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 S1755704AbbLAQjJ (ORCPT + 28 others); Tue, 1 Dec 2015 11:39:09 -0500 Received: from arroyo.ext.ti.com ([192.94.94.40]:50966 "EHLO arroyo.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752369AbbLAQjH (ORCPT ); Tue, 1 Dec 2015 11:39:07 -0500 Received: from dlelxv90.itg.ti.com ([172.17.2.17]) by arroyo.ext.ti.com (8.13.7/8.13.7) with ESMTP id tB1Gcacc006399; Tue, 1 Dec 2015 10:38:36 -0600 Received: from DLEE71.ent.ti.com (dlee71.ent.ti.com [157.170.170.114]) by dlelxv90.itg.ti.com (8.14.3/8.13.8) with ESMTP id tB1GcaPZ020932; Tue, 1 Dec 2015 10:38:36 -0600 Received: from dlep33.itg.ti.com (157.170.170.75) by DLEE71.ent.ti.com (157.170.170.114) with Microsoft SMTP Server id 14.3.224.2; Tue, 1 Dec 2015 10:38:36 -0600 Received: from localhost (ileax41-snat.itg.ti.com [10.172.224.153]) by dlep33.itg.ti.com (8.14.3/8.13.8) with ESMTP id tB1GcZpF005862; Tue, 1 Dec 2015 10:38:35 -0600 From: Nishanth Menon To: Philipp Zabel CC: , , , Nishanth Menon Subject: [PATCH V2] reset: Introduce static inline dummy function when CONFIG_RESET_CONTROLLER is not set Date: Tue, 1 Dec 2015 10:38:33 -0600 Message-ID: <1448987913-17770-1-git-send-email-nm@ti.com> X-Mailer: git-send-email 2.6.2.402.g2635c2b In-Reply-To: <1448984088-31904-1-git-send-email-nm@ti.com> References: <1448984088-31904-1-git-send-email-nm@ti.com> MIME-Version: 1.0 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org When CONFIG_RESET_CONTROLLER is not defined (example COMPILE_TEST), provide a dummy static inline implementation. Signed-off-by: Nishanth Menon --- V2: Thanks to kbot, I realized i messed up the patch -> hopefully, this revision has better luck. V1: https://patchwork.kernel.org/patch/7738191/ include/linux/reset-controller.h | 11 +++++++++++ 1 file changed, 11 insertions(+) -- 2.6.2.402.g2635c2b -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/ diff --git a/include/linux/reset-controller.h b/include/linux/reset-controller.h index ce6b962ffed4..e294565540db 100644 --- a/include/linux/reset-controller.h +++ b/include/linux/reset-controller.h @@ -48,7 +48,18 @@ struct reset_controller_dev { unsigned int nr_resets; }; +#if IS_ENABLED(CONFIG_RESET_CONTROLLER) int reset_controller_register(struct reset_controller_dev *rcdev); void reset_controller_unregister(struct reset_controller_dev *rcdev); +#else +static inline int reset_controller_register(struct reset_controller_dev *r) +{ + return -EINVAL; +} + +static inline void reset_controller_unregister(struct reset_controller_dev *r) +{ +} +#endif /* IS_ENABLED(CONFIG_RESET_CONTROLLER) */ #endif