From patchwork Tue Sep 8 10:33:50 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sakari Ailus X-Patchwork-Id: 7139931 Return-Path: X-Original-To: patchwork-linux-media@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 9E751BEEC1 for ; Tue, 8 Sep 2015 10:36:42 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id C8DEE2072E for ; Tue, 8 Sep 2015 10:36:41 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id CCCFA205FD for ; Tue, 8 Sep 2015 10:36:40 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754437AbbIHKgj (ORCPT ); Tue, 8 Sep 2015 06:36:39 -0400 Received: from mga14.intel.com ([192.55.52.115]:13429 "EHLO mga14.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754098AbbIHKgj (ORCPT ); Tue, 8 Sep 2015 06:36:39 -0400 Received: from orsmga001.jf.intel.com ([10.7.209.18]) by fmsmga103.fm.intel.com with ESMTP; 08 Sep 2015 03:36:26 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.17,489,1437462000"; d="scan'208";a="764582460" Received: from paasikivi.fi.intel.com ([10.237.72.42]) by orsmga001.jf.intel.com with ESMTP; 08 Sep 2015 03:36:25 -0700 Received: from nauris.fi.intel.com (nauris.localdomain [192.168.240.2]) by paasikivi.fi.intel.com (Postfix) with ESMTP id 9BB5A20990; Tue, 8 Sep 2015 13:35:51 +0300 (EEST) Received: by nauris.fi.intel.com (Postfix, from userid 1000) id DF61D201EC; Tue, 8 Sep 2015 13:34:16 +0300 (EEST) From: Sakari Ailus To: linux-media@vger.kernel.org Cc: pawel@osciak.com, m.szyprowski@samsung.com, kyungmin.park@samsung.com, hverkuil@xs4all.nl Subject: [RFC 06/11] vb2: Improve struct vb2_mem_ops documentation; alloc and put are for MMAP Date: Tue, 8 Sep 2015 13:33:50 +0300 Message-Id: <1441708435-12736-7-git-send-email-sakari.ailus@linux.intel.com> X-Mailer: git-send-email 2.1.0.231.g7484e3b In-Reply-To: <1441708435-12736-1-git-send-email-sakari.ailus@linux.intel.com> References: <1441708435-12736-1-git-send-email-sakari.ailus@linux.intel.com> Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@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 The alloc() and put() ops are for MMAP buffers only. Document it. Signed-off-by: Sakari Ailus --- include/media/videobuf2-core.h | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/include/media/videobuf2-core.h b/include/media/videobuf2-core.h index a825bd5..efc9a19 100644 --- a/include/media/videobuf2-core.h +++ b/include/media/videobuf2-core.h @@ -24,16 +24,16 @@ struct vb2_threadio_data; /** * struct vb2_mem_ops - memory handling/memory allocator operations - * @alloc: allocate video memory and, optionally, allocator private data, - * return NULL on failure or a pointer to allocator private, - * per-buffer data on success; the returned private structure - * will then be passed as buf_priv argument to other ops in this - * structure. Additional gfp_flags to use when allocating the - * are also passed to this operation. These flags are from the - * gfp_flags field of vb2_queue. - * @put: inform the allocator that the buffer will no longer be used; - * usually will result in the allocator freeing the buffer (if - * no other users of this buffer are present); the buf_priv + * @alloc: allocate video memory for an MMAP buffer and, optionally, + * allocator private data, return NULL on failure or a pointer + * to allocator private, per-buffer data on success; the returned + * private structure will then be passed as buf_priv argument to + * other ops in this structure. Additional gfp_flags to use when + * allocating the are also passed to this operation. These flags + * are from the gfp_flags field of vb2_queue. + * @put: inform the allocator that the MMAP buffer will no longer be + * used; usually will result in the allocator freeing the buffer + * (if no other users of this buffer are present); the buf_priv * argument is the allocator private per-buffer structure * previously returned from the alloc callback. * @get_userptr: acquire userspace memory for a hardware operation; used for