The patch number 8297 was added via Michael Krufky <[EMAIL PROTECTED]>
to http://linuxtv.org/hg/v4l-dvb master development tree.

Kernel patches in this development tree may be modified to be backward
compatible with older kernels. Compatibility modifications will be
removed before inclusion into the mainstream Kernel

If anyone has any objections, please let us know by sending a message to:
        [EMAIL PROTECTED]

------

From: Michael Krufky  <[EMAIL PROTECTED]>
sms1xxx: remove old printk macros


Signed-off-by: Michael Krufky <[EMAIL PROTECTED]>


---

 linux/drivers/media/dvb/siano/smscoreapi.c |   37 +++++----------------
 linux/drivers/media/dvb/siano/smscoreapi.h |    6 ++-
 2 files changed, 15 insertions(+), 28 deletions(-)

diff -r 140ed6e2e7d5 -r 6720362083bb linux/drivers/media/dvb/siano/smscoreapi.c
--- a/linux/drivers/media/dvb/siano/smscoreapi.c        Thu Jun 19 18:07:23 
2008 -0400
+++ b/linux/drivers/media/dvb/siano/smscoreapi.c        Thu Jun 19 18:15:38 
2008 -0400
@@ -36,23 +36,6 @@ int sms_debug;
 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;
@@ -504,7 +487,7 @@ int smscore_load_firmware_family2(struct
                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_buffer(st
 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 smsco
        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);
@@ -1052,7 +1035,7 @@ int smscore_validate_client(struct smsco
        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);
@@ -1060,12 +1043,12 @@ int smscore_validate_client(struct smsco
                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;
@@ -1097,13 +1080,13 @@ int smscore_register_client(struct smsco
        /* 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;
        }
 
@@ -1117,8 +1100,8 @@ int smscore_register_client(struct smsco
        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 -r 140ed6e2e7d5 -r 6720362083bb linux/drivers/media/dvb/siano/smscoreapi.h
--- a/linux/drivers/media/dvb/siano/smscoreapi.h        Thu Jun 19 18:07:23 
2008 -0400
+++ b/linux/drivers/media/dvb/siano/smscoreapi.h        Thu Jun 19 18:15:38 
2008 -0400
@@ -594,7 +594,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...) \


---

Patch is available at: 
http://linuxtv.org/hg/v4l-dvb/rev/6720362083bb1e376a1177849c9790193b2803df

_______________________________________________
linuxtv-commits mailing list
linuxtv-commits@linuxtv.org
http://www.linuxtv.org/cgi-bin/mailman/listinfo/linuxtv-commits

Reply via email to