Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

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

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
Loading
Loading
Loading
Loading
+8 −0
Original line number Diff line number Diff line
@@ -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__ */