From patchwork Sat Jun 6 22:26:57 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ezequiel Garcia X-Patchwork-Id: 6560381 Return-Path: X-Original-To: patchwork-linux-media@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 7C72E9F1CC for ; Sat, 6 Jun 2015 22:30:33 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 999632062B for ; Sat, 6 Jun 2015 22:30:32 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 9932520624 for ; Sat, 6 Jun 2015 22:30:31 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753098AbbFFWa3 (ORCPT ); Sat, 6 Jun 2015 18:30:29 -0400 Received: from mail-qk0-f181.google.com ([209.85.220.181]:34606 "EHLO mail-qk0-f181.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753048AbbFFWa3 (ORCPT ); Sat, 6 Jun 2015 18:30:29 -0400 Received: by qkoo18 with SMTP id o18so59106556qko.1 for ; Sat, 06 Jun 2015 15:30:28 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=2xL1BmakJUcXEJZBmoxEpL95abAsOcz6cqM+ly0F2CM=; b=aVdd+haOzPLIU4JMJRlpA+XlxJhhuR/QcMu2OChmwCzWy7GaNeikklK0XDNFp2XhRy NB4rdbQEFt8ZR1OQ884/PqPehJTHisF6iRHB+q4f0wJT8TE5NwWM3qP0hUPqV4ggkEFY pXOP3mtZVki4keufoi1Qd6eZdTiuLo68Ohvdn4ufoecwwHZaKoMHEiJbmTJbxULJt7XX 2qpDMvqRTvru+RdSySpLObpZJ4Qz4ozmGZT+AE8Ju0NLV45xxWZKl6+GV/IusYMdh37y dtlLl719XXiZQiBgijNDu5MKT6fZeDpxaE5+CgBtxPcN9cKtQqgGbkfp35HB7l6r9VEe tiFw== X-Gm-Message-State: ALoCoQkIDy38GbreOaC8/40S37MouT5jIMGLjAUlZhCpdfcVA8AkcJ3vDIPpmooolgP+c7B3Xiii X-Received: by 10.229.188.137 with SMTP id da9mr12135210qcb.27.1433629828477; Sat, 06 Jun 2015 15:30:28 -0700 (PDT) Received: from localhost.localdomain ([190.2.108.156]) by mx.google.com with ESMTPSA id f192sm5848020qhc.37.2015.06.06.15.30.25 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Sat, 06 Jun 2015 15:30:27 -0700 (PDT) From: Ezequiel Garcia To: , Hans Verkuil Cc: dale.hamel@srvthe.net, michael@stegemann.it, Ezequiel Garcia Subject: [PATCH v2 1/2] stk1160: Reduce driver verbosity Date: Sat, 6 Jun 2015 19:26:57 -0300 Message-Id: <1433629618-1833-2-git-send-email-ezequiel@vanguardiasur.com.ar> X-Mailer: git-send-email 2.3.3 In-Reply-To: <1433629618-1833-1-git-send-email-ezequiel@vanguardiasur.com.ar> References: <1433629618-1833-1-git-send-email-ezequiel@vanguardiasur.com.ar> 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 These messages are not really informational, and just makes the driver's output too verbose. This commit changes some messages to a debug level, removes a really useless "driver loaded" message and finally undefines the DEBUG macro. Signed-off-by: Ezequiel Garcia --- drivers/media/usb/stk1160/stk1160-core.c | 5 +---- drivers/media/usb/stk1160/stk1160-v4l.c | 16 ++++++++-------- drivers/media/usb/stk1160/stk1160.h | 1 - 3 files changed, 9 insertions(+), 13 deletions(-) diff --git a/drivers/media/usb/stk1160/stk1160-core.c b/drivers/media/usb/stk1160/stk1160-core.c index 03504dc..1b6836f 100644 --- a/drivers/media/usb/stk1160/stk1160-core.c +++ b/drivers/media/usb/stk1160/stk1160-core.c @@ -162,7 +162,7 @@ static void stk1160_release(struct v4l2_device *v4l2_dev) { struct stk1160 *dev = container_of(v4l2_dev, struct stk1160, v4l2_dev); - stk1160_info("releasing all resources\n"); + stk1160_dbg("releasing all resources\n"); stk1160_i2c_unregister(dev); @@ -363,9 +363,6 @@ static int stk1160_probe(struct usb_interface *interface, dev->sd_saa7115 = v4l2_i2c_new_subdev(&dev->v4l2_dev, &dev->i2c_adap, "saa7115_auto", 0, saa7113_addrs); - stk1160_info("driver ver %s successfully loaded\n", - STK1160_VERSION); - /* i2c reset saa711x */ v4l2_device_call_all(&dev->v4l2_dev, 0, core, reset, 0); v4l2_device_call_all(&dev->v4l2_dev, 0, video, s_stream, 0); diff --git a/drivers/media/usb/stk1160/stk1160-v4l.c b/drivers/media/usb/stk1160/stk1160-v4l.c index 749ad56..498bdc7 100644 --- a/drivers/media/usb/stk1160/stk1160-v4l.c +++ b/drivers/media/usb/stk1160/stk1160-v4l.c @@ -136,7 +136,7 @@ static bool stk1160_set_alternate(struct stk1160 *dev) dev->alt = i; } - stk1160_info("setting alternate %d\n", dev->alt); + stk1160_dbg("setting alternate %d\n", dev->alt); if (dev->alt != prev_alt) { stk1160_dbg("minimum isoc packet size: %u (alt=%d)\n", @@ -224,7 +224,7 @@ static void stk1160_stop_hw(struct stk1160 *dev) /* set alternate 0 */ dev->alt = 0; - stk1160_info("setting alternate %d\n", dev->alt); + stk1160_dbg("setting alternate %d\n", dev->alt); usb_set_interface(dev->udev, 0, 0); /* Stop stk1160 */ @@ -537,8 +537,8 @@ static int queue_setup(struct vb2_queue *vq, const struct v4l2_format *v4l_fmt, sizes[0] = size; - stk1160_info("%s: buffer count %d, each %ld bytes\n", - __func__, *nbuffers, size); + stk1160_dbg("%s: buffer count %d, each %ld bytes\n", + __func__, *nbuffers, size); return 0; } @@ -622,8 +622,8 @@ void stk1160_clear_queue(struct stk1160 *dev) struct stk1160_buffer, list); list_del(&buf->list); vb2_buffer_done(&buf->vb, VB2_BUF_STATE_ERROR); - stk1160_info("buffer [%p/%d] aborted\n", - buf, buf->vb.v4l2_buf.index); + stk1160_dbg("buffer [%p/%d] aborted\n", + buf, buf->vb.v4l2_buf.index); } /* It's important to release the current buffer */ @@ -632,8 +632,8 @@ void stk1160_clear_queue(struct stk1160 *dev) dev->isoc_ctl.buf = NULL; vb2_buffer_done(&buf->vb, VB2_BUF_STATE_ERROR); - stk1160_info("buffer [%p/%d] aborted\n", - buf, buf->vb.v4l2_buf.index); + stk1160_dbg("buffer [%p/%d] aborted\n", + buf, buf->vb.v4l2_buf.index); } spin_unlock_irqrestore(&dev->buf_lock, flags); } diff --git a/drivers/media/usb/stk1160/stk1160.h b/drivers/media/usb/stk1160/stk1160.h index abdea48..77f5d46 100644 --- a/drivers/media/usb/stk1160/stk1160.h +++ b/drivers/media/usb/stk1160/stk1160.h @@ -58,7 +58,6 @@ * new drivers should use. * */ -#define DEBUG #ifdef DEBUG #define stk1160_dbg(fmt, args...) \ printk(KERN_DEBUG "stk1160: " fmt, ## args)