Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=98883cdcb5884bd0f7a89ac36b7170404127b3ea
Commit:     98883cdcb5884bd0f7a89ac36b7170404127b3ea
Parent:     f380e1d2c9a1ff82a89ec68850ce53094359000e
Author:     Mauro Carvalho Chehab <[EMAIL PROTECTED]>
AuthorDate: Thu Nov 15 09:35:44 2007 -0300
Committer:  Mauro Carvalho Chehab <[EMAIL PROTECTED]>
CommitDate: Fri Jan 25 19:02:10 2008 -0200

    V4L/DVB (6594): Add tuner_err macro
    
    Some tuners, like xc3028, need to print error messages. Instead of declaring
    local macros, create a tuner global macro for printing tuner errors.
    
    To preserve CodingStyle on all tuner_macros, a few CodingStyle violations 
were
    fixed at the other macros:
        - lines with more than 80 columns
        - two statements at the same line
    
    The patch also removes the CodingStyle violation of having emacs 
declarations
    inside de source code (CodingStyle chapter 18).
    
    Signed-off-by: Mauro Carvalho Chehab <[EMAIL PROTECTED]>
---
 drivers/media/video/tuner-driver.h |   40 ++++++++++++++++++----------------
 drivers/media/video/tuner-i2c.h    |   42 ++++++++++++++++++++---------------
 2 files changed, 45 insertions(+), 37 deletions(-)

diff --git a/drivers/media/video/tuner-driver.h 
b/drivers/media/video/tuner-driver.h
index d6e5afd..a4db32d 100644
--- a/drivers/media/video/tuner-driver.h
+++ b/drivers/media/video/tuner-driver.h
@@ -71,24 +71,26 @@ struct tuner {
 
 /* ------------------------------------------------------------------------ */
 
-#define tuner_warn(fmt, arg...) do {\
-       printk(KERN_WARNING "%s %d-%04x: " fmt, PREFIX, \
-                       i2c_adapter_id(t->i2c->adapter), t->i2c->addr , ##arg); 
} while (0)
-#define tuner_info(fmt, arg...) do {\
-       printk(KERN_INFO "%s %d-%04x: " fmt, PREFIX, \
-                       i2c_adapter_id(t->i2c->adapter), t->i2c->addr , ##arg); 
} while (0)
-#define tuner_dbg(fmt, arg...) do {\
-       extern int tuner_debug; \
-       if (tuner_debug) \
-               printk(KERN_DEBUG "%s %d-%04x: " fmt, PREFIX, \
-                       i2c_adapter_id(t->i2c->adapter), t->i2c->addr , ##arg); 
} while (0)
+#define tuner_warn(fmt, arg...) do {                                   \
+       printk(KERN_WARNING "%s %d-%04x: " fmt, PREFIX,                 \
+              i2c_adapter_id(t->i2c->adapter), t->i2c->addr, ##arg);   \
+        } while (0)
+
+#define tuner_info(fmt, arg...) do {                                   \
+       printk(KERN_INFO "%s %d-%04x: " fmt, PREFIX,                    \
+              i2c_adapter_id(t->i2c->adapter), t->i2c->addr , ##arg);  \
+        } while (0)
+
+#define tuner_err(fmt, arg...) do {                                    \
+       printk(KERN_ERR "%s %d-%04x: " fmt, PREFIX,                     \
+              i2c_adapter_id(t->i2c->adapter), t->i2c->addr , ##arg);  \
+        } while (0)
+
+#define tuner_dbg(fmt, arg...) do {                                           \
+       extern int tuner_debug;                                                \
+       if (tuner_debug)                                                       \
+               printk(KERN_DEBUG "%s %d-%04x: " fmt, PREFIX,                  \
+                      i2c_adapter_id(t->i2c->adapter), t->i2c->addr , ##arg); \
+        } while (0)
 
 #endif /* __TUNER_DRIVER_H__ */
-
-/*
- * Overrides for Emacs so that we follow Linus's tabbing style.
- * ---------------------------------------------------------------------------
- * Local variables:
- * c-basic-offset: 8
- * End:
- */
diff --git a/drivers/media/video/tuner-i2c.h b/drivers/media/video/tuner-i2c.h
index cfba3d1..b5ac189 100644
--- a/drivers/media/video/tuner-i2c.h
+++ b/drivers/media/video/tuner-i2c.h
@@ -47,24 +47,30 @@ static inline int tuner_i2c_xfer_recv(struct 
tuner_i2c_props *props, char *buf,
 }
 
 #ifndef __TUNER_DRIVER_H__
-#define tuner_warn(fmt, arg...) do {\
-       printk(KERN_WARNING "%s %d-%04x: " fmt, PREFIX, \
-                       i2c_adapter_id(priv->i2c_props.adap), 
priv->i2c_props.addr , ##arg); } while (0)
-#define tuner_info(fmt, arg...) do {\
-       printk(KERN_INFO "%s %d-%04x: " fmt, PREFIX, \
-                       i2c_adapter_id(priv->i2c_props.adap), 
priv->i2c_props.addr , ##arg); } while (0)
-#define tuner_dbg(fmt, arg...) do {\
-       if ((debug)) \
-               printk(KERN_DEBUG "%s %d-%04x: " fmt, PREFIX, \
-                       i2c_adapter_id(priv->i2c_props.adap), 
priv->i2c_props.addr , ##arg); } while (0)
+#define tuner_warn(fmt, arg...) do {                                   \
+       printk(KERN_WARNING "%s %d-%04x: " fmt, PREFIX,                 \
+                       i2c_adapter_id(priv->i2c_props.adap),           \
+                       priv->i2c_props.addr, ##arg);                   \
+        } while (0)
+
+#define tuner_info(fmt, arg...) do {                                   \
+       printk(KERN_INFO "%s %d-%04x: " fmt, PREFIX,                    \
+                       i2c_adapter_id(priv->i2c_props.adap),           \
+                       priv->i2c_props.addr , ##arg);                  \
+       } while (0)
+
+#define tuner_err(fmt, arg...) do {                                    \
+       printk(KERN_ERR "%s %d-%04x: " fmt, PREFIX,                     \
+                       i2c_adapter_id(priv->i2c_props.adap),           \
+                       priv->i2c_props.addr , ##arg);                  \
+       } while (0)
+
+#define tuner_dbg(fmt, arg...) do {                                    \
+       if ((debug))                                                    \
+               printk(KERN_DEBUG "%s %d-%04x: " fmt, PREFIX,           \
+                       i2c_adapter_id(priv->i2c_props.adap),           \
+                       priv->i2c_props.addr , ##arg);                  \
+       } while (0)
 #endif /* __TUNER_DRIVER_H__ */
 
 #endif /* __TUNER_I2C_H__ */
-
-/*
- * Overrides for Emacs so that we follow Linus's tabbing style.
- * ---------------------------------------------------------------------------
- * Local variables:
- * c-basic-offset: 8
- * End:
- */
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to