public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Stelian Pop <stelian@popies.net>
To: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Cc: marcelo.tosatti@cyclades.com
Subject: [PATCH 2.4.23-pre8] sonypi driver update
Date: Sun, 26 Oct 2003 17:45:02 +0100	[thread overview]
Message-ID: <20031026164502.GQ4013@deep-space-9.dsnet> (raw)

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>

                 reply	other threads:[~2003-10-26 16:45 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=20031026164502.GQ4013@deep-space-9.dsnet \
    --to=stelian@popies.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=marcelo.tosatti@cyclades.com \
    /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