Skip to content

Commit

Permalink
V4L/DVB (7943): tuner: add macro, hybrid_tuner_report_instance_count
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Michael Krufky authored and Mauro Carvalho Chehab committed Jun 5, 2008
1 parent ba60bc6 commit 9adea1c
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions drivers/media/common/tuners/tuner-i2c.h
Original file line number Diff line number Diff line change
Expand Up @@ -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__ */

0 comments on commit 9adea1c

Please sign in to comment.