aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/pci
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <mchehab@redhat.com>2013-04-28 06:15:41 -0400
committerMauro Carvalho Chehab <mchehab@redhat.com>2013-04-28 11:40:52 -0400
commit02615ed5e1b2283db2495af3cf8f4ee172c77d80 (patch)
tree5f4ff1d8e304bff0c1ea0f70e1a27991ca768e89 /drivers/media/pci
parenta3b60209e7dd4db05249a9fb27940bb6705cd186 (diff)
[media] cx88: make core less verbose
Along the time, several debug messages were added at cx88-cards. While those are still useful to track some troubles with tuners, they're too verbose: [ 5768.281801] cx88[0]: Calling XC2028/3028 callback [ 5768.287388] cx88[0]: Calling XC2028/3028 callback [ 5768.292575] cx88[0]: Calling XC2028/3028 callback [ 5768.299408] cx88[0]: Calling XC2028/3028 callback [ 5768.306244] cx88[0]: Calling XC2028/3028 callback ... and, most of the time, useless. So, disable them, except if core_debug modprobe parameter is used. Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/pci')
-rw-r--r--drivers/media/pci/cx88/cx88-cards.c29
-rw-r--r--drivers/media/pci/cx88/cx88-core.c12
-rw-r--r--drivers/media/pci/cx88/cx88.h2
3 files changed, 25 insertions, 18 deletions
diff --git a/drivers/media/pci/cx88/cx88-cards.c b/drivers/media/pci/cx88/cx88-cards.c
index 07b700a9ed7f..a87a0e19593e 100644
--- a/drivers/media/pci/cx88/cx88-cards.c
+++ b/drivers/media/pci/cx88/cx88-cards.c
@@ -59,6 +59,11 @@ MODULE_PARM_DESC(disable_ir, "Disable IR support");
59#define err_printk(core, fmt, arg...) \ 59#define err_printk(core, fmt, arg...) \
60 printk(KERN_ERR "%s: " fmt, core->name , ## arg) 60 printk(KERN_ERR "%s: " fmt, core->name , ## arg)
61 61
62#define dprintk(level,fmt, arg...) do { \
63 if (cx88_core_debug >= level) \
64 printk(KERN_DEBUG "%s: " fmt, core->name , ## arg); \
65 } while(0)
66
62 67
63/* ------------------------------------------------------------------ */ 68/* ------------------------------------------------------------------ */
64/* board config info */ 69/* board config info */
@@ -3134,7 +3139,7 @@ static int cx88_xc2028_tuner_callback(struct cx88_core *core,
3134 case XC2028_TUNER_RESET: 3139 case XC2028_TUNER_RESET:
3135 switch (INPUT(core->input).type) { 3140 switch (INPUT(core->input).type) {
3136 case CX88_RADIO: 3141 case CX88_RADIO:
3137 info_printk(core, "setting GPIO to radio!\n"); 3142 dprintk(1, "setting GPIO to radio!\n");
3138 cx_write(MO_GP0_IO, 0x4ff); 3143 cx_write(MO_GP0_IO, 0x4ff);
3139 mdelay(250); 3144 mdelay(250);
3140 cx_write(MO_GP2_IO, 0xff); 3145 cx_write(MO_GP2_IO, 0xff);
@@ -3142,7 +3147,7 @@ static int cx88_xc2028_tuner_callback(struct cx88_core *core,
3142 break; 3147 break;
3143 case CX88_VMUX_DVB: /* Digital TV*/ 3148 case CX88_VMUX_DVB: /* Digital TV*/
3144 default: /* Analog TV */ 3149 default: /* Analog TV */
3145 info_printk(core, "setting GPIO to TV!\n"); 3150 dprintk(1, "setting GPIO to TV!\n");
3146 break; 3151 break;
3147 } 3152 }
3148 cx_write(MO_GP1_IO, 0x101010); 3153 cx_write(MO_GP1_IO, 0x101010);
@@ -3200,8 +3205,7 @@ static int cx88_xc5000_tuner_callback(struct cx88_core *core,
3200 not having any tuning at all. */ 3205 not having any tuning at all. */
3201 return 0; 3206 return 0;
3202 } else { 3207 } else {
3203 err_printk(core, "xc5000: unknown tuner " 3208 dprintk(1, "xc5000: unknown tuner callback command.\n");
3204 "callback command.\n");
3205 return -EINVAL; 3209 return -EINVAL;
3206 } 3210 }
3207 break; 3211 break;
@@ -3212,8 +3216,7 @@ static int cx88_xc5000_tuner_callback(struct cx88_core *core,
3212 cx_set(MO_GP0_IO, 0x00000010); 3216 cx_set(MO_GP0_IO, 0x00000010);
3213 return 0; 3217 return 0;
3214 } else { 3218 } else {
3215 printk(KERN_ERR 3219 dprintk(1, "xc5000: unknown tuner callback command.\n");
3216 "xc5000: unknown tuner callback command.\n");
3217 return -EINVAL; 3220 return -EINVAL;
3218 } 3221 }
3219 break; 3222 break;
@@ -3243,13 +3246,13 @@ int cx88_tuner_callback(void *priv, int component, int command, int arg)
3243 3246
3244 switch (core->board.tuner_type) { 3247 switch (core->board.tuner_type) {
3245 case TUNER_XC2028: 3248 case TUNER_XC2028:
3246 info_printk(core, "Calling XC2028/3028 callback\n"); 3249 dprintk(1, "Calling XC2028/3028 callback\n");
3247 return cx88_xc2028_tuner_callback(core, command, arg); 3250 return cx88_xc2028_tuner_callback(core, command, arg);
3248 case TUNER_XC4000: 3251 case TUNER_XC4000:
3249 info_printk(core, "Calling XC4000 callback\n"); 3252 dprintk(1, "Calling XC4000 callback\n");
3250 return cx88_xc4000_tuner_callback(core, command, arg); 3253 return cx88_xc4000_tuner_callback(core, command, arg);
3251 case TUNER_XC5000: 3254 case TUNER_XC5000:
3252 info_printk(core, "Calling XC5000 callback\n"); 3255 dprintk(1, "Calling XC5000 callback\n");
3253 return cx88_xc5000_tuner_callback(core, command, arg); 3256 return cx88_xc5000_tuner_callback(core, command, arg);
3254 } 3257 }
3255 err_printk(core, "Error: Calling callback for tuner %d\n", 3258 err_printk(core, "Error: Calling callback for tuner %d\n",
@@ -3590,8 +3593,8 @@ static void cx88_card_setup(struct cx88_core *core)
3590 memset(&xc2028_cfg, 0, sizeof(xc2028_cfg)); 3593 memset(&xc2028_cfg, 0, sizeof(xc2028_cfg));
3591 xc2028_cfg.tuner = TUNER_XC2028; 3594 xc2028_cfg.tuner = TUNER_XC2028;
3592 xc2028_cfg.priv = &ctl; 3595 xc2028_cfg.priv = &ctl;
3593 info_printk(core, "Asking xc2028/3028 to load firmware %s\n", 3596 dprintk(1, "Asking xc2028/3028 to load firmware %s\n",
3594 ctl.fname); 3597 ctl.fname);
3595 call_all(core, tuner, s_config, &xc2028_cfg); 3598 call_all(core, tuner, s_config, &xc2028_cfg);
3596 } 3599 }
3597 call_all(core, core, s_power, 0); 3600 call_all(core, core, s_power, 0);
@@ -3760,8 +3763,8 @@ struct cx88_core *cx88_core_create(struct pci_dev *pci, int nr)
3760 if (radio[core->nr] != UNSET) 3763 if (radio[core->nr] != UNSET)
3761 core->board.radio_type = radio[core->nr]; 3764 core->board.radio_type = radio[core->nr];
3762 3765
3763 info_printk(core, "TV tuner type %d, Radio tuner type %d\n", 3766 dprintk(1, "TV tuner type %d, Radio tuner type %d\n",
3764 core->board.tuner_type, core->board.radio_type); 3767 core->board.tuner_type, core->board.radio_type);
3765 3768
3766 /* init hardware */ 3769 /* init hardware */
3767 cx88_reset(core); 3770 cx88_reset(core);
diff --git a/drivers/media/pci/cx88/cx88-core.c b/drivers/media/pci/cx88/cx88-core.c
index 39f095c37ffd..c8f3dcc579d4 100644
--- a/drivers/media/pci/cx88/cx88-core.c
+++ b/drivers/media/pci/cx88/cx88-core.c
@@ -48,9 +48,9 @@ MODULE_LICENSE("GPL");
48 48
49/* ------------------------------------------------------------------ */ 49/* ------------------------------------------------------------------ */
50 50
51static unsigned int core_debug; 51unsigned int cx88_core_debug;
52module_param(core_debug,int,0644); 52module_param_named(core_debug, cx88_core_debug, int, 0644);
53MODULE_PARM_DESC(core_debug,"enable debug messages [core]"); 53MODULE_PARM_DESC(core_debug, "enable debug messages [core]");
54 54
55static unsigned int nicam; 55static unsigned int nicam;
56module_param(nicam,int,0644); 56module_param(nicam,int,0644);
@@ -60,8 +60,10 @@ static unsigned int nocomb;
60module_param(nocomb,int,0644); 60module_param(nocomb,int,0644);
61MODULE_PARM_DESC(nocomb,"disable comb filter"); 61MODULE_PARM_DESC(nocomb,"disable comb filter");
62 62
63#define dprintk(level,fmt, arg...) if (core_debug >= level) \ 63#define dprintk(level,fmt, arg...) do { \
64 printk(KERN_DEBUG "%s: " fmt, core->name , ## arg) 64 if (cx88_core_debug >= level) \
65 printk(KERN_DEBUG "%s: " fmt, core->name , ## arg); \
66 } while(0)
65 67
66static unsigned int cx88_devcount; 68static unsigned int cx88_devcount;
67static LIST_HEAD(cx88_devlist); 69static LIST_HEAD(cx88_devlist);
diff --git a/drivers/media/pci/cx88/cx88.h b/drivers/media/pci/cx88/cx88.h
index 4e29c9deb684..51ce2c0e8bc1 100644
--- a/drivers/media/pci/cx88/cx88.h
+++ b/drivers/media/pci/cx88/cx88.h
@@ -618,6 +618,8 @@ struct cx8802_dev {
618/* ----------------------------------------------------------- */ 618/* ----------------------------------------------------------- */
619/* cx88-core.c */ 619/* cx88-core.c */
620 620
621extern unsigned int cx88_core_debug;
622
621extern void cx88_print_irqbits(const char *name, const char *tag, const char *strings[], 623extern void cx88_print_irqbits(const char *name, const char *tag, const char *strings[],
622 int len, u32 bits, u32 mask); 624 int len, u32 bits, u32 mask);
623 625