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:
parent
ba60bc673c
commit
9adea1c00d
1 changed files with 8 additions and 0 deletions
|
@ -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__ */
|
||||
|
|
Loading…
Reference in a new issue