From patchwork Fri Aug 12 16:01:49 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andy Shevchenko X-Patchwork-Id: 9277333 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id BAC5E600CB for ; Fri, 12 Aug 2016 16:04:04 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id AA2B928A84 for ; Fri, 12 Aug 2016 16:04:04 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 9ED9428A87; Fri, 12 Aug 2016 16:04:04 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 52AB228A84 for ; Fri, 12 Aug 2016 16:04:04 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752820AbcHLQDH (ORCPT ); Fri, 12 Aug 2016 12:03:07 -0400 Received: from mga02.intel.com ([134.134.136.20]:43521 "EHLO mga02.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752621AbcHLQDE (ORCPT ); Fri, 12 Aug 2016 12:03:04 -0400 Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by orsmga101.jf.intel.com with ESMTP; 12 Aug 2016 09:02:01 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.28,511,1464678000"; d="scan'208";a="747893261" Received: from black.fi.intel.com ([10.237.72.93]) by FMSMGA003.fm.intel.com with ESMTP; 12 Aug 2016 09:01:57 -0700 Received: by black.fi.intel.com (Postfix, from userid 1003) id 11CF22CE; Fri, 12 Aug 2016 19:01:57 +0300 (EEST) From: Andy Shevchenko To: Bryan O'Donoghue , Peter Hurley , linux-serial@vger.kernel.org, Vinod Koul , linux-kernel@vger.kernel.org, dmaengine@vger.kernel.org, Greg Kroah-Hartman , ismo.puustinen@intel.com, Heikki Krogerus , Eugeniy Paltsev Cc: Andy Shevchenko Subject: [PATCH v10 04/11] dmaengine: dw: provide probe(), remove() stubs for users Date: Fri, 12 Aug 2016 19:01:49 +0300 Message-Id: <1471017716-44893-5-git-send-email-andriy.shevchenko@linux.intel.com> X-Mailer: git-send-email 2.8.1 In-Reply-To: <1471017716-44893-1-git-send-email-andriy.shevchenko@linux.intel.com> References: <1471017716-44893-1-git-send-email-andriy.shevchenko@linux.intel.com> Sender: dmaengine-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: dmaengine@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Some users consider DMA optional, thus when driver is not compiled we shouldn't prevent compilation of the users. Add stubs for dw_dma_probe() and dw_dma_remove(). Acked-by: Vinod Koul Signed-off-by: Andy Shevchenko --- include/linux/dma/dw.h | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/include/linux/dma/dw.h b/include/linux/dma/dw.h index f2e538a..ccfd0c3 100644 --- a/include/linux/dma/dw.h +++ b/include/linux/dma/dw.h @@ -40,8 +40,13 @@ struct dw_dma_chip { }; /* Export to the platform drivers */ +#if IS_ENABLED(CONFIG_DW_DMAC_CORE) int dw_dma_probe(struct dw_dma_chip *chip); int dw_dma_remove(struct dw_dma_chip *chip); +#else +static inline int dw_dma_probe(struct dw_dma_chip *chip) { return -ENODEV; } +static inline int dw_dma_remove(struct dw_dma_chip *chip) { return 0; } +#endif /* CONFIG_DW_DMAC_CORE */ /* DMA API extensions */ struct dw_desc;