public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 2.4.23-pre8] sonypi driver update
@ 2003-10-26 16:45 Stelian Pop
  0 siblings, 0 replies; only message in thread
From: Stelian Pop @ 2003-10-26 16:45 UTC (permalink / raw)
  To: Linux Kernel Mailing List; +Cc: marcelo.tosatti

Hi,

This is a small update to the sonypi driver which:
	* corrects the events for the Zoom and Help buttons
	* uses the irqreturn_t constructs backported from 2.5.

This is not very intrusive and safe to be applied somewhat
late in the -pre cycle.

Marcelo, please apply.

Thanks.

Stelian.

===== drivers/char/sonypi.h 1.19 vs edited =====
--- 1.19/drivers/char/sonypi.h	Mon Sep  1 12:37:24 2003
+++ edited/drivers/char/sonypi.h	Sun Oct 26 15:31:16 2003
@@ -37,7 +37,7 @@
 #ifdef __KERNEL__
 
 #define SONYPI_DRIVER_MAJORVERSION	 1
-#define SONYPI_DRIVER_MINORVERSION	20
+#define SONYPI_DRIVER_MINORVERSION	21
 
 #define SONYPI_DEVICE_MODEL_TYPE1	1
 #define SONYPI_DEVICE_MODEL_TYPE2	2
@@ -329,8 +329,8 @@
 	{ SONYPI_DEVICE_MODEL_TYPE2, 0x08, SONYPI_PKEY_MASK, sonypi_pkeyev },
 	{ SONYPI_DEVICE_MODEL_TYPE2, 0x11, SONYPI_BACK_MASK, sonypi_backev },
 	{ SONYPI_DEVICE_MODEL_TYPE2, 0x08, SONYPI_HELP_MASK, sonypi_helpev },
-	{ SONYPI_DEVICE_MODEL_TYPE2, 0x08, SONYPI_ZOOM_MASK, sonypi_zoomev },
-	{ SONYPI_DEVICE_MODEL_TYPE2, 0x08, SONYPI_THUMBPHRASE_MASK, sonypi_thumbphraseev },
+	{ SONYPI_DEVICE_MODEL_TYPE2, 0x21, SONYPI_ZOOM_MASK, sonypi_zoomev },
+	{ SONYPI_DEVICE_MODEL_TYPE2, 0x20, SONYPI_THUMBPHRASE_MASK, sonypi_thumbphraseev },
 	{ SONYPI_DEVICE_MODEL_TYPE2, 0x31, SONYPI_MEMORYSTICK_MASK, sonypi_memorystickev },
 	{ SONYPI_DEVICE_MODEL_TYPE2, 0x41, SONYPI_BATTERY_MASK, sonypi_batteryev },
 
===== drivers/char/sonypi.c 1.17 vs edited =====
--- 1.17/drivers/char/sonypi.c	Fri Aug  1 14:35:17 2003
+++ edited/drivers/char/sonypi.c	Wed Sep  3 09:58:01 2003
@@ -303,7 +303,7 @@
 }
 
 /* Interrupt handler: some event is available */
-void sonypi_irq(int irq, void *dev_id, struct pt_regs *regs) {
+static irqreturn_t sonypi_irq(int irq, void *dev_id, struct pt_regs *regs) {
 	u8 v1, v2, event = 0;
 	int i, j;
 
@@ -328,7 +328,10 @@
 	if (verbose)
 		printk(KERN_WARNING 
 		       "sonypi: unknown event port1=0x%02x,port2=0x%02x\n",v1,v2);
-	return;
+	/* We need to return IRQ_HANDLED here because there *are*
+	 * events belonging to the sonypi device we don't know about, 
+	 * but we still don't want those to pollute the logs... */
+	return IRQ_HANDLED;
 
 found:
 	if (verbose > 1)
@@ -351,6 +354,7 @@
 	}
 #endif /* SONYPI_USE_INPUT */
 	sonypi_pushq(event);
+	return IRQ_HANDLED;
 }
 
 /* External camera command (exported to the motion eye v4l driver) */
-- 
Stelian Pop <stelian@popies.net>

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2003-10-26 16:45 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-10-26 16:45 [PATCH 2.4.23-pre8] sonypi driver update Stelian Pop

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox