diff options
author | Michael Krufky <mkrufky@linuxtv.org> | 2008-04-18 16:26:04 -0400 |
---|---|---|
committer | Michael Krufky <mkrufky@linuxtv.org> | 2008-04-18 16:26:04 -0400 |
commit | ed6e5963b3c9388275c52b87a70f584b7c3b224f (patch) | |
tree | 70e216ffe9ac4e0bd002aa6617e7df4d99922d57 /linux | |
parent | 21e7b71d43a101d79253fd292136ba2c9c847c8e (diff) | |
download | mediapointer-dvb-s2-ed6e5963b3c9388275c52b87a70f584b7c3b224f.tar.gz mediapointer-dvb-s2-ed6e5963b3c9388275c52b87a70f584b7c3b224f.tar.bz2 |
tuner: add macro, hybrid_tuner_report_instance_count
From: Michael Krufky <mkrufky@linuxtv.org>
Create a macro to report the number of instances of the tuner driver
currently in use. This will allow drivers to perform specific cleanups
before destroying the last instance of a tuner.
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Diffstat (limited to 'linux')
-rw-r--r-- | linux/drivers/media/video/tuner-i2c.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/linux/drivers/media/video/tuner-i2c.h b/linux/drivers/media/video/tuner-i2c.h index 3ad6c8e0b..cb1c7141f 100644 --- a/linux/drivers/media/video/tuner-i2c.h +++ b/linux/drivers/media/video/tuner-i2c.h @@ -170,4 +170,12 @@ __fail: \ __ret; \ }) +#define hybrid_tuner_report_instance_count(state) \ +({ \ + int __ret = 0; \ + if (state) \ + __ret = state->i2c_props.count; \ + __ret; \ +}) + #endif /* __TUNER_I2C_H__ */ |