From patchwork Fri Jul 19 07:58:48 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ricardo Ribalda Delgado X-Patchwork-Id: 2830342 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.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id AD4E8C0319 for ; Fri, 19 Jul 2013 08:00:07 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 5F04820417 for ; Fri, 19 Jul 2013 08:00:06 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 8EF4D2041A for ; Fri, 19 Jul 2013 08:00:04 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S965628Ab3GSIAA (ORCPT ); Fri, 19 Jul 2013 04:00:00 -0400 Received: from mail-la0-f52.google.com ([209.85.215.52]:33747 "EHLO mail-la0-f52.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S965421Ab3GSH76 (ORCPT ); Fri, 19 Jul 2013 03:59:58 -0400 Received: by mail-la0-f52.google.com with SMTP id fo12so3208032lab.11 for ; Fri, 19 Jul 2013 00:59:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:x-mailer:in-reply-to:references; bh=lLy8sFL/Ho3w+s/gUy8OLu489KOb8YObBeUIwwYDYcQ=; b=UzFgnI7AONhAdcRCMj3gp2xrNK8i3yl0OQFQRT3Ge6Ncv5QHn8s976jo1XRX+XLdXi K2sARwl7L+sVgWcDT35fvnOaTUjwwGNhD05Wj6UH2VXl2Z5IVkdS1mvKojJeOWyxrarT TmKTRoq1BNVxiaKZ/FnRX1/XjSE2MBvtGCrE/LckQeZuOOAOdEOyk/O54O4sUbu+0T/n xMJ3ZQaww9N74o8t28A4vPCFUSMOnLyJpotL8H9NukUSrs3VVPddNI1VDYYzakQddXw3 xWK22oE/kAnJOQhUlyyGfqJruh0j2U0vz/Oepk6gxGf6keNLhwvTAYsBjXgEvgRum3wN dLXQ== X-Received: by 10.112.125.199 with SMTP id ms7mr6939020lbb.29.1374220796880; Fri, 19 Jul 2013 00:59:56 -0700 (PDT) Received: from localhost (0x4dd4aed9.adsl.cybercity.dk. [77.212.174.217]) by mx.google.com with ESMTPSA id b8sm5444274lah.0.2013.07.19.00.59.55 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Fri, 19 Jul 2013 00:59:56 -0700 (PDT) From: Ricardo Ribalda Delgado To: Jonathan Corbet , =?UTF-8?q?=C2=A0Mauro=20Carvalho=20Chehab?= , Pawel Osciak , Marek Szyprowski , Kyungmin Park , =?UTF-8?q?=C2=A0Ismael=20Luceno?= , =?UTF-8?q?=C2=A0Greg=20Kroah-Hartman?= , linux-media@vger.kernel.org, devel@driverdev.osuosl.org Cc: Ricardo Ribalda Delgado Subject: [PATCH 3/4] media/marvell-ccic: Changes on the vb2-dma-sg API Date: Fri, 19 Jul 2013 09:58:48 +0200 Message-Id: <1374220729-8304-4-git-send-email-ricardo.ribalda@gmail.com> X-Mailer: git-send-email 1.7.10.4 In-Reply-To: <1374220729-8304-1-git-send-email-ricardo.ribalda@gmail.com> References: <1374220729-8304-1-git-send-email-ricardo.ribalda@gmail.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=-7.2 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, T_DKIM_INVALID, UNPARSEABLE_RELAY autolearn=ham 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 struct vb2_dma_sg_desc has been replaced with the generic sg_table to describe the location of the video buffers. Signed-off-by: Ricardo Ribalda Delgado --- drivers/media/platform/marvell-ccic/mcam-core.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/drivers/media/platform/marvell-ccic/mcam-core.c b/drivers/media/platform/marvell-ccic/mcam-core.c index 64ab91e..b3d504a 100644 --- a/drivers/media/platform/marvell-ccic/mcam-core.c +++ b/drivers/media/platform/marvell-ccic/mcam-core.c @@ -1040,16 +1040,16 @@ static int mcam_vb_sg_buf_prepare(struct vb2_buffer *vb) { struct mcam_vb_buffer *mvb = vb_to_mvb(vb); struct mcam_camera *cam = vb2_get_drv_priv(vb->vb2_queue); - struct vb2_dma_sg_desc *sgd = vb2_dma_sg_plane_desc(vb, 0); + struct sg_table *sg_table = vb2_dma_sg_plane_desc(vb, 0); struct mcam_dma_desc *desc = mvb->dma_desc; struct scatterlist *sg; int i; - mvb->dma_desc_nent = dma_map_sg(cam->dev, sgd->sglist, sgd->num_pages, - DMA_FROM_DEVICE); + mvb->dma_desc_nent = dma_map_sg(cam->dev, sg_table->sgl, + sg_table->nents, DMA_FROM_DEVICE); if (mvb->dma_desc_nent <= 0) return -EIO; /* Not sure what's right here */ - for_each_sg(sgd->sglist, sg, mvb->dma_desc_nent, i) { + for_each_sg(sg_table->sgl, sg, mvb->dma_desc_nent, i) { desc->dma_addr = sg_dma_address(sg); desc->segment_len = sg_dma_len(sg); desc++; @@ -1060,9 +1060,9 @@ static int mcam_vb_sg_buf_prepare(struct vb2_buffer *vb) static int mcam_vb_sg_buf_finish(struct vb2_buffer *vb) { struct mcam_camera *cam = vb2_get_drv_priv(vb->vb2_queue); - struct vb2_dma_sg_desc *sgd = vb2_dma_sg_plane_desc(vb, 0); + struct sg_table *sg_table = vb2_dma_sg_plane_desc(vb, 0); - dma_unmap_sg(cam->dev, sgd->sglist, sgd->num_pages, DMA_FROM_DEVICE); + dma_unmap_sg(cam->dev, sg_table->sgl, sg_table->nents, DMA_FROM_DEVICE); return 0; }