aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Krufky <mkrufky@linuxtv.org>2008-06-19 21:15:38 -0400
committerMauro Carvalho Chehab <mchehab@infradead.org>2008-07-20 06:22:53 -0400
commit2522dc13245073f75399ada8e7f6acecde834953 (patch)
tree434825bcce1c3a9cb1b87539b99e789bb7997208
parenteb250942fe3cf2a129ab55d65161bc66b7009853 (diff)
V4L/DVB (8297): sms1xxx: remove old printk macros
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
-rw-r--r--drivers/media/dvb/siano/smscoreapi.c37
-rw-r--r--drivers/media/dvb/siano/smscoreapi.h6
2 files changed, 15 insertions, 28 deletions
diff --git a/drivers/media/dvb/siano/smscoreapi.c b/drivers/media/dvb/siano/smscoreapi.c
index 6685c56ee0e5..142fe00c37fc 100644
--- a/drivers/media/dvb/siano/smscoreapi.c
+++ b/drivers/media/dvb/siano/smscoreapi.c
@@ -37,23 +37,6 @@ int sms_debug;
37module_param_named(debug, sms_debug, int, 0644); 37module_param_named(debug, sms_debug, int, 0644);
38MODULE_PARM_DESC(debug, "set debug level (info=1, adv=2 (or-able))"); 38MODULE_PARM_DESC(debug, "set debug level (info=1, adv=2 (or-able))");
39 39
40#define PERROR(fmt, args...)\
41 sms_err("smscore error: line %d- %s(): " fmt, \
42 __LINE__, __func__, ## args)
43
44#ifdef SMSCORE_DEBUG
45#undef PWARNING
46# define PWARNING(fmt, args...) sms_info("smscore warning: " \
47 "line %d- %s(): " fmt, \
48 __LINE__, __func__, ## args)
49#undef PDEBUG /* undef it, just in case */
50# define PDEBUG(fmt, args...) sms_info("smscore - %s(): " fmt, \
51 __func__, ## args)
52#else /*SMSCORE_DEBUG*/
53#define PDEBUG(fmt, args...)
54#define PWARNING(fmt, args...)
55#endif
56
57struct smscore_device_notifyee_t { 40struct smscore_device_notifyee_t {
58 struct list_head entry; 41 struct list_head entry;
59 hotplug_t hotplug; 42 hotplug_t hotplug;
@@ -504,7 +487,7 @@ int smscore_load_firmware_family2(struct smscore_device_t *coredev,
504 return -ENOMEM; 487 return -ENOMEM;
505 488
506 if (coredev->mode != DEVICE_MODE_NONE) { 489 if (coredev->mode != DEVICE_MODE_NONE) {
507 PDEBUG("Sending reload command"); 490 sms_debug("sending reload command.");
508 SMS_INIT_MSG(msg, MSG_SW_RELOAD_START_REQ, 491 SMS_INIT_MSG(msg, MSG_SW_RELOAD_START_REQ,
509 sizeof(struct SmsMsgHdr_ST)); 492 sizeof(struct SmsMsgHdr_ST));
510 rc = smscore_sendrequest_and_wait(coredev, msg, 493 rc = smscore_sendrequest_and_wait(coredev, msg,
@@ -641,7 +624,7 @@ int smscore_load_firmware_from_file(struct smscore_device_t *coredev,
641int smscore_load_firmware_from_buffer(struct smscore_device_t *coredev, 624int smscore_load_firmware_from_buffer(struct smscore_device_t *coredev,
642 u8 *buffer, int size, int new_mode) 625 u8 *buffer, int size, int new_mode)
643{ 626{
644 PERROR("Feature not implemented yet"); 627 sms_err("feature not yet implemented.");
645 return -EFAULT; 628 return -EFAULT;
646} 629}
647 630
@@ -774,7 +757,7 @@ int smscore_set_device_mode(struct smscore_device_t *coredev, int mode)
774 int rc = 0; 757 int rc = 0;
775 enum sms_device_type_st type; 758 enum sms_device_type_st type;
776 759
777 PDEBUG("set device mode to %d", mode); 760 sms_debug("set device mode to %d", mode);
778 if (coredev->device_flags & SMS_DEVICE_FAMILY2) { 761 if (coredev->device_flags & SMS_DEVICE_FAMILY2) {
779 if (mode < DEVICE_MODE_DVBT || mode > DEVICE_MODE_RAW_TUNER) { 762 if (mode < DEVICE_MODE_DVBT || mode > DEVICE_MODE_RAW_TUNER) {
780 sms_err("invalid mode specified %d", mode); 763 sms_err("invalid mode specified %d", mode);
@@ -1041,7 +1024,7 @@ int smscore_validate_client(struct smscore_device_t *coredev,
1041 struct smscore_client_t *registered_client; 1024 struct smscore_client_t *registered_client;
1042 1025
1043 if (!client) { 1026 if (!client) {
1044 PERROR("bad parameter."); 1027 sms_err("bad parameter.");
1045 return -EFAULT; 1028 return -EFAULT;
1046 } 1029 }
1047 registered_client = smscore_find_client(coredev, data_type, id); 1030 registered_client = smscore_find_client(coredev, data_type, id);
@@ -1049,12 +1032,12 @@ int smscore_validate_client(struct smscore_device_t *coredev,
1049 return 0; 1032 return 0;
1050 1033
1051 if (registered_client) { 1034 if (registered_client) {
1052 PERROR("The msg ID already registered to another client."); 1035 sms_err("The msg ID already registered to another client.");
1053 return -EEXIST; 1036 return -EEXIST;
1054 } 1037 }
1055 listentry = kzalloc(sizeof(struct smscore_idlist_t), GFP_KERNEL); 1038 listentry = kzalloc(sizeof(struct smscore_idlist_t), GFP_KERNEL);
1056 if (!listentry) { 1039 if (!listentry) {
1057 PERROR("Can't allocate memory for client id."); 1040 sms_err("Can't allocate memory for client id.");
1058 return -ENOMEM; 1041 return -ENOMEM;
1059 } 1042 }
1060 listentry->id = id; 1043 listentry->id = id;
@@ -1086,13 +1069,13 @@ int smscore_register_client(struct smscore_device_t *coredev,
1086 /* check that no other channel with same parameters exists */ 1069 /* check that no other channel with same parameters exists */
1087 if (smscore_find_client(coredev, params->data_type, 1070 if (smscore_find_client(coredev, params->data_type,
1088 params->initial_id)) { 1071 params->initial_id)) {
1089 PERROR("Client already exist."); 1072 sms_err("Client already exist.");
1090 return -EEXIST; 1073 return -EEXIST;
1091 } 1074 }
1092 1075
1093 newclient = kzalloc(sizeof(struct smscore_client_t), GFP_KERNEL); 1076 newclient = kzalloc(sizeof(struct smscore_client_t), GFP_KERNEL);
1094 if (!newclient) { 1077 if (!newclient) {
1095 PERROR("Failed to allocate memory for client."); 1078 sms_err("Failed to allocate memory for client.");
1096 return -ENOMEM; 1079 return -ENOMEM;
1097 } 1080 }
1098 1081
@@ -1106,8 +1089,8 @@ int smscore_register_client(struct smscore_device_t *coredev,
1106 smscore_validate_client(coredev, newclient, params->data_type, 1089 smscore_validate_client(coredev, newclient, params->data_type,
1107 params->initial_id); 1090 params->initial_id);
1108 *client = newclient; 1091 *client = newclient;
1109 PDEBUG("%p %d %d", params->context, params->data_type, 1092 sms_debug("%p %d %d", params->context, params->data_type,
1110 params->initial_id); 1093 params->initial_id);
1111 1094
1112 return 0; 1095 return 0;
1113} 1096}
diff --git a/drivers/media/dvb/siano/smscoreapi.h b/drivers/media/dvb/siano/smscoreapi.h
index a21f01f71ba4..b84606b30fd8 100644
--- a/drivers/media/dvb/siano/smscoreapi.h
+++ b/drivers/media/dvb/siano/smscoreapi.h
@@ -429,7 +429,11 @@ extern int sms_debug;
429 sms_printk(kern, fmt, ##arg); } while (0) 429 sms_printk(kern, fmt, ##arg); } while (0)
430 430
431#define sms_err(fmt, arg...) \ 431#define sms_err(fmt, arg...) \
432 sms_printk(KERN_ERR, "%s " fmt "\n", __func__, ##arg) 432 sms_printk(KERN_ERR, "%s() line: %d: " fmt "\n", \
433 __func__, __LINE__, ##arg)
434#define sms_warn(fmt, arg...) \
435 sms_printk(KERN_WARNING, "%s() line: %d: " fmt "\n", \
436 __func__, __LINE__, ##arg)
433#define sms_info(fmt, arg...) \ 437#define sms_info(fmt, arg...) \
434 dprintk(KERN_INFO, DBG_INFO, fmt, ##arg) 438 dprintk(KERN_INFO, DBG_INFO, fmt, ##arg)
435#define sms_debug(fmt, arg...) \ 439#define sms_debug(fmt, arg...) \