From patchwork Tue May 5 16:33:54 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Olli Salonen X-Patchwork-Id: 6339291 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.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 1EF48BEEE5 for ; Tue, 5 May 2015 16:34:27 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 33EEA20251 for ; Tue, 5 May 2015 16:34:26 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 3FDF72017D for ; Tue, 5 May 2015 16:34:25 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S965422AbbEEQeR (ORCPT ); Tue, 5 May 2015 12:34:17 -0400 Received: from mail-lb0-f169.google.com ([209.85.217.169]:35413 "EHLO mail-lb0-f169.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1761322AbbEEQeO (ORCPT ); Tue, 5 May 2015 12:34:14 -0400 Received: by lbbuc2 with SMTP id uc2so132956806lbb.2 for ; Tue, 05 May 2015 09:34:13 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references; bh=H2ewjfE2Xh3iD1UWpqW2zwRP+9whalx0Vq1dgCgF7go=; b=WB0DliTZklOhz7rUf5JIFzVLgP4snfdATA8h3p/m5Op8fG1SdjqIZnW6i1GZT/yFsT n7XddNh1L4nFAxcIQhSqjj4mdbEEAXIcpRgBA3ihYYsn9uxKe33HzgX5u9RQ6bq9FvjI 4dbcZwPaYqsvrfX//dzzl23KIk5Rk6dg/TTW2DnNE5xhON1tJDg1CYqu0pV/DEcn24EJ A530ahAww6HI7JdtU4mmjeij/XD7KQvqnj1dXIY+/MhURU8WzprjVBDtLozB3rS0fRCp +41ybRBAONF/iyiR5CriFD+1GlopIC7+wqNidr8E6grs/5THgJu39UjgscIWTYIa/E+2 aQtw== X-Gm-Message-State: ALoCoQmhYuxVrGtO2qOZ4V+A3uV0H1nbSHKx9l88B+Nc+iIp6PFXGTI6z6nlVfk9wt3KGT73bAjD X-Received: by 10.152.29.161 with SMTP id l1mr24305202lah.76.1430843653129; Tue, 05 May 2015 09:34:13 -0700 (PDT) Received: from dl160.lan (188-67-118-178.bb.dnainternet.fi. [188.67.118.178]) by mx.google.com with ESMTPSA id m8sm4171702lbs.17.2015.05.05.09.34.11 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 05 May 2015 09:34:12 -0700 (PDT) From: Olli Salonen To: linux-media@vger.kernel.org Cc: Olli Salonen Subject: [PATCH 3/4] dw2102: debugging improvements Date: Tue, 5 May 2015 19:33:54 +0300 Message-Id: <1430843635-24002-3-git-send-email-olli.salonen@iki.fi> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1430843635-24002-1-git-send-email-olli.salonen@iki.fi> References: <1430843635-24002-1-git-send-email-olli.salonen@iki.fi> 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 Move some info printouts to be debugging printouts that are only shown if debugging for the module is enabled. The module already implemented deb_rc and deb_xfer, but not deb_info. Signed-off-by: Olli Salonen --- drivers/media/usb/dvb-usb/dw2102.c | 6 ++++-- drivers/media/usb/dvb-usb/dw2102.h | 1 + 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/drivers/media/usb/dvb-usb/dw2102.c b/drivers/media/usb/dvb-usb/dw2102.c index b1f8a3f..7552521 100644 --- a/drivers/media/usb/dvb-usb/dw2102.c +++ b/drivers/media/usb/dvb-usb/dw2102.c @@ -881,6 +881,8 @@ static int su3000_streaming_ctrl(struct dvb_usb_adapter *adap, int onoff) .len = 1 }; + deb_info("%s: onoff: %d\n", __func__, onoff); + i2c_transfer(&adap->dev->i2c_adap, &msg, 1); return 0; @@ -891,7 +893,7 @@ static int su3000_power_ctrl(struct dvb_usb_device *d, int i) struct dw2102_state *state = (struct dw2102_state *)d->priv; u8 obuf[] = {0xde, 0}; - info("%s: %d, initialized %d", __func__, i, state->initialized); + deb_info("%s: %d, initialized %d\n", __func__, i, state->initialized); if (i && !state->initialized) { state->initialized = 1; @@ -938,7 +940,7 @@ static int su3000_identify_state(struct usb_device *udev, struct dvb_usb_device_description **desc, int *cold) { - info("%s", __func__); + deb_info("%s\n", __func__); *cold = 0; return 0; diff --git a/drivers/media/usb/dvb-usb/dw2102.h b/drivers/media/usb/dvb-usb/dw2102.h index 5cd0b0e..1602368 100644 --- a/drivers/media/usb/dvb-usb/dw2102.h +++ b/drivers/media/usb/dvb-usb/dw2102.h @@ -4,6 +4,7 @@ #define DVB_USB_LOG_PREFIX "dw2102" #include "dvb-usb.h" +#define deb_info(args...) dprintk(dvb_usb_dw2102_debug, 0x01, args) #define deb_xfer(args...) dprintk(dvb_usb_dw2102_debug, 0x02, args) #define deb_rc(args...) dprintk(dvb_usb_dw2102_debug, 0x04, args) #endif