Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753752AbbLAPfz (ORCPT ); Tue, 1 Dec 2015 10:35:55 -0500 Received: from arroyo.ext.ti.com ([192.94.94.40]:47905 "EHLO arroyo.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750873AbbLAPfu (ORCPT ); Tue, 1 Dec 2015 10:35:50 -0500 From: Nishanth Menon To: Philipp Zabel CC: , , , Nishanth Menon Subject: [PATCH] reset: Introduce static inline dummy function when CONFIG_RESET_CONTROLLER Date: Tue, 1 Dec 2015 09:34:48 -0600 Message-ID: <1448984088-31904-1-git-send-email-nm@ti.com> X-Mailer: git-send-email 2.6.2.402.g2635c2b MIME-Version: 1.0 Content-Type: text/plain Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1176 Lines: 37 When CONFIG_RESET_CONTROLLER is not defined (example COMPILE_TEST), provide a dummy static inline implementation. Signed-off-by: Nishanth Menon --- include/linux/reset-controller.h | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/include/linux/reset-controller.h b/include/linux/reset-controller.h index ce6b962ffed4..4badecb2619e 100644 --- a/include/linux/reset-controller.h +++ b/include/linux/reset-controller.h @@ -48,7 +48,16 @@ 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 -- 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/