From patchwork Tue Oct 30 14:29:01 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Javier Martin X-Patchwork-Id: 1670471 Return-Path: X-Original-To: patchwork-linux-media@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork1.kernel.org (Postfix) with ESMTP id BF7A43FC36 for ; Tue, 30 Oct 2012 14:29:20 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932356Ab2J3O3S (ORCPT ); Tue, 30 Oct 2012 10:29:18 -0400 Received: from mail-we0-f174.google.com ([74.125.82.174]:62148 "EHLO mail-we0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753742Ab2J3O3Q (ORCPT ); Tue, 30 Oct 2012 10:29:16 -0400 Received: by mail-we0-f174.google.com with SMTP id t9so153339wey.19 for ; Tue, 30 Oct 2012 07:29:15 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=from:to:cc:subject:date:message-id:x-mailer:in-reply-to:references :x-gm-message-state; bh=og20yjMUndAi7IVITQwOCE3KXdmyTbLzxAnufzzLXtg=; b=YZRLcX1szYqu8UKKUzxiGktJAW5FWk960zp7a3kYUxU7+/mjgy5G9FX+fLA53mj+aP 6oiYoB6xFza3+Knxm7o1+IC04oDuU4gymxsvzxFSdLOtdB9TINtzCDT7fxSX1gDwgaYA +FvLpn10FtgJ4iuCixTElUYDHGNJKlVtirB+/xvUmBwvZLzxJxCGjtNH7OkYmtm+JSJo pSgiUfLKyciDAnMTNhFaUgwDk5jgm+Q6Eo1aueqrxN4sfLlz54emadq+CLxZbk8DMmX1 LoVHHvHWn0P4ZrC51vpKnpUoHcogARk6sYO8i3UKZe2qqO4Gdedbs0NLxvBF+cdOBKrT /fgA== Received: by 10.180.19.2 with SMTP id a2mr2261272wie.18.1351607355644; Tue, 30 Oct 2012 07:29:15 -0700 (PDT) Received: from piscis.vsilicon.net (149.93.18.95.dynamic.jazztel.es. [95.18.93.149]) by mx.google.com with ESMTPS id v3sm1455206wiy.5.2012.10.30.07.29.14 (version=TLSv1/SSLv3 cipher=OTHER); Tue, 30 Oct 2012 07:29:15 -0700 (PDT) From: Javier Martin To: linux-media@vger.kernel.org Cc: g.liakhovetski@gmx.de, fabio.estevam@freescale.com, Javier Martin Subject: [PATCH v2 3/4] media: mx2_camera: Remove 'buf_cleanup' callback. Date: Tue, 30 Oct 2012 15:29:01 +0100 Message-Id: <1351607342-18030-4-git-send-email-javier.martin@vista-silicon.com> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1351607342-18030-1-git-send-email-javier.martin@vista-silicon.com> References: <1351607342-18030-1-git-send-email-javier.martin@vista-silicon.com> X-Gm-Message-State: ALoCoQkjW5Eb3nQ3sNct35wffp9ugIFj8PMnauNRarm2CbIxkhgUr2+g/HP4pZnWdsCdOc/0YOMc Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org All necessary tasks to end the streaming properly are already implemented in mx2_stop_streaming() and nothing remains to be done in this callback. Furthermore, it only included debug messages so it can be removed. Signed-off-by: Javier Martin --- drivers/media/platform/soc_camera/mx2_camera.c | 34 ------------------------ 1 file changed, 34 deletions(-) diff --git a/drivers/media/platform/soc_camera/mx2_camera.c b/drivers/media/platform/soc_camera/mx2_camera.c index bf1178c..8202cb9 100644 --- a/drivers/media/platform/soc_camera/mx2_camera.c +++ b/drivers/media/platform/soc_camera/mx2_camera.c @@ -551,39 +551,6 @@ static void mx2_videobuf_queue(struct vb2_buffer *vb) spin_unlock_irqrestore(&pcdev->lock, flags); } -static void mx2_videobuf_release(struct vb2_buffer *vb) -{ -#ifdef DEBUG - struct soc_camera_device *icd = soc_camera_from_vb2q(vb->vb2_queue); - struct soc_camera_host *ici = to_soc_camera_host(icd->parent); - struct mx2_camera_dev *pcdev = ici->priv; - struct mx2_buffer *buf = container_of(vb, struct mx2_buffer, vb); - - dev_dbg(icd->parent, "%s (vb=0x%p) 0x%p %lu\n", __func__, - vb, vb2_plane_vaddr(vb, 0), vb2_get_plane_payload(vb, 0)); - - switch (buf->state) { - case MX2_STATE_ACTIVE: - dev_info(icd->parent, "%s (active)\n", __func__); - break; - case MX2_STATE_QUEUED: - dev_info(icd->parent, "%s (queued)\n", __func__); - break; - default: - dev_info(icd->parent, "%s (unknown) %d\n", __func__, - buf->state); - break; - } -#endif - - /* - * FIXME: implement forced termination of active buffers for mx27 and - * mx27 eMMA, so that the user won't get stuck in an uninterruptible - * state. This requires a specific handling for each of the these DMA - * types. - */ -} - static void mx27_camera_emma_buf_init(struct soc_camera_device *icd, int bytesperline) { @@ -814,7 +781,6 @@ static struct vb2_ops mx2_videobuf_ops = { .queue_setup = mx2_videobuf_setup, .buf_prepare = mx2_videobuf_prepare, .buf_queue = mx2_videobuf_queue, - .buf_cleanup = mx2_videobuf_release, .start_streaming = mx2_start_streaming, .stop_streaming = mx2_stop_streaming, };