From patchwork Sun May 30 12:19:03 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stefan Ringel X-Patchwork-Id: 103121 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter.kernel.org (8.14.3/8.14.3) with ESMTP id o4UCLDlk014245 for ; Sun, 30 May 2010 12:21:14 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752598Ab0E3MVK (ORCPT ); Sun, 30 May 2010 08:21:10 -0400 Received: from mail-in-08.arcor-online.net ([151.189.21.48]:56776 "EHLO mail-in-08.arcor-online.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752400Ab0E3MVJ (ORCPT ); Sun, 30 May 2010 08:21:09 -0400 Received: from mail-in-21-z2.arcor-online.net (unknown [151.189.8.185]) by mx.arcor.de (Postfix) with ESMTP id DE185205568; Sun, 30 May 2010 14:21:07 +0200 (CEST) Received: from mail-in-03.arcor-online.net (mail-in-03.arcor-online.net [151.189.21.43]) by mail-in-21-z2.arcor-online.net (Postfix) with ESMTP id A1FA1EDC3F; Sun, 30 May 2010 14:21:07 +0200 (CEST) Received: from localhost.localdomain (dslb-188-102-023-217.pools.arcor-ip.net [188.102.23.217]) (Authenticated sender: stefan.ringel@arcor.de) by mail-in-03.arcor-online.net (Postfix) with ESMTPA id 13AC6D7EC7; Sun, 30 May 2010 14:21:06 +0200 (CEST) X-DKIM: Sendmail DKIM Filter v2.8.2 mail-in-03.arcor-online.net 13AC6D7EC7 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=arcor.de; s=mail-in; t=1275222067; bh=+aRRWHI2fdCIVljFAKWid1uMJkNil8nMTcIqJtHc9qA=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References; b=YugsLC7tXEvZp3RZ32jhniRf9IuYJDQzAQthwpqy4M+Fu0wXPBbsc0gdDTnXTnGhw NdbB13n46Pz14bszER/D2iYqTHjlL6vE5D+PNChXjzEpoelyTJIvF1d3p6rERXQcpN LRXLt04mg/E7YfIrx/3Tvpf4QgPA76blNjgBZpAA= From: stefan.ringel@arcor.de To: linux-media@vger.kernel.org Cc: mchehab@redhat.com, d.belimov@gmail.com, Stefan Ringel Subject: [PATCH 2/3] tm6000: move debug info print from header into c file Date: Sun, 30 May 2010 14:19:03 +0200 Message-Id: <1275221944-27887-2-git-send-email-stefan.ringel@arcor.de> X-Mailer: git-send-email 1.7.0.3 In-Reply-To: <1275221944-27887-1-git-send-email-stefan.ringel@arcor.de> References: <1275221944-27887-1-git-send-email-stefan.ringel@arcor.de> Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.3 (demeter.kernel.org [140.211.167.41]); Sun, 30 May 2010 12:21:14 +0000 (UTC) diff --git a/drivers/staging/tm6000/tm6000-core.c b/drivers/staging/tm6000/tm6000-core.c index 624c276..b5965a8 100644 --- a/drivers/staging/tm6000/tm6000-core.c +++ b/drivers/staging/tm6000/tm6000-core.c @@ -29,6 +29,12 @@ #include #include +#define dprintk(dev, level, fmt, arg...) do { \ + if (tm6000_debug & level) \ + printk(KERN_INFO "(%lu) %s %s :"fmt, jiffies, \ + dev->name, __FUNCTION__, ##arg); \ + } while (0) + #define USB_TIMEOUT 5*HZ /* ms */ int tm6000_read_write_usb (struct tm6000_core *dev, u8 req_type, u8 req, diff --git a/drivers/staging/tm6000/tm6000-dvb.c b/drivers/staging/tm6000/tm6000-dvb.c index 714b384..b9e9ef1 100644 --- a/drivers/staging/tm6000/tm6000-dvb.c +++ b/drivers/staging/tm6000/tm6000-dvb.c @@ -30,6 +30,14 @@ #include "tuner-xc2028.h" #include "xc5000.h" +#undef dprintk + +#define dprintk(dev, level, fmt, arg...) do { \ + if (debug >= level) \ + printk(KERN_INFO "(%lu) %s %s :"fmt, jiffies, \ + dev->name, __FUNCTION__, ##arg); \ + } while (0) + static void inline print_err_status (struct tm6000_core *dev, int packet, int status) { diff --git a/drivers/staging/tm6000/tm6000-video.c b/drivers/staging/tm6000/tm6000-video.c index 9746fe7..98af4a5 100644 --- a/drivers/staging/tm6000/tm6000-video.c +++ b/drivers/staging/tm6000/tm6000-video.c @@ -42,6 +42,12 @@ #include "tm6000-regs.h" #include "tm6000.h" +#define dprintk(dev, level, fmt, arg...) do { \ + if (tm6000_debug & level) \ + printk(KERN_INFO "(%lu) %s %s :"fmt, jiffies, \ + dev->name, __FUNCTION__, ##arg); \ + } while (0) + #define BUFFER_TIMEOUT msecs_to_jiffies(2000) /* 2 seconds */ /* Limits minimum and default number of buffers */ diff --git a/drivers/staging/tm6000/tm6000.h b/drivers/staging/tm6000/tm6000.h index 231e2be..fd94ed6 100644 --- a/drivers/staging/tm6000/tm6000.h +++ b/drivers/staging/tm6000/tm6000.h @@ -316,13 +316,6 @@ int tm6000_queue_init(struct tm6000_core *dev); /* Debug stuff */ -extern int tm6000_debug; - -#define dprintk(dev, level, fmt, arg...) do {\ - if (tm6000_debug & level) \ - printk(KERN_INFO "(%lu) %s %s :"fmt, jiffies, \ - dev->name, __FUNCTION__ , ##arg); } while (0) - #define V4L2_DEBUG_REG 0x0004 #define V4L2_DEBUG_I2C 0x0008 #define V4L2_DEBUG_QUEUE 0x0010