mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Jeff Garzik <jeff@garzik.org>
To: LKML <linux-kernel@vger.kernel.org>
Cc: akpm@linux-foundation.org, mchehab@infradead.org
Subject: [PATCH] media/video/planb: fix obvious interrupt handling bugs
Date: Fri, 26 Oct 2007 05:40:27 -0400 (EDT)	[thread overview]
Message-ID: <da61b43a149fee24af8b8db3e6e7efe2629ad79e.1193390975.git.jeff@garzik.org> (raw)
In-Reply-To: <9799624f63e093aa915947aea8fb1b8a5df959a1.1193390973.git.jeff@garzik.org>

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>
---
 drivers/media/video/planb.c |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/media/video/planb.c b/drivers/media/video/planb.c
index ce4b2f9..36047d4 100644
--- a/drivers/media/video/planb.c
+++ b/drivers/media/video/planb.c
@@ -91,7 +91,6 @@ static void planb_close(struct video_device *);
 static int planb_ioctl(struct video_device *, unsigned int, void *);
 static int planb_init_done(struct video_device *);
 static int planb_mmap(struct video_device *, const char *, unsigned long);
-static void planb_irq(int, void *);
 static void release_planb(void);
 int init_planbs(struct video_init *);
 
@@ -1315,7 +1314,7 @@ cmd_tab_data_end:
 	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;
 	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->grabbing--;
 		wake_up_interruptible(&pb->capq);
-		return;
+		return IRQ_HANDLED;
 	}
 	/* incorrect interrupts? */
 	pb->intr_mask = PLANB_CLR_IRQ;
 	out_le32(&pb->planb_base->intr_stat, PLANB_CLR_IRQ);
 	printk(KERN_ERR "PlanB: IRQ lockup, cleared intrrupts"
 							" unconditionally\n");
+	return IRQ_HANDLED;
 }
 
 /*******************************
@@ -2090,7 +2090,7 @@ static int init_planb(struct planb *pb)
 	/* clear interrupt mask */
 	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==-EINVAL)
 			printk(KERN_ERR "PlanB: Bad irq number (%d) "
-- 
1.5.2.4


  parent reply	other threads:[~2007-10-26  9:42 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-10-26  9:40 [PATCH] Remove pointless casts from void pointers, Jeff Garzik
2007-10-26  9:40 ` [PATCH] Remove always-true tests in irq handlers Jeff Garzik
2007-10-26 12:02   ` Ralf Baechle
2007-10-26  9:40 ` [PATCH] ARM: Misc minor interrupt handler cleanups Jeff Garzik
2007-10-26 21:56   ` Lennert Buytenhek
2007-10-26  9:40 ` [PATCH] IA64, PPC, SPARC: minor irq " Jeff Garzik
2007-10-26  9:44   ` Kumar Gala
2007-10-26  9:49     ` Jeff Garzik
2007-10-26 14:55       ` Kumar Gala
2007-10-26  9:40 ` Jeff Garzik [this message]
2007-10-26  9:40 ` [PATCH] drivers/net/irda/au1k_ir: fix obvious irq handler bugs Jeff Garzik
2007-10-26  9:40 ` [PATCH] SCSI/gdth: kill unneeded 'irq' argument Jeff Garzik
2007-10-29  9:22   ` Boaz Harrosh
2007-10-26  9:40 ` [PATCH] SCSI/sym53c416: kill pointless irq handler loop and test Jeff Garzik
2007-10-26  9:40 ` [PATCH] NETDRVR, USB: declance, lp486e, s3c2410_udc: minor irq handler cleanups Jeff Garzik
2007-10-26 12:24 ` [PATCH] Remove pointless casts from void pointers, John W. Linville
2007-10-26 13:38 ` Dmitry Torokhov
2007-10-26 14:46 ` Josh Boyer
2007-10-26 14:55 ` Holger Schurig
2007-10-26 21:58 ` Lennert Buytenhek

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=da61b43a149fee24af8b8db3e6e7efe2629ad79e.1193390975.git.jeff@garzik.org \
    --to=jeff@garzik.org \
    --cc=akpm@linux-foundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mchehab@infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®