summaryrefslogtreecommitdiffstats
path: root/drivers/media/common/tuners/tda18271-priv.h
diff options
context:
space:
mode:
authorMichael Krufky <mkrufky@linuxtv.org>2008-05-04 21:32:21 -0300
committerMauro Carvalho Chehab <mchehab@infradead.org>2008-05-14 02:54:06 -0300
commit4bd5d1071ddbb35ae545c7738e6411e50ce28b17 (patch)
tree44ea03fd76a2aa8838b005c349f0838c11820b1c /drivers/media/common/tuners/tda18271-priv.h
parent10ed0bf4af00c25590e8bfca344d8dec5c3637ae (diff)
V4L/DVB (7844): tda18271: add tda_fail macro to log error cases
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Diffstat (limited to 'drivers/media/common/tuners/tda18271-priv.h')
-rw-r--r--drivers/media/common/tuners/tda18271-priv.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/drivers/media/common/tuners/tda18271-priv.h b/drivers/media/common/tuners/tda18271-priv.h
index 2bc5eb368ea..81a739365f8 100644
--- a/drivers/media/common/tuners/tda18271-priv.h
+++ b/drivers/media/common/tuners/tda18271-priv.h
@@ -153,6 +153,15 @@ extern int tda18271_debug;
#define tda_reg(fmt, arg...) dprintk(KERN_DEBUG, DBG_REG, fmt, ##arg)
#define tda_cal(fmt, arg...) dprintk(KERN_DEBUG, DBG_CAL, fmt, ##arg)
+#define tda_fail(ret) \
+({ \
+ int __ret; \
+ __ret = (ret < 0); \
+ if (__ret) \
+ tda_printk(KERN_ERR, "error %d on line %d\n", ret, __LINE__);\
+ __ret; \
+})
+
/*---------------------------------------------------------------------*/
enum tda18271_map_type {