Commit 9adea1c0 authored by Michael Krufky's avatar Michael Krufky Committed by Mauro Carvalho Chehab

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: default avatarMichael Krufky <mkrufky@linuxtv.org>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@infradead.org>
parent ba60bc67
...@@ -170,4 +170,12 @@ __fail: \ ...@@ -170,4 +170,12 @@ __fail: \
__ret; \ __ret; \
}) })
#define hybrid_tuner_report_instance_count(state) \
({ \
int __ret = 0; \
if (state) \
__ret = state->i2c_props.count; \
__ret; \
})
#endif /* __TUNER_I2C_H__ */ #endif /* __TUNER_I2C_H__ */
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment