#include "sms-cards.h"
 #include "smsir.h"
 
-static int sms_dbg;
-module_param_named(cards_dbg, sms_dbg, int, 0644);
-MODULE_PARM_DESC(cards_dbg, "set debug level (info=1, adv=2 (or-able))");
-
 static struct sms_board sms_boards[] = {
        [SMS_BOARD_UNKNOWN] = {
                .name   = "Unknown board",
 
 #include "smsir.h"
 #include "smsendian.h"
 
-static int sms_dbg;
+int sms_dbg;
 module_param_named(debug, sms_dbg, int, 0644);
 MODULE_PARM_DESC(debug, "set debug level (info=1, adv=2 (or-able))");
 
 
 
 
 /* ------------------------------------------------------------------------ */
+extern int sms_dbg;
 
 #define DBG_INFO 1
 #define DBG_ADV  2
 
 static struct list_head g_smsdvb_clients;
 static struct mutex g_smsdvb_clientslock;
 
-static int sms_dbg;
-module_param_named(debug, sms_dbg, int, 0644);
-MODULE_PARM_DESC(debug, "set debug level (info=1, adv=2 (or-able))");
-
 /* Events that may come from DVB v3 adapter */
 static void sms_board_dvb3_event(struct smsdvb_client_t *client,
                enum SMS_DVB3_EVENTS event) {
 
 #include "sms-cards.h"
 #include "smsendian.h"
 
-static int sms_dbg;
-module_param_named(debug, sms_dbg, int, 0644);
-MODULE_PARM_DESC(debug, "set debug level (info=1, adv=2 (or-able))");
-
 #define USB1_BUFFER_SIZE               0x1000
 #define USB2_BUFFER_SIZE               0x4000