V4L/DVB (7943): tuner: add macro, hybrid_tuner_report_instance_count

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>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
This commit is contained in:
Michael Krufky 2008-04-18 20:26:04 -03:00 committed by Mauro Carvalho Chehab
parent ba60bc673c
commit 9adea1c00d

View file

@ -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__ */