V4L/DVB (6407): planb: fix obvious interrupt handling bugs
irq handlers have returned a return value for years now... catch up with the times. Also, ditch unneeded prototype. Signed-off-by: Jeff Garzik <jgarzik@redhat.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
This commit is contained in:
parent
387a299bdd
commit
52c28d4b0a
1 changed files with 4 additions and 4 deletions
|
@ -91,7 +91,6 @@ static void planb_close(struct video_device *);
|
||||||
static int planb_ioctl(struct video_device *, unsigned int, void *);
|
static int planb_ioctl(struct video_device *, unsigned int, void *);
|
||||||
static int planb_init_done(struct video_device *);
|
static int planb_init_done(struct video_device *);
|
||||||
static int planb_mmap(struct video_device *, const char *, unsigned long);
|
static int planb_mmap(struct video_device *, const char *, unsigned long);
|
||||||
static void planb_irq(int, void *);
|
|
||||||
static void release_planb(void);
|
static void release_planb(void);
|
||||||
int init_planbs(struct video_init *);
|
int init_planbs(struct video_init *);
|
||||||
|
|
||||||
|
@ -1315,7 +1314,7 @@ static volatile struct dbdma_cmd *setup_grab_cmd(int fr, struct planb *pb)
|
||||||
return c1;
|
return c1;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void planb_irq(int irq, void *dev_id)
|
static irqreturn_t planb_irq(int irq, void *dev_id)
|
||||||
{
|
{
|
||||||
unsigned int stat, astat;
|
unsigned int stat, astat;
|
||||||
struct planb *pb = (struct planb *)dev_id;
|
struct planb *pb = (struct planb *)dev_id;
|
||||||
|
@ -1358,13 +1357,14 @@ static void planb_irq(int irq, void *dev_id)
|
||||||
pb->frame_stat[fr] = GBUFFER_DONE;
|
pb->frame_stat[fr] = GBUFFER_DONE;
|
||||||
pb->grabbing--;
|
pb->grabbing--;
|
||||||
wake_up_interruptible(&pb->capq);
|
wake_up_interruptible(&pb->capq);
|
||||||
return;
|
return IRQ_HANDLED;
|
||||||
}
|
}
|
||||||
/* incorrect interrupts? */
|
/* incorrect interrupts? */
|
||||||
pb->intr_mask = PLANB_CLR_IRQ;
|
pb->intr_mask = PLANB_CLR_IRQ;
|
||||||
out_le32(&pb->planb_base->intr_stat, PLANB_CLR_IRQ);
|
out_le32(&pb->planb_base->intr_stat, PLANB_CLR_IRQ);
|
||||||
printk(KERN_ERR "PlanB: IRQ lockup, cleared intrrupts"
|
printk(KERN_ERR "PlanB: IRQ lockup, cleared intrrupts"
|
||||||
" unconditionally\n");
|
" unconditionally\n");
|
||||||
|
return IRQ_HANDLED;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*******************************
|
/*******************************
|
||||||
|
@ -2090,7 +2090,7 @@ static int init_planb(struct planb *pb)
|
||||||
/* clear interrupt mask */
|
/* clear interrupt mask */
|
||||||
pb->intr_mask = PLANB_CLR_IRQ;
|
pb->intr_mask = PLANB_CLR_IRQ;
|
||||||
|
|
||||||
result = request_irq(pb->irq, planb_irq, 0, "PlanB", (void *)pb);
|
result = request_irq(pb->irq, planb_irq, 0, "PlanB", pb);
|
||||||
if (result < 0) {
|
if (result < 0) {
|
||||||
if (result==-EINVAL)
|
if (result==-EINVAL)
|
||||||
printk(KERN_ERR "PlanB: Bad irq number (%d) "
|
printk(KERN_ERR "PlanB: Bad irq number (%d) "
|
||||||
|
|
Loading…
Reference in a new issue