From patchwork Fri Mar 23 15:49:17 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Semwal, Sumit" X-Patchwork-Id: 10457 Received: from mail.tu-berlin.de ([130.149.7.33]) by www.linuxtv.org with esmtp (Exim 4.72) (envelope-from ) id 1SB6kO-0006JW-OL for patchwork@linuxtv.org; Fri, 23 Mar 2012 16:49:48 +0100 X-tubIT-Incoming-IP: 209.132.180.67 Received: from vger.kernel.org ([209.132.180.67]) by mail.tu-berlin.de (exim-4.75/mailfrontend-2) with esmtp for id 1SB6kO-0003ku-GH; Fri, 23 Mar 2012 16:49:48 +0100 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758842Ab2CWPtq (ORCPT ); Fri, 23 Mar 2012 11:49:46 -0400 Received: from comal.ext.ti.com ([198.47.26.152]:38602 "EHLO comal.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754872Ab2CWPtp (ORCPT ); Fri, 23 Mar 2012 11:49:45 -0400 Received: from dlep26.itg.ti.com ([157.170.170.121]) by comal.ext.ti.com (8.13.7/8.13.7) with ESMTP id q2NFndc1019006; Fri, 23 Mar 2012 10:49:39 -0500 Received: from DLEE74.ent.ti.com (localhost [127.0.0.1]) by dlep26.itg.ti.com (8.13.8/8.13.8) with ESMTP id q2NFndCM014280; Fri, 23 Mar 2012 10:49:39 -0500 (CDT) Received: from dlelxv24.itg.ti.com (172.17.1.199) by DLEE74.ent.ti.com (157.170.170.8) with Microsoft SMTP Server id 14.1.323.3; Fri, 23 Mar 2012 10:49:39 -0500 Received: from legion.dal.design.ti.com (legion.dal.design.ti.com [128.247.22.53]) by dlelxv24.itg.ti.com (8.13.8/8.13.8) with ESMTP id q2NFndsR011004; Fri, 23 Mar 2012 10:49:39 -0500 Received: from localhost (h16-126.vpn.ti.com [172.24.16.126]) by legion.dal.design.ti.com (8.11.7p1+Sun/8.11.7) with ESMTP id q2NFnaW21418; Fri, 23 Mar 2012 10:49:36 -0500 (CDT) From: Sumit Semwal To: CC: , , , Sumit Semwal , Sumit Semwal Subject: [PATCH] dma-buf: Correct dummy function declarations. Date: Fri, 23 Mar 2012 21:19:17 +0530 Message-ID: <1332517757-25532-1-git-send-email-sumit.semwal@ti.com> X-Mailer: git-send-email 1.7.5.4 MIME-Version: 1.0 Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org X-PMX-Version: 5.6.1.2065439, Antispam-Engine: 2.7.2.376379, Antispam-Data: 2012.3.23.153620 X-PMX-Spam: Gauge=IIIIIIIII, Probability=9%, Report=' MULTIPLE_RCPTS 0.1, HTML_00_01 0.05, HTML_00_10 0.05, MSGID_ADDED_BY_MTA 0.05, SUPERLONG_LINE 0.05, BODYTEXTP_SIZE_3000_LESS 0, BODY_SIZE_2000_2999 0, BODY_SIZE_5000_LESS 0, BODY_SIZE_7000_LESS 0, __ANY_URI 0, __CP_URI_IN_BODY 0, __CT 0, __CT_TEXT_PLAIN 0, __HAS_MSGID 0, __HAS_X_MAILER 0, __HAS_X_MAILING_LIST 0, __MIME_TEXT_ONLY 0, __MIME_VERSION 0, __MULTIPLE_RCPTS_CC_X2 0, __SANE_MSGID 0, __TO_MALFORMED_2 0, __TO_NO_NAME 0, __URI_NO_WWW 0, __URI_NS ' While testing, I found that we need to correct some of the dummy declarations. When I send my pull request to Linus, I wish to squash these changes into the original patches from Daniel. Could you please review? Best regards, ~Sumit Acked-by: Daniel Vetter ========= Dummy functions for the newly added cpu access ops are needed for compilation when dma-buf framework is not compiled-in. Also, the introduction of flags in dma_buf_fd needs to be added to dummy functions as well. Signed-off-by: Sumit Semwal --- include/linux/dma-buf.h | 26 +++++++++++++------------- 1 files changed, 13 insertions(+), 13 deletions(-) diff --git a/include/linux/dma-buf.h b/include/linux/dma-buf.h index f08028e..779aaf9 100644 --- a/include/linux/dma-buf.h +++ b/include/linux/dma-buf.h @@ -189,7 +189,7 @@ static inline struct dma_buf *dma_buf_export(void *priv, return ERR_PTR(-ENODEV); } -static inline int dma_buf_fd(struct dma_buf *dmabuf) +static inline int dma_buf_fd(struct dma_buf *dmabuf, int flags) { return -ENODEV; } @@ -216,36 +216,36 @@ static inline void dma_buf_unmap_attachment(struct dma_buf_attachment *attach, return; } -static inline int dma_buf_begin_cpu_access(struct dma_buf *, - size_t, size_t, - enum dma_data_direction) +static inline int dma_buf_begin_cpu_access(struct dma_buf *dmabuf, + size_t start, size_t len, + enum dma_data_direction dir) { return -ENODEV; } -static inline void dma_buf_end_cpu_access(struct dma_buf *, - size_t, size_t, - enum dma_data_direction) +static inline void dma_buf_end_cpu_access(struct dma_buf *dmabuf, + size_t start, size_t len, + enum dma_data_direction dir) { } -static inline void *dma_buf_kmap_atomic(struct dma_buf *, unsigned long) +static inline void *dma_buf_kmap_atomic(struct dma_buf *db, unsigned long pnum) { return NULL; } -static inline void dma_buf_kunmap_atomic(struct dma_buf *, unsigned long, - void *) +static inline void dma_buf_kunmap_atomic(struct dma_buf *db, unsigned long pnum, + void *vaddr) { } -static inline void *dma_buf_kmap(struct dma_buf *, unsigned long) +static inline void *dma_buf_kmap(struct dma_buf *db, unsigned long pnum) { return NULL; } -static inline void dma_buf_kunmap(struct dma_buf *, unsigned long, - void *) +static inline void dma_buf_kunmap(struct dma_buf *db, unsigned long pnum, + void *vaddr) { } #endif /* CONFIG_DMA_SHARED_BUFFER */