From patchwork Sat Aug 25 03:09:04 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ezequiel Garcia X-Patchwork-Id: 1372931 Return-Path: X-Original-To: patchwork-linux-media@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork2.kernel.org (Postfix) with ESMTP id B4356DF264 for ; Sat, 25 Aug 2012 03:09:28 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754777Ab2HYDJZ (ORCPT ); Fri, 24 Aug 2012 23:09:25 -0400 Received: from mail-yw0-f46.google.com ([209.85.213.46]:63962 "EHLO mail-yw0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754678Ab2HYDJW (ORCPT ); Fri, 24 Aug 2012 23:09:22 -0400 Received: by mail-yw0-f46.google.com with SMTP id m54so582622yhm.19 for ; Fri, 24 Aug 2012 20:09:22 -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=7Asdsnt//xftBaYfZeTXOsNjaZIaNHMfz2DSDmqIARc=; b=HoQMQH1DWq5nlAKEvRN7p1UfbpytNHP1k/buqQLaxCktRnw4f3pTC8/aVuj2zZpInE NUwOSM8l99mU1N7oLpblx3rKRsKL67njLNOCcczsTOTkgXJ073Mdm0LBdsqRJ2vBIogy DBxgke6qB3ThifQ5YEEefaEtkLGHRYnzQged4R4V1774WY7dUjnrRtxLyyYxK6/XPclT 4xxICdhqnHya4LVEZhGOOPBoK1OZRfMrtCkSY3WSEE98+MT4Quw875HY7b6duGMpyDCm AdUQHWVViZ0x4EDIo8bRqk7Tc4nx9CzrGvTPq0WDzMxDU4esmb6bOiMPDARoG9rViwAy e+FQ== Received: by 10.236.179.98 with SMTP id g62mr6226066yhm.44.1345864162102; Fri, 24 Aug 2012 20:09:22 -0700 (PDT) Received: from localhost.cpe.express.com.ar ([200.81.126.15]) by mx.google.com with ESMTPS id o25sm22166065yhm.14.2012.08.24.20.09.20 (version=TLSv1/SSLv3 cipher=OTHER); Fri, 24 Aug 2012 20:09:21 -0700 (PDT) From: Ezequiel Garcia To: , Mauro Carvalho Chehab Cc: Ezequiel Garcia Subject: [PATCH 7/9] stk1160: Don't check vb2_queue_init() return Date: Sat, 25 Aug 2012 00:09:04 -0300 Message-Id: <1345864146-2207-7-git-send-email-elezegarcia@gmail.com> X-Mailer: git-send-email 1.7.8.6 In-Reply-To: <1345864146-2207-1-git-send-email-elezegarcia@gmail.com> References: <1345864146-2207-1-git-send-email-elezegarcia@gmail.com> Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org Right now vb2_queue_init() returns always 0 and it will be changed to return void. Signed-off-by: Ezequiel Garcia --- drivers/media/usb/stk1160/stk1160-core.c | 4 +--- drivers/media/usb/stk1160/stk1160-v4l.c | 12 +++--------- drivers/media/usb/stk1160/stk1160.h | 2 +- 3 files changed, 5 insertions(+), 13 deletions(-) diff --git a/drivers/media/usb/stk1160/stk1160-core.c b/drivers/media/usb/stk1160/stk1160-core.c index 74236fd..0af08e7 100644 --- a/drivers/media/usb/stk1160/stk1160-core.c +++ b/drivers/media/usb/stk1160/stk1160-core.c @@ -306,9 +306,7 @@ static int stk1160_probe(struct usb_interface *interface, usb_set_intfdata(interface, dev); /* initialize videobuf2 stuff */ - rc = stk1160_vb2_setup(dev); - if (rc < 0) - goto free_err; + stk1160_vb2_setup(dev); /* * There is no need to take any locks here in probe diff --git a/drivers/media/usb/stk1160/stk1160-v4l.c b/drivers/media/usb/stk1160/stk1160-v4l.c index fe6e857..abb933d 100644 --- a/drivers/media/usb/stk1160/stk1160-v4l.c +++ b/drivers/media/usb/stk1160/stk1160-v4l.c @@ -670,12 +670,10 @@ void stk1160_clear_queue(struct stk1160 *dev) spin_unlock_irqrestore(&dev->buf_lock, flags); } -int stk1160_vb2_setup(struct stk1160 *dev) +void stk1160_vb2_setup(struct stk1160 *dev) { - int rc; - struct vb2_queue *q; + struct vb2_queue *q = &dev->vb_vidq; - q = &dev->vb_vidq; q->type = V4L2_BUF_TYPE_VIDEO_CAPTURE; q->io_modes = VB2_READ | VB2_MMAP | VB2_USERPTR; q->drv_priv = dev; @@ -683,14 +681,10 @@ int stk1160_vb2_setup(struct stk1160 *dev) q->ops = &stk1160_video_qops; q->mem_ops = &vb2_vmalloc_memops; - rc = vb2_queue_init(q); - if (rc < 0) - return rc; + vb2_queue_init(q); /* initialize video dma queue */ INIT_LIST_HEAD(&dev->avail_bufs); - - return 0; } int stk1160_video_register(struct stk1160 *dev) diff --git a/drivers/media/usb/stk1160/stk1160.h b/drivers/media/usb/stk1160/stk1160.h index 3feba00..3618481 100644 --- a/drivers/media/usb/stk1160/stk1160.h +++ b/drivers/media/usb/stk1160/stk1160.h @@ -173,7 +173,7 @@ struct regval { }; /* Provided by stk1160-v4l.c */ -int stk1160_vb2_setup(struct stk1160 *dev); +void stk1160_vb2_setup(struct stk1160 *dev); int stk1160_video_register(struct stk1160 *dev); void stk1160_video_unregister(struct stk1160 *dev); void stk1160_clear_queue(struct stk1160 *dev);