From patchwork Tue Jul 23 22:06:41 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: sensoray-dev X-Patchwork-Id: 2832268 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 C2B6CC0319 for ; Tue, 23 Jul 2013 22:32:36 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id F0EB1203EB for ; Tue, 23 Jul 2013 22:32:35 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id F3E28203EA for ; Tue, 23 Jul 2013 22:32:34 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S934562Ab3GWWc2 (ORCPT ); Tue, 23 Jul 2013 18:32:28 -0400 Received: from gateway13.websitewelcome.com ([69.56.160.10]:47354 "EHLO gateway13.websitewelcome.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S934384Ab3GWWcZ (ORCPT ); Tue, 23 Jul 2013 18:32:25 -0400 X-Greylist: delayed 1506 seconds by postgrey-1.27 at vger.kernel.org; Tue, 23 Jul 2013 18:32:25 EDT Received: by gateway13.websitewelcome.com (Postfix, from userid 5007) id 59196C96225C6; Tue, 23 Jul 2013 17:07:04 -0500 (CDT) Received: from gator3086.hostgator.com (ns6171.hostgator.com [50.87.144.121]) by gateway13.websitewelcome.com (Postfix) with ESMTP id 3CAE5C9622593 for ; Tue, 23 Jul 2013 17:07:04 -0500 (CDT) Received: from [50.43.67.108] (port=41652 helo=localhost.localdomain) by gator3086.hostgator.com with esmtpa (Exim 4.80) (envelope-from ) id 1V1kjk-00057l-Fx; Tue, 23 Jul 2013 17:07:16 -0500 From: Dean Anderson To: linux-dev@sensoray.com, linux-media@vger.kernel.org, hverkuil@xs4all.nl Subject: [PATCH] S2255: Removal of unnecessary videobuf_queue_is_busy Date: Tue, 23 Jul 2013 15:06:41 -0700 Message-Id: <1374617201-18033-1-git-send-email-linux-dev@sensoray.com> X-Mailer: git-send-email 1.7.9.5 X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - gator3086.hostgator.com X-AntiAbuse: Original Domain - vger.kernel.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - sensoray.com X-BWhitelist: no X-Source: X-Source-Args: X-Source-Dir: X-Source-Sender: (localhost.localdomain) [50.43.67.108]:41652 X-Source-Auth: dean@sensoray.com X-Email-Count: 5 X-Source-Cap: c2Vuc29yYXk7c2Vuc29yYXk7Z2F0b3IzMDg2Lmhvc3RnYXRvci5jb20= 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, RP_MATCHES_RCVD, 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 Removes unnecessary query of buffer state. The code already checks if stream is active or not. Signed-off-by: Dean Anderson --- drivers/media/usb/s2255/s2255drv.c | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/drivers/media/usb/s2255/s2255drv.c b/drivers/media/usb/s2255/s2255drv.c index ab97e7d..6bc9b8e 100644 --- a/drivers/media/usb/s2255/s2255drv.c +++ b/drivers/media/usb/s2255/s2255drv.c @@ -1,7 +1,7 @@ /* * s2255drv.c - a driver for the Sensoray 2255 USB video capture device * - * Copyright (C) 2007-2010 by Sensoray Company Inc. + * Copyright (C) 2007-2013 by Sensoray Company Inc. * Dean Anderson * * Some video buffer code based on vivi driver: @@ -52,7 +52,7 @@ #include #include -#define S2255_VERSION "1.22.1" +#define S2255_VERSION "1.23.1" #define FIRMWARE_FILE_NAME "f2255usb.bin" /* default JPEG quality */ @@ -1303,11 +1303,6 @@ static int vidioc_s_std(struct file *file, void *priv, v4l2_std_id i) int ret = 0; mutex_lock(&q->vb_lock); - if (videobuf_queue_is_busy(q)) { - dprintk(1, "queue busy\n"); - ret = -EBUSY; - goto out_s_std; - } if (res_locked(fh)) { dprintk(1, "can't change standard after started\n"); ret = -EBUSY;