Commit ef392885 authored by Andrew Morton's avatar Andrew Morton Committed by Linus Torvalds

[PATCH] zoran: debug->zr_debug

From: Ronald Bultje <rbultje@ronald.bitfreak.net>

This patch renames the debug symbol to zr_debug because debug is already
defined somewhere else. Without it, it will cause a symbol conflict when
compiling this driver statically into the kernel. This was noticed by
several people, including Linus himself.
parent f5ae79e9
......@@ -136,7 +136,8 @@ MODULE_PARM(pass_through, "i");
MODULE_PARM_DESC(pass_through,
"Pass TV signal through to TV-out when idling");
int debug = 1;
static int debug = 1;
int *zr_debug = &debug;
MODULE_PARM(debug, "i");
MODULE_PARM_DESC(debug, "Debug level (0-4)");
......@@ -153,7 +154,7 @@ MODULE_DEVICE_TABLE(pci, zr36067_pci_tbl);
#define dprintk(num, format, args...) \
do { \
if (debug >= num) \
if (*zr_debug >= num) \
printk(format, ##args); \
} while (0)
......@@ -977,7 +978,7 @@ test_interrupts (struct zoran *zr)
if (timeout) {
dprintk(1, ": time spent: %d\n", 1 * HZ - timeout);
}
if (debug > 1)
if (*zr_debug > 1)
print_interrupts(zr);
btwrite(icr, ZR36057_ICR);
}
......@@ -1066,7 +1067,7 @@ zr36057_init (struct zoran *zr)
}
zoran_init_hardware(zr);
if (debug > 2)
if (*zr_debug > 2)
detect_guest_activity(zr);
test_interrupts(zr);
if (!pass_through) {
......
......@@ -58,11 +58,11 @@
extern const struct zoran_format zoran_formats[];
extern const int zoran_num_formats;
extern int debug;
extern int *zr_debug;
#define dprintk(num, format, args...) \
do { \
if (debug >= num) \
if (*zr_debug >= num) \
printk(format, ##args); \
} while (0)
......@@ -170,7 +170,7 @@ post_office_read (struct zoran *zr,
static void
dump_guests (struct zoran *zr)
{
if (debug > 2) {
if (*zr_debug > 2) {
int i, guest[8];
for (i = 1; i < 8; i++) { // Don't read jpeg codec here
......@@ -1272,7 +1272,7 @@ error_handler (struct zoran *zr,
zr->num_errors++;
/* Report error */
if (debug > 1 && zr->num_errors <= 8) {
if (*zr_debug > 1 && zr->num_errors <= 8) {
long frame;
frame =
zr->jpg_pend[zr->jpg_dma_tail & BUZ_MASK_FRAME];
......@@ -1544,7 +1544,7 @@ zoran_irq (int irq,
if (zr->codec_mode == BUZ_MODE_MOTION_DECOMPRESS ||
zr->codec_mode == BUZ_MODE_MOTION_COMPRESS) {
if (debug > 1 &&
if (*zr_debug > 1 &&
(!zr->frame_num || zr->JPEG_error)) {
printk(KERN_INFO
"%s: first frame ready: state=0x%08x odd_even=%d field_per_buff=%d delay=%d\n",
......@@ -1584,7 +1584,7 @@ zoran_irq (int irq,
zr->JPEG_missed;
}
if (debug > 2 && zr->frame_num < 6) {
if (*zr_debug > 2 && zr->frame_num < 6) {
int i;
printk("%s: seq=%ld stat_com:",
ZR_DEVNAME(zr), zr->jpg_seq_num);
......
......@@ -187,11 +187,11 @@ const int zoran_num_formats =
# include <linux/bigphysarea.h>
#endif
extern int debug;
extern int *zr_debug;
#define dprintk(num, format, args...) \
do { \
if (debug >= num) \
if (*zr_debug >= num) \
printk(format, ##args); \
} while (0)
......@@ -1144,7 +1144,7 @@ jpg_sync (struct file *file,
frame = zr->jpg_pend[zr->jpg_que_tail & BUZ_MASK_FRAME];
/* buffer should now be in BUZ_STATE_DONE */
if (debug > 0)
if (*zr_debug > 0)
if (zr->jpg_buffers.buffer[frame].state != BUZ_STATE_DONE)
dprintk(2,
KERN_ERR
......@@ -1424,7 +1424,7 @@ zoran_close (struct inode *inode,
/* disable interrupts */
btand(~ZR36057_ICR_IntPinEn, ZR36057_ICR);
if (debug > 1)
if (*zr_debug > 1)
print_interrupts(zr);
/* Overlay off */
......
......@@ -49,11 +49,11 @@
#include "zoran.h"
#include "zoran_procfs.h"
extern int debug;
extern int *zr_debug;
#define dprintk(num, format, args...) \
do { \
if (debug >= num) \
if (*zr_debug >= num) \
printk(format, ##args); \
} while (0)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment