@@ -177,6 +177,7 @@ void flexcop_dump_reg(struct flexcop_device *fc,
int flexcop_pid_feed_control(struct flexcop_device *fc,
struct dvb_demux_feed *dvbdmxfeed, int onoff);
void flexcop_hw_filter_init(struct flexcop_device *fc);
+void flexcop_stream_reset(struct flexcop_device *fc);
void flexcop_smc_ctrl(struct flexcop_device *fc, int onoff);
@@ -218,7 +218,6 @@ int flexcop_pid_feed_control(struct flexcop_device *fc,
}
return 0;
}
-EXPORT_SYMBOL(flexcop_pid_feed_control);
void flexcop_hw_filter_init(struct flexcop_device *fc)
{
@@ -242,3 +241,19 @@ void flexcop_hw_filter_init(struct flexcop_device *fc)
flexcop_null_filter_ctrl(fc, 1);
}
+
+void flexcop_stream_reset(struct flexcop_device *fc)
+{
+ struct dvb_demux_feed *feed;
+
+ spin_lock_irq(&fc->demux.lock);
+ list_for_each_entry(feed, &fc->demux.feed_list, list_head) {
+ flexcop_pid_feed_control(fc, feed, 0);
+ }
+
+ list_for_each_entry(feed, &fc->demux.feed_list, list_head) {
+ flexcop_pid_feed_control(fc, feed, 1);
+ }
+ spin_unlock_irq(&fc->demux.lock);
+}
+EXPORT_SYMBOL(flexcop_stream_reset);
@@ -112,21 +112,9 @@ static void flexcop_pci_irq_check_work(struct work_struct *work)
if (fc_pci->count == fc_pci->count_prev) {
deb_chk("no IRQ since the last check\n");
if (fc_pci->stream_problem++ == 3) {
- struct dvb_demux_feed *feed;
deb_info("flexcop-pci: stream problem, resetting pid filter\n");
- spin_lock_irq(&fc->demux.lock);
- list_for_each_entry(feed, &fc->demux.feed_list,
- list_head) {
- flexcop_pid_feed_control(fc, feed, 0);
- }
-
- list_for_each_entry(feed, &fc->demux.feed_list,
- list_head) {
- flexcop_pid_feed_control(fc, feed, 1);
- }
- spin_unlock_irq(&fc->demux.lock);
-
+ flexcop_stream_reset(fc);
fc_pci->stream_problem = 0;
}
} else {
As this bit of code is resetting the flexcop stream and the hardware filter a better place for it is in flexcop-hw-filter.c Signed-off-by: Jemma Denson <jdenson@gmail.com> --- drivers/media/common/b2c2/flexcop-common.h | 1 + drivers/media/common/b2c2/flexcop-hw-filter.c | 17 ++++++++++++++++- drivers/media/pci/b2c2/flexcop-pci.c | 14 +------------- 3 files changed, 18 insertions(+), 14 deletions(-)