aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Krufky <mkrufky@linuxtv.org>2008-06-19 22:15:38 -0300
committerMauro Carvalho Chehab <mchehab@infradead.org>2008-07-20 07:22:53 -0300
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 6685c56ee0e..142fe00c37f 100644
--- a/drivers/media/dvb/siano/smscoreapi.c
+++ b/drivers/media/dvb/siano/smscoreapi.c
@@ -37,23 +37,6 @@ int sms_debug;
module_param_named(debug, sms_debug, int, 0644);
MODULE_PARM_DESC(debug, "set debug level (info=1, adv=2 (or-able))");
-#define PERROR(fmt, args...)\
- sms_err("smscore error: line %d- %s(): " fmt, \
- __LINE__, __func__, ## args)
-
-#ifdef SMSCORE_DEBUG
-#undef PWARNING
-# define PWARNING(fmt, args...) sms_info("smscore warning: " \
- "line %d- %s(): " fmt, \
- __LINE__, __func__, ## args)
-#undef PDEBUG /* undef it, just in case */
-# define PDEBUG(fmt, args...) sms_info("smscore - %s(): " fmt, \
- __func__, ## args)
-#else /*SMSCORE_DEBUG*/
-#define PDEBUG(fmt, args...)
-#define PWARNING(fmt, args...)
-#endif
-
struct smscore_device_notifyee_t {
struct list_head entry;
hotplug_t hotplug;
@@ -504,7 +487,7 @@ int smscore_load_firmware_family2(struct smscore_device_t *coredev,
return -ENOMEM;
if (coredev->mode != DEVICE_MODE_NONE) {
- PDEBUG("Sending reload command");
+ sms_debug("sending reload command.");
SMS_INIT_MSG(msg, MSG_SW_RELOAD_START_REQ,
sizeof(struct SmsMsgHdr_ST));
rc = smscore_sendrequest_and_wait(coredev, msg,
@@ -641,7 +624,7 @@ int smscore_load_firmware_from_file(struct smscore_device_t *coredev,
int smscore_load_firmware_from_buffer(struct smscore_device_t *coredev,
u8 *buffer, int size, int new_mode)
{
- PERROR("Feature not implemented yet");
+ sms_err("feature not yet implemented.");
return -EFAULT;
}
@@ -774,7 +757,7 @@ int smscore_set_device_mode(struct smscore_device_t *coredev, int mode)
int rc = 0;
enum sms_device_type_st type;
- PDEBUG("set device mode to %d", mode);
+ sms_debug("set device mode to %d", mode);
if (coredev->device_flags & SMS_DEVICE_FAMILY2) {
if (mode < DEVICE_MODE_DVBT || mode > DEVICE_MODE_RAW_TUNER) {
sms_err("invalid mode specified %d", mode);
@@ -1041,7 +1024,7 @@ int smscore_validate_client(struct smscore_device_t *coredev,
struct smscore_client_t *registered_client;
if (!client) {
- PERROR("bad parameter.");
+ sms_err("bad parameter.");
return -EFAULT;
}
registered_client = smscore_find_client(coredev, data_type, id);
@@ -1049,12 +1032,12 @@ int smscore_validate_client(struct smscore_device_t *coredev,
return 0;
if (registered_client) {
- PERROR("The msg ID already registered to another client.");
+ sms_err("The msg ID already registered to another client.");
return -EEXIST;
}
listentry = kzalloc(sizeof(struct smscore_idlist_t), GFP_KERNEL);
if (!listentry) {
- PERROR("Can't allocate memory for client id.");
+ sms_err("Can't allocate memory for client id.");
return -ENOMEM;
}
listentry->id = id;
@@ -1086,13 +1069,13 @@ int smscore_register_client(struct smscore_device_t *coredev,
/* check that no other channel with same parameters exists */
if (smscore_find_client(coredev, params->data_type,
params->initial_id)) {
- PERROR("Client already exist.");
+ sms_err("Client already exist.");
return -EEXIST;
}
newclient = kzalloc(sizeof(struct smscore_client_t), GFP_KERNEL);
if (!newclient) {
- PERROR("Failed to allocate memory for client.");
+ sms_err("Failed to allocate memory for client.");
return -ENOMEM;
}
@@ -1106,8 +1089,8 @@ int smscore_register_client(struct smscore_device_t *coredev,
smscore_validate_client(coredev, newclient, params->data_type,
params->initial_id);
*client = newclient;
- PDEBUG("%p %d %d", params->context, params->data_type,
- params->initial_id);
+ sms_debug("%p %d %d", params->context, params->data_type,
+ params->initial_id);
return 0;
}
diff --git a/drivers/media/dvb/siano/smscoreapi.h b/drivers/media/dvb/siano/smscoreapi.h
index a21f01f71ba..b84606b30fd 100644
--- a/drivers/media/dvb/siano/smscoreapi.h
+++ b/drivers/media/dvb/siano/smscoreapi.h
@@ -429,7 +429,11 @@ extern int sms_debug;
sms_printk(kern, fmt, ##arg); } while (0)
#define sms_err(fmt, arg...) \
- sms_printk(KERN_ERR, "%s " fmt "\n", __func__, ##arg)
+ sms_printk(KERN_ERR, "%s() line: %d: " fmt "\n", \
+ __func__, __LINE__, ##arg)
+#define sms_warn(fmt, arg...) \
+ sms_printk(KERN_WARNING, "%s() line: %d: " fmt "\n", \
+ __func__, __LINE__, ##arg)
#define sms_info(fmt, arg...) \
dprintk(KERN_INFO, DBG_INFO, fmt, ##arg)
#define sms_debug(fmt, arg...) \