Mailing List archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[linux-dvb] Re: [PATCH] ... Now: patch for SS2 cvs dvb-kernel



Wolfgang Thiel wrote:
Before the beautify and hw patches arrive, please let's apply the
attached small patches to CVS: I don't think it will break anything,
it just is an improvement to the driver (hopefully).
applied, you fixed the broken refcounting :)

Holger


Wolfgang


------------------------------------------------------------------------

--- dvb-kernel-031126/linux/drivers/media/dvb/b2c2/skystar2.c.orig 2003-11-27 17:08:31.000000000 +0000
+++ dvb-kernel-031126/linux/drivers/media/dvb//b2c2/skystar2.c 2003-11-28 19:04:51.000000000 +0000
@@ -92,7 +92,7 @@
u32 dma_ctrl;
u32 dma_status;
- u32 capturing;
+ int capturing;
spinlock_t lock;
@@ -1737,8 +1737,7 @@
{
u32 dma_mask;
- if (adapter->capturing == 0)
- adapter->capturing = 1;
+ ++adapter->capturing;
filter_enable_mask_filter(adapter, 1);
@@ -1775,24 +1774,23 @@
static void close_stream(struct adapter *adapter, u32 pid)
{
- u32 dma_mask;
-
- if (adapter->capturing != 0)
- adapter->capturing = 0;
+ if (adapter->capturing > 0)
+ --adapter->capturing;
dprintk("%s: dma_status=%x\n", __FUNCTION__, adapter->dma_status);
- dma_mask = 0;
+ if (adapter->capturing == 0) {
+ u32 dma_mask = 0;
- if ((adapter->dma_status & 1) != 0)
- dma_mask = dma_mask | 0x00000001;
- if ((adapter->dma_status & 2) != 0)
- dma_mask = dma_mask | 0x00000002;
-
- if (dma_mask != 0) {
- dma_start_stop0x2102(adapter, dma_mask, 0);
+ if ((adapter->dma_status & 1) != 0)
+ dma_mask = dma_mask | 0x00000001;
+ if ((adapter->dma_status & 2) != 0)
+ dma_mask = dma_mask | 0x00000002;
+
+ if (dma_mask != 0) {
+ dma_start_stop0x2102(adapter, dma_mask, 0);
+ }
}
-
remove_pid(adapter, pid);
}



--
Info:
To unsubscribe send a mail to ecartis@linuxtv.org with "unsubscribe linux-dvb" as subject.



Home | Main Index | Thread Index