summaryrefslogtreecommitdiff
path: root/linux/drivers/media/dvb/ttpci/av7110.c
diff options
context:
space:
mode:
Diffstat (limited to 'linux/drivers/media/dvb/ttpci/av7110.c')
-rw-r--r--linux/drivers/media/dvb/ttpci/av7110.c36
1 files changed, 15 insertions, 21 deletions
diff --git a/linux/drivers/media/dvb/ttpci/av7110.c b/linux/drivers/media/dvb/ttpci/av7110.c
index 4294ea92f..dd6b89c20 100644
--- a/linux/drivers/media/dvb/ttpci/av7110.c
+++ b/linux/drivers/media/dvb/ttpci/av7110.c
@@ -350,18 +350,17 @@ static inline void print_time(char *s)
#endif
}
-static void debiirq (unsigned long data)
+static void debiirq(unsigned long data)
{
- struct av7110 *av7110 = (struct av7110*) data;
+ struct av7110 *av7110 = (struct av7110 *) data;
int type = av7110->debitype;
int handle = (type >> 8) & 0x1f;
// dprintk(4, "%p\n",av7110);
print_time("debi");
- saa7146_write(av7110->dev, IER,
- saa7146_read(av7110->dev, IER) & ~MASK_19);
- saa7146_write(av7110->dev, ISR, MASK_19);
+ SAA7146_IER_DISABLE(av7110->dev, MASK_19);
+ SAA7146_ISR_CLEAR(av7110->dev, MASK_19);
if (type == -1) {
printk("DEBI irq oops @ %ld, psr:0x%08x, ssr:0x%08x\n",
@@ -482,13 +481,13 @@ static void debiirq (unsigned long data)
spin_unlock(&av7110->debilock);
}
-static void gpioirq (unsigned long data)
+static void gpioirq(unsigned long data)
{
- struct av7110 *av7110 = (struct av7110*) data;
+ struct av7110 *av7110 = (struct av7110 *) data;
u32 rxbuf, txbuf;
int len;
- if (av7110->debitype !=-1)
+ if (av7110->debitype != -1)
printk("dvb-ttpci: GPIO0 irq oops @ %ld, psr:0x%08x, ssr:0x%08x\n",
jiffies, saa7146_read(av7110->dev, PSR),
saa7146_read(av7110->dev, SSR));
@@ -497,9 +496,8 @@ static void gpioirq (unsigned long data)
ARM_ClearIrq(av7110);
- saa7146_write(av7110->dev, IER,
- saa7146_read(av7110->dev, IER) & ~MASK_19);
- saa7146_write(av7110->dev, ISR, MASK_19);
+ SAA7146_IER_DISABLE(av7110->dev, MASK_19);
+ SAA7146_ISR_CLEAR(av7110->dev, MASK_19);
av7110->debitype = irdebi(av7110, DEBINOSWAP, IRQ_STATE, 0, 2);
av7110->debilen = irdebi(av7110, DEBINOSWAP, IRQ_STATE_EXT, 0, 2);
@@ -580,7 +578,7 @@ static void gpioirq (unsigned long data)
}
DVB_RINGBUFFER_SKIP(cibuf, 2);
- dvb_ringbuffer_read(cibuf, av7110->debi_virt,len, 0);
+ dvb_ringbuffer_read(cibuf, av7110->debi_virt, len, 0);
wake_up(&cibuf->queue);
iwdebi(av7110, DEBINOSWAP, TX_LEN, len, 2);
@@ -1981,9 +1979,8 @@ static int av7110_attach(struct saa7146_dev* dev, struct saa7146_pci_extension_d
sema_init(&av7110->pid_mutex, 1);
/* locks for data transfers from/to AV7110 */
- spin_lock_init (&av7110->debilock);
+ spin_lock_init(&av7110->debilock);
sema_init(&av7110->dcomlock, 1);
- av7110->debilock = SPIN_LOCK_UNLOCKED;
av7110->debitype = -1;
/* default OSD window */
@@ -2100,11 +2097,8 @@ static int av7110_detach (struct saa7146_dev* saa)
dvb_unregister(av7110);
- IER_DISABLE(saa, (MASK_19 | MASK_03));
-// saa7146_write (av7110->dev, IER,
-// saa7146_read(av7110->dev, IER) & ~(MASK_19 | MASK_03));
-
- saa7146_write(av7110->dev, ISR,(MASK_19 | MASK_03));
+ SAA7146_IER_DISABLE(saa, MASK_19 | MASK_03);
+ SAA7146_ISR_CLEAR(saa, MASK_19 | MASK_03);
av7110_ca_exit(av7110);
av7110_av_exit(av7110);
@@ -2134,10 +2128,10 @@ static void av7110_irq(struct saa7146_dev* dev, u32 *isr)
struct av7110 *av7110 = dev->ext_priv;
if (*isr & MASK_19)
- tasklet_schedule (&av7110->debi_tasklet);
+ tasklet_schedule(&av7110->debi_tasklet);
if (*isr & MASK_03)
- tasklet_schedule (&av7110->gpio_tasklet);
+ tasklet_schedule(&av7110->gpio_tasklet);
}