From: Doron Cohen Date: Wed, 20 Jul 2011 12:07:36 +0000 (-0300) Subject: [media] siano: apply debug flag to module level X-Git-Tag: firefly_0821_release~3680^2~4256^2~317 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=ea3709435c7f;p=firefly-linux-kernel-4.4.55.git [media] siano: apply debug flag to module level Siano modules already had sms_dbg flag which is a module parameter which sets the debug mode so module prints messages to dmesg for debugging. The variable was static therefore apply only to the file which defines the module. In modules as smsmdtv.ko that contain a few files, the debug flag applied only for functions in that main file. flag was changed to be non-static and therefore can be accessed by all module files (although it is still not exported out of the module). Signed-off-by: Doron Cohen Signed-off-by: Mauro Carvalho Chehab --- diff --git a/drivers/media/dvb/siano/sms-cards.c b/drivers/media/dvb/siano/sms-cards.c index af121db88ea0..cf442dc4c191 100644 --- a/drivers/media/dvb/siano/sms-cards.c +++ b/drivers/media/dvb/siano/sms-cards.c @@ -20,10 +20,6 @@ #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", diff --git a/drivers/media/dvb/siano/smscoreapi.c b/drivers/media/dvb/siano/smscoreapi.c index 7331e8450d1a..c0acacc42dc6 100644 --- a/drivers/media/dvb/siano/smscoreapi.c +++ b/drivers/media/dvb/siano/smscoreapi.c @@ -39,7 +39,7 @@ #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))"); diff --git a/drivers/media/dvb/siano/smscoreapi.h b/drivers/media/dvb/siano/smscoreapi.h index c592ae090397..bd1cafc2224b 100644 --- a/drivers/media/dvb/siano/smscoreapi.h +++ b/drivers/media/dvb/siano/smscoreapi.h @@ -751,6 +751,7 @@ int smscore_led_state(struct smscore_device_t *core, int led); /* ------------------------------------------------------------------------ */ +extern int sms_dbg; #define DBG_INFO 1 #define DBG_ADV 2 diff --git a/drivers/media/dvb/siano/smsdvb.c b/drivers/media/dvb/siano/smsdvb.c index 37c594f82782..b1f4911e8359 100644 --- a/drivers/media/dvb/siano/smsdvb.c +++ b/drivers/media/dvb/siano/smsdvb.c @@ -60,10 +60,6 @@ struct smsdvb_client_t { 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) { diff --git a/drivers/media/dvb/siano/smsusb.c b/drivers/media/dvb/siano/smsusb.c index 0c8164a2cc36..f8dca557fef9 100644 --- a/drivers/media/dvb/siano/smsusb.c +++ b/drivers/media/dvb/siano/smsusb.c @@ -29,10 +29,6 @@ along with this program. If not, see . #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