[PATCH 3/9] ltmodem: make core vars dump conditional on DEBUG

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Signed-off-by: Paul Gortmaker <paul.gortmaker@xxxxxxxxxxxxx>
---
 ltdrv.c |   10 ++++++----
 1 files changed, 6 insertions(+), 4 deletions(-)

diff --git a/ltdrv.c b/ltdrv.c
index 5bc0337..23c2cd6 100644
--- a/ltdrv.c
+++ b/ltdrv.c
@@ -24,6 +24,7 @@
 #  define ASSERT(cond, action) 	do {} while (0)
 #endif 	
 
+void dump_core_vars(void);
 
 struct martian_metrics {
 	unsigned BaseAddress;
@@ -58,7 +59,6 @@ static void serial_out(struct vuart_host *host, int offset, int value)
 	write_vuart_port(offset, value);
 }
 
-void dump_core_vars(void );
 static void serial_startup(struct vuart_host *host)
 {
 	vxdPortOpen();
@@ -164,6 +164,7 @@ void lt_add_timer(void (asmlinkage *timerfunction)(unsigned long))
 	schedule_delayed_work (&ltmodem.work, HZ/100);
 }
 
+#ifdef DEBUG
 #define	DUMP_CORE_VAR(var)	pr_info("martian: \t" #var "\t= %d\n", var)
 void dump_core_vars(void )
 {
@@ -179,6 +180,9 @@ void dump_core_vars(void )
 	DUMP_CORE_VAR(Irq);
 	DUMP_CORE_VAR(S[0x7e]);
 }
+#else
+void dump_core_vars(void) {}
+#endif	/* DEBUG */
 
 static void init_core(struct martian_metrics *mconf)
 {
@@ -233,8 +237,7 @@ struct _ltmodem *ltmodem_add (struct martian_metrics *metrics, int *error)
 	init_core(metrics); //, dev);
 	dev->line = init_vport(dev);
 	
-	pr_info("martian: added device %x:%x " 
-			"BaseAddress = 0x%x, CommAddres = 0x%x, irq = %d\n", 
+	pr_info("ltmodem: added device %x:%x, base=0x%x, comm=0x%x, irq=%d\n",
 			metrics->vendor, metrics->device, 
 			metrics->BaseAddress, metrics->CommAddress,
 			metrics->irq
@@ -405,7 +408,6 @@ extern void detach_from_serial(struct pci_device_id *ids);
 
 static int __init ltmodem_init (void) 
 {
-	pr_info("ltmodem loaded\n");
 	detach_from_serial(ltmodem_ids);
 	return pci_register_driver (&ltmodem_driver);
 }
-- 
1.6.5.2


[Index of Archives]     [Linux Media Development]     [Asterisk]     [DCCP]     [Netdev]     [X.org]     [Xfree86]     [Fedora Women]     [Linux USB]

  Powered by Linux