From patchwork Tue Dec 1 15:34:48 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nishanth Menon X-Patchwork-Id: 7738191 Return-Path: X-Original-To: patchwork-linux-omap@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 92C3C9F39D for ; Tue, 1 Dec 2015 15:36:12 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id C46642066B for ; Tue, 1 Dec 2015 15:36:11 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id C86892058C for ; Tue, 1 Dec 2015 15:36:10 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751915AbbLAPfw (ORCPT ); Tue, 1 Dec 2015 10:35:52 -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 Received: from dlelxv90.itg.ti.com ([172.17.2.17]) by arroyo.ext.ti.com (8.13.7/8.13.7) with ESMTP id tB1FYp0C000531; Tue, 1 Dec 2015 09:34:51 -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 tB1FYpFP000605; Tue, 1 Dec 2015 09:34:51 -0600 Received: from dlep32.itg.ti.com (157.170.170.100) by DLEE71.ent.ti.com (157.170.170.114) with Microsoft SMTP Server id 14.3.224.2; Tue, 1 Dec 2015 09:34:50 -0600 Received: from localhost (ileax41-snat.itg.ti.com [10.172.224.153]) by dlep32.itg.ti.com (8.14.3/8.13.8) with ESMTP id tB1FYoJF014303; Tue, 1 Dec 2015 09:34:50 -0600 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 Sender: linux-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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